position expander in center of given rectangle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -256,8 +256,7 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win,
|
||||
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||
x_diff = rect.width;
|
||||
|
||||
// VZ: I don't know how to get the size of the expander so as to centre it
|
||||
// in the given rectangle, +2/3 below is just what looks good here...
|
||||
// x and y parameters specify the center of the expander
|
||||
gtk_paint_expander
|
||||
(
|
||||
gtk_widget_get_style(tree),
|
||||
@@ -266,8 +265,8 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win,
|
||||
NULL,
|
||||
tree,
|
||||
"treeview",
|
||||
dc.LogicalToDeviceX(rect.x) + 6 - x_diff,
|
||||
dc.LogicalToDeviceY(rect.y) + 3,
|
||||
dc.LogicalToDeviceX(rect.x) + rect.width / 2 - x_diff,
|
||||
dc.LogicalToDeviceY(rect.y) + rect.height / 2,
|
||||
flags & wxCONTROL_EXPANDED ? GTK_EXPANDER_EXPANDED
|
||||
: GTK_EXPANDER_COLLAPSED
|
||||
);
|
||||
|
Reference in New Issue
Block a user