From e352cd2c035abe06de5841370b6b16bea36b71f1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Mar 2025 20:35:25 +0100 Subject: [PATCH] Deprecate wxAUI_MGR_NO_VENETIAN_BLINDS_FADE This style doesn't make much sense any longer now that using wxAUI_MGR_VENETIAN_BLINDS_HINT on its down doesn't enable fade-in effect, so (informally) deprecate it and keep it defined as 0 just for compatibility. --- include/wx/aui/framemanager.h | 3 +-- interface/wx/aui/framemanager.h | 17 +++++++++++------ samples/aui/auidemo.cpp | 8 -------- src/aui/framemanager.cpp | 5 +---- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index b7bb7a0735..2697c88556 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -46,12 +46,11 @@ enum wxAuiManagerOption wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4, wxAUI_MGR_RECTANGLE_HINT = 1 << 5, wxAUI_MGR_HINT_FADE = 1 << 6, - wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7, + wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 0, // For compatibility only. wxAUI_MGR_LIVE_RESIZE = 1 << 8, wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT | - wxAUI_MGR_NO_VENETIAN_BLINDS_FADE | wxAUI_MGR_LIVE_RESIZE }; diff --git a/interface/wx/aui/framemanager.h b/interface/wx/aui/framemanager.h index 1101ee1221..958f3f7b9a 100644 --- a/interface/wx/aui/framemanager.h +++ b/interface/wx/aui/framemanager.h @@ -48,8 +48,14 @@ enum wxAuiManagerOption wxAUI_MGR_DEFAULT. */ wxAUI_MGR_HINT_FADE = 1 << 6, - /// Used in complement of wxAUI_MGR_VENETIAN_BLINDS_HINT to show the hint immediately. - wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7, + /** + Style which disabled the fade-in effect for the docking hint when using + Venetian blinds hint. + + This style is obsolete and doesn't do anything any longer, fade-in + effect is only enabled when wxAUI_MGR_HINT_FADE is used. + */ + wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 0, /// When a docked pane is resized, its content is refreshed in live (instead of moving /// the border alone and refreshing the content at the end). /// Since wxWidgets 3.3.0 this flag is included in the default flags. @@ -57,7 +63,6 @@ enum wxAuiManagerOption /// Default behaviour. wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT | - wxAUI_MGR_NO_VENETIAN_BLINDS_FADE | wxAUI_MGR_LIVE_RESIZE }; @@ -150,8 +155,8 @@ enum wxAuiManagerOption Note that this flag is not included in wxAUI_MGR_DEFAULT since wxWidgets 3.3.0 any longer. @style{wxAUI_MGR_NO_VENETIAN_BLINDS_FADE} - Used in complement of wxAUI_MGR_VENETIAN_BLINDS_HINT to show the - docking hint immediately. + This style is obsolete and doesn't do anything, it is only defined + as 0 for compatibility. @style{wxAUI_MGR_LIVE_RESIZE} When a docked pane is resized, its content is refreshed in live (instead of moving the border alone and refreshing the content at the end). Note that @@ -161,7 +166,7 @@ enum wxAuiManagerOption implemented in them. @style{wxAUI_MGR_DEFAULT} Default behaviour, combines ::wxAUI_MGR_ALLOW_FLOATING, - ::wxAUI_MGR_TRANSPARENT_HINT and ::wxAUI_MGR_NO_VENETIAN_BLINDS_FADE. + ::wxAUI_MGR_TRANSPARENT_HINT and ::wxAUI_MGR_LIVE_RESIZE. @endStyleTable @beginEventEmissionTable{wxAuiManagerEvent} diff --git a/samples/aui/auidemo.cpp b/samples/aui/auidemo.cpp index beb1bde103..93a941e8b4 100644 --- a/samples/aui/auidemo.cpp +++ b/samples/aui/auidemo.cpp @@ -87,7 +87,6 @@ class MyFrame : public wxFrame ID_RectangleHint, ID_NoHint, ID_HintFade, - ID_NoVenetianFade, ID_TransparentDrag, ID_NoGradient, ID_VerticalGradient, @@ -632,7 +631,6 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(ID_RectangleHint, MyFrame::OnManagerFlag) EVT_MENU(ID_NoHint, MyFrame::OnManagerFlag) EVT_MENU(ID_HintFade, MyFrame::OnManagerFlag) - EVT_MENU(ID_NoVenetianFade, MyFrame::OnManagerFlag) EVT_MENU(ID_TransparentDrag, MyFrame::OnManagerFlag) EVT_MENU(ID_LiveUpdate, MyFrame::OnManagerFlag) EVT_MENU(ID_AllowActivePane, MyFrame::OnManagerFlag) @@ -688,7 +686,6 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_UPDATE_UI(ID_RectangleHint, MyFrame::OnUpdateUI) EVT_UPDATE_UI(ID_NoHint, MyFrame::OnUpdateUI) EVT_UPDATE_UI(ID_HintFade, MyFrame::OnUpdateUI) - EVT_UPDATE_UI(ID_NoVenetianFade, MyFrame::OnUpdateUI) EVT_UPDATE_UI(ID_TransparentDrag, MyFrame::OnUpdateUI) EVT_UPDATE_UI(ID_LiveUpdate, MyFrame::OnUpdateUI) EVT_UPDATE_UI(ID_NoGradient, MyFrame::OnUpdateUI) @@ -756,7 +753,6 @@ MyFrame::MyFrame(wxWindow* parent, options_menu->AppendSeparator(); options_menu->AppendCheckItem(ID_HintFade, _("Hint Fade-in")); options_menu->AppendCheckItem(ID_AllowFloating, _("Allow Floating")); - options_menu->AppendCheckItem(ID_NoVenetianFade, _("Disable Venetian Blinds Hint Fade-in")); options_menu->AppendCheckItem(ID_TransparentDrag, _("Transparent Drag")); options_menu->AppendCheckItem(ID_AllowActivePane, _("Allow Active Pane")); // Only show "live resize" toggle if it's actually functional. @@ -1205,7 +1201,6 @@ void MyFrame::OnManagerFlag(wxCommandEvent& event) case ID_AllowFloating: flag = wxAUI_MGR_ALLOW_FLOATING; break; case ID_TransparentDrag: flag = wxAUI_MGR_TRANSPARENT_DRAG; break; case ID_HintFade: flag = wxAUI_MGR_HINT_FADE; break; - case ID_NoVenetianFade: flag = wxAUI_MGR_NO_VENETIAN_BLINDS_FADE; break; case ID_AllowActivePane: flag = wxAUI_MGR_ALLOW_ACTIVE_PANE; break; case ID_TransparentHint: flag = wxAUI_MGR_TRANSPARENT_HINT; break; case ID_VenetianBlindsHint: flag = wxAUI_MGR_VENETIAN_BLINDS_HINT; break; @@ -1373,9 +1368,6 @@ void MyFrame::OnUpdateUI(wxUpdateUIEvent& event) case ID_HintFade: event.Check((flags & wxAUI_MGR_HINT_FADE) != 0); break; - case ID_NoVenetianFade: - event.Check((flags & wxAUI_MGR_NO_VENETIAN_BLINDS_FADE) != 0); - break; case ID_NotebookNoCloseButton: event.Check((m_notebook_style & (wxAUI_NB_CLOSE_BUTTON|wxAUI_NB_CLOSE_ON_ALL_TABS|wxAUI_NB_CLOSE_ON_ACTIVE_TAB)) == 0); diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index dcb8e0d52f..0784c6aaaa 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -3464,10 +3464,7 @@ void wxAuiManager::UpdateHint(const wxRect& rect) { // Decide if we want to fade in the hint and set it to the end value if // we don't. - if ((m_flags & wxAUI_MGR_HINT_FADE) - && !((m_flags & wxAUI_MGR_VENETIAN_BLINDS_HINT) && - (m_flags & wxAUI_MGR_NO_VENETIAN_BLINDS_FADE)) - ) + if (m_flags & wxAUI_MGR_HINT_FADE) m_hintFadeAmt = 0; else m_hintFadeAmt = m_hintFadeMax;