From: Julian Smart Date: Thu, 16 Jun 2005 15:34:41 +0000 (+0000) Subject: Applied patch [ 1218849 ] [wxMSW] Removes magic numbers from wxNotebook X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2ff53fd302fcd49039ee6fa78812e978c6e4506f 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 --- diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 5694d072b9..6d9f5b112a 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -967,7 +967,7 @@ void wxNotebook::OnSelChange(wxNotebookEvent& event) { wxNotebookPage *pPage = m_pages[sel]; pPage->Show(true); - + // As per bug report: // 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 @@ -1102,17 +1102,17 @@ bool wxNotebook::DoDrawBackground(WXHDC hDC, wxWindow *child) if ( child ) ::MapWindowPoints(GetHwnd(), GetHwndOf(child), (POINT *)&rc, 2); - - // apparently DrawThemeBackground() modifies the rect passed to it and if we - // don't do these adjustments, there are some drawing artifacts which are - // 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 - rc.left -= 2; - rc.top -= 2; - rc.right += 4; - rc.bottom += 5; - - + // we have the content area (page size), but we need to draw all of the + // background for it to be aligned correctly + wxUxThemeEngine::Get()->GetThemeBackgroundExtent + ( + theme, + (HDC) hDC, + 9 /* TABP_PANE */, + 0, + &rc, + &rc + ); wxUxThemeEngine::Get()->DrawThemeBackground ( theme,