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
This commit is contained in:
Robert Roebling 2006-11-14 17:48:21 +00:00
parent 3ad202f9be
commit 08f57d2125

View File

@ -510,6 +510,10 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
wxASSERT_MSG( gdk_window, wxASSERT_MSG( gdk_window,
wxT("cannot use wxRendererNative on wxDC of this type") ); wxT("cannot use wxRendererNative on wxDC of this type") );
int x_diff = 0;
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
x_diff = rect.width;
GtkStateType state; GtkStateType state;
if (flags & wxCONTROL_SELECTED) if (flags & wxCONTROL_SELECTED)
{ {
@ -524,7 +528,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
NULL, NULL,
win->m_wxwindow, win->m_wxwindow,
"cell_even", "cell_even",
dc.LogicalToDeviceX(rect.x), dc.LogicalToDeviceX(rect.x) - x_diff,
dc.LogicalToDeviceY(rect.y), dc.LogicalToDeviceY(rect.y),
rect.width, rect.width,
rect.height ); rect.height );