Applied patch [ 1412216 ] non-themed fallback support for other wxNotebook orientation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -82,13 +82,13 @@ All (GUI):
|
|||||||
- Added wxToolbook (uses a wxToolBar to control pages).
|
- Added wxToolbook (uses a wxToolBar to control pages).
|
||||||
- Added SetSheetStyle to wxPropertySheetDialog and allowed it to
|
- Added SetSheetStyle to wxPropertySheetDialog and allowed it to
|
||||||
behave like a Mac OS X settings dialog.
|
behave like a Mac OS X settings dialog.
|
||||||
- Added <disabled> XRC tag for wxToolBar elements and <bg> for wxToolBar itself
|
- Added <disabled> XRC tag for wxToolBar elements and <bg> for wxToolBar itself.
|
||||||
- Fixed centering of top level windows on secondary displays
|
- Fixed centering of top level windows on secondary displays.
|
||||||
- Implemented wxDisplay::GetFromWindow() for platforms other than MSW
|
- Implemented wxDisplay::GetFromWindow() for platforms other than MSW.
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
- Fixed crash with ownerdrawn menu items accelerators (Perry Miller)
|
- Fixed crash with ownerdrawn menu items accelerators (Perry Miller).
|
||||||
- wxFileDialog respects absence of wxCHANGE_DIR flag under NT (Brad Anderson).
|
- wxFileDialog respects absence of wxCHANGE_DIR flag under NT (Brad Anderson).
|
||||||
- Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
|
- Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
|
||||||
- Removed wxImageList *GetImageList(int) const.
|
- Removed wxImageList *GetImageList(int) const.
|
||||||
@@ -128,6 +128,7 @@ wxMSW:
|
|||||||
- Fixed problem with getting input in universal/unicode build of wxMSW.
|
- Fixed problem with getting input in universal/unicode build of wxMSW.
|
||||||
- Link oleacc.lib conditionally.
|
- Link oleacc.lib conditionally.
|
||||||
- Drag and drop now works inside static boxes.
|
- Drag and drop now works inside static boxes.
|
||||||
|
- Fall back to unthemed wxNotebook if specified orientation not available.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -275,19 +275,16 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
style |= wxBORDER_SUNKEN;
|
style |= wxBORDER_SUNKEN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// comctl32.dll 6.0 doesn't support non-top tabs with visual styles (the
|
#if !wxUSE_UXTHEME
|
||||||
// control is simply not rendered correctly), so disable them in this case
|
// ComCtl32 notebook tabs simply don't work unless they're on top if we have uxtheme, we can
|
||||||
|
// work around it later (after control creation), but if we don't have uxtheme, we have to clear
|
||||||
|
// those styles
|
||||||
const int verComCtl32 = wxApp::GetComCtl32Version();
|
const int verComCtl32 = wxApp::GetComCtl32Version();
|
||||||
if ( verComCtl32 == 600 )
|
if ( verComCtl32 == 600 )
|
||||||
{
|
{
|
||||||
// check if we use themes at all -- if we don't, we're still ok
|
style &= ~(wxNB_BOTTOM | wxNB_LEFT | wxNB_RIGHT);
|
||||||
#if wxUSE_UXTHEME
|
|
||||||
if ( wxUxThemeEngine::GetIfActive() )
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
style &= ~(wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#endif //wxUSE_UXTHEME
|
||||||
|
|
||||||
LPCTSTR className = WC_TABCONTROL;
|
LPCTSTR className = WC_TABCONTROL;
|
||||||
|
|
||||||
@@ -348,6 +345,22 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
// create backing store
|
// create backing store
|
||||||
UpdateBgBrush();
|
UpdateBgBrush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// comctl32.dll 6.0 doesn't support non-top tabs with visual styles (the
|
||||||
|
// control is simply not rendered correctly), so we disable themes
|
||||||
|
// if possible, otherwise we simply clear the styles.
|
||||||
|
// It's probably not possible to have UXTHEME without ComCtl32 6 or better, but lets
|
||||||
|
// check it anyway.
|
||||||
|
const int verComCtl32 = wxApp::GetComCtl32Version();
|
||||||
|
if ( verComCtl32 == 600 )
|
||||||
|
{
|
||||||
|
// check if we use themes at all -- if we don't, we're still okay
|
||||||
|
if ( wxUxThemeEngine::GetIfActive() && (style & (wxNB_BOTTOM|wxNB_LEFT|wxNB_RIGHT)))
|
||||||
|
{
|
||||||
|
wxUxThemeEngine::GetIfActive()->SetWindowTheme((HWND)this->GetHandle(), L"", L"");
|
||||||
|
SetBackgroundColour(GetThemeBackgroundColour()); //correct the background color for the new non-themed control
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif // wxUSE_UXTHEME
|
#endif // wxUSE_UXTHEME
|
||||||
|
|
||||||
// Undocumented hack to get flat notebook style
|
// Undocumented hack to get flat notebook style
|
||||||
|
Reference in New Issue
Block a user