fix for tabs drawing in RTL (patch 1552881)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
72c1ba98f2
commit
6614aa496d
@ -911,6 +911,9 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
wxBitmap bmp(rc.right, rc.bottom);
|
||||
memdc.SelectObject(bmp);
|
||||
|
||||
const wxLayoutDirection dir = dc.GetLayoutDirection();
|
||||
memdc.SetLayoutDirection(dir);
|
||||
|
||||
// if there is no special brush just use the solid background colour
|
||||
#if wxUSE_UXTHEME
|
||||
HBRUSH hbr = (HBRUSH)m_hbrBackground;
|
||||
@ -928,7 +931,10 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
|
||||
MSWDefWindowProc(WM_PAINT, (WPARAM)memdc.GetHDC(), 0);
|
||||
|
||||
dc.Blit(0, 0, rc.right, rc.bottom, &memdc, 0, 0);
|
||||
// For some reason in RTL mode, source offset has to be -1, otherwise the
|
||||
// right border (physical) remains unpainted.
|
||||
const wxCoord ofs = dir == wxLayout_RightToLeft ? -1 : 0;
|
||||
dc.Blit(ofs, 0, rc.right, rc.bottom, &memdc, ofs, 0);
|
||||
}
|
||||
|
||||
#endif // USE_NOTEBOOK_ANTIFLICKER
|
||||
|
Loading…
Reference in New Issue
Block a user