Remove temporary fix for drawing check box in the wxPG edit mode with RTL layout
Since the issue is fixed (r77020) this hack is no longer necessary (see #16254). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1552,20 +1552,7 @@ wxBitmap* wxSimpleCheckBox::ms_doubleBuffer = NULL;
|
|||||||
void wxSimpleCheckBox::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
void wxSimpleCheckBox::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxRect rect(GetClientSize());
|
wxRect rect(GetClientSize());
|
||||||
#ifdef __WXMSW__
|
|
||||||
wxPaintDC dc(this);
|
|
||||||
// Under MSW, wxAutoBufferedPaintDC, wxPaintDC don't work fine with RTL,
|
|
||||||
// so we need to bypass this problem by setting LTR direction for this DC.
|
|
||||||
// Fortunately, we have only check box image to draw, no texts.
|
|
||||||
if ( dc.GetLayoutDirection() == wxLayout_RightToLeft )
|
|
||||||
{
|
|
||||||
dc.SetLayoutDirection(wxLayout_LeftToRight);
|
|
||||||
// Some hack to prevent shifting the ouput image.
|
|
||||||
rect.x -= 2;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
wxAutoBufferedPaintDC dc(this);
|
wxAutoBufferedPaintDC dc(this);
|
||||||
#endif
|
|
||||||
dc.Clear();
|
dc.Clear();
|
||||||
|
|
||||||
rect.y += 1;
|
rect.y += 1;
|
||||||
|
Reference in New Issue
Block a user