Remove manual mirroring in RTL case from wxGrid code.

This is not necessary as wxDC already inherits RTL from the window itself and,
in fact, breaks the display when using RTL.

Closes #16250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-09 17:56:29 +00:00
parent 0e9005e166
commit 8d8c902879
2 changed files with 3 additions and 9 deletions

View File

@@ -603,6 +603,7 @@ wxMSW:
- Fix background of wxRadioBox buttons and wxSlider (Artur Wieczorek).
- Fix appearance of wxToggleButtons with non default colours (Artur Wieczorek).
- Fix drawing on wxDC when using right-to-left layout (Artur Wieczorek).
- Fix wxGrid appearance and behaviour in RTL (Artur Wieczorek).
3.0.1: (released 2014-06-15)

View File

@@ -1680,10 +1680,7 @@ void wxGridColLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) )
int x, y;
m_owner->CalcUnscrolledPosition( 0, 0, &x, &y );
wxPoint pt = dc.GetDeviceOrigin();
if (GetLayoutDirection() == wxLayout_RightToLeft)
dc.SetDeviceOrigin( pt.x+x, pt.y );
else
dc.SetDeviceOrigin( pt.x-x, pt.y );
dc.SetDeviceOrigin( pt.x-x, pt.y );
wxArrayInt cols = m_owner->CalcColLabelsExposed( GetUpdateRegion() );
m_owner->DrawColLabels( dc, cols );
@@ -3736,13 +3733,9 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
// and check if we're on the "near" (usually left but right
// in RTL case) part of the column
bool onNearPart;
const int middle = GetColLeft(colValid) +
GetColWidth(colValid)/2;
if ( GetLayoutDirection() == wxLayout_LeftToRight )
onNearPart = (x <= middle);
else // wxLayout_RightToLeft
onNearPart = (x > middle);
const bool onNearPart = (x <= middle);
// adjust for the column being dragged itself
if ( pos < GetColPos(m_dragRowOrCol) )