From 08f57d2125e7cf8b602fb7505d7c5dbbdd6b664c Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 14 Nov 2006 17:48:21 +0000 Subject: [PATCH] The usual RTL fix for GTK+'s theme drawing function. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/renderer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 77ce8a0a4f..e968ace5e1 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -510,6 +510,10 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win, wxASSERT_MSG( gdk_window, wxT("cannot use wxRendererNative on wxDC of this type") ); + int x_diff = 0; + if (win->GetLayoutDirection() == wxLayout_RightToLeft) + x_diff = rect.width; + GtkStateType state; if (flags & wxCONTROL_SELECTED) { @@ -524,7 +528,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win, NULL, win->m_wxwindow, "cell_even", - dc.LogicalToDeviceX(rect.x), + dc.LogicalToDeviceX(rect.x) - x_diff, dc.LogicalToDeviceY(rect.y), rect.width, rect.height );