Applied patch [ 1218849 ] [wxMSW] Removes magic numbers from wxNotebook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -967,7 +967,7 @@ void wxNotebook::OnSelChange(wxNotebookEvent& event)
|
|||||||
{
|
{
|
||||||
wxNotebookPage *pPage = m_pages[sel];
|
wxNotebookPage *pPage = m_pages[sel];
|
||||||
pPage->Show(true);
|
pPage->Show(true);
|
||||||
|
|
||||||
// As per bug report:
|
// As per bug report:
|
||||||
// http://sourceforge.net/tracker/index.php?func=detail&aid=1150659&group_id=9863&atid=109863,
|
// http://sourceforge.net/tracker/index.php?func=detail&aid=1150659&group_id=9863&atid=109863,
|
||||||
// we should not set the page focus (and thereby the focus for
|
// we should not set the page focus (and thereby the focus for
|
||||||
@@ -1102,17 +1102,17 @@ bool wxNotebook::DoDrawBackground(WXHDC hDC, wxWindow *child)
|
|||||||
if ( child )
|
if ( child )
|
||||||
::MapWindowPoints(GetHwnd(), GetHwndOf(child), (POINT *)&rc, 2);
|
::MapWindowPoints(GetHwnd(), GetHwndOf(child), (POINT *)&rc, 2);
|
||||||
|
|
||||||
|
// we have the content area (page size), but we need to draw all of the
|
||||||
// apparently DrawThemeBackground() modifies the rect passed to it and if we
|
// background for it to be aligned correctly
|
||||||
// don't do these adjustments, there are some drawing artifacts which are
|
wxUxThemeEngine::Get()->GetThemeBackgroundExtent
|
||||||
// only visible with some non default themes; so modify the rect here using
|
(
|
||||||
// the magic numbers below so that it still paints the correct area
|
theme,
|
||||||
rc.left -= 2;
|
(HDC) hDC,
|
||||||
rc.top -= 2;
|
9 /* TABP_PANE */,
|
||||||
rc.right += 4;
|
0,
|
||||||
rc.bottom += 5;
|
&rc,
|
||||||
|
&rc
|
||||||
|
);
|
||||||
wxUxThemeEngine::Get()->DrawThemeBackground
|
wxUxThemeEngine::Get()->DrawThemeBackground
|
||||||
(
|
(
|
||||||
theme,
|
theme,
|
||||||
|
Reference in New Issue
Block a user