X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/847dfdb422c4d56bb56d3c92a9cd706ee2b45530..47e59154157bb013ce255a4efa7a615574c974f7:/src/gtk/renderer.cpp diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 6661e7ff53..f1cd95c856 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -216,6 +216,10 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win, else state = GTK_STATE_NORMAL; + int x_diff = 0; + 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... gtk_paint_expander @@ -226,7 +230,7 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win, NULL, tree, "treeview", - dc.LogicalToDeviceX(rect.x) + 2, + dc.LogicalToDeviceX(rect.x) + 2 - x_diff, dc.LogicalToDeviceY(rect.y) + 3, flags & wxCONTROL_EXPANDED ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED