From 2121eb69fa8d49f4484f7170159e61f2e8885de4 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 19 Sep 2006 10:42:42 +0000 Subject: [PATCH] Another RTL fix. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 28923facce..68c6411e8f 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7519,12 +7519,6 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ) rect.width -= penWidth - 1; rect.height -= penWidth - 1; -#ifdef __WXGTK__ - // FIXME: why is the rect drawn off-by-one? - if ((penWidth == 2) && (GetLayoutDirection() == wxLayout_RightToLeft)) - rect.x -= 1; -#endif - // Now draw the rectangle // use the cellHighlightColour if the cell is inside a selection, this // will ensure the cell is always visible. @@ -7758,7 +7752,12 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED(reg) ) { i = GetColAt( colPos ); - int colRight = GetColRight(i) - 1; + int colRight = GetColRight(i); +#ifdef __WXGTK__ + if (GetLayoutDirection() != wxLayout_RightToLeft) +#endif + colRight--; + if ( colRight > right ) { break; -- 2.45.2