From 615b7e6ab086c41946145d3f98af4e2bf9a284f9 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 18 Sep 2006 21:02:09 +0000 Subject: [PATCH] More wxGrid RTL things. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 1c007dd1ca..28923facce 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3736,7 +3736,8 @@ void wxGridRowLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) int x, y; m_owner->CalcUnscrolledPosition( 0, 0, &x, &y ); - dc.SetDeviceOrigin( 0, -y ); + wxPoint pt = dc.GetDeviceOrigin(); + dc.SetDeviceOrigin( pt.x, pt.y-y ); wxArrayInt rows = m_owner->CalcRowLabelsExposed( GetUpdateRegion() ); m_owner->DrawRowLabels( dc, rows ); @@ -3806,7 +3807,11 @@ void wxGridColLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) int x, y; m_owner->CalcUnscrolledPosition( 0, 0, &x, &y ); - dc.SetDeviceOrigin( -x, 0 ); + wxPoint pt = dc.GetDeviceOrigin(); + if (GetLayoutDirection() == wxLayout_RightToLeft) + dc.SetDeviceOrigin( pt.x+x, pt.y ); + else + dc.SetDeviceOrigin( pt.x-x, pt.y ); wxArrayInt cols = m_owner->CalcColLabelsExposed( GetUpdateRegion() ); m_owner->DrawColLabels( dc, cols ); -- 2.50.0