wxAUI: Don't fade venetian blind effect by default

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Alex Bligh
2006-07-23 11:39:13 +00:00
parent b97ff8ed66
commit 5826659c99
2 changed files with 13 additions and 8 deletions

View File

@@ -48,10 +48,12 @@ enum wxFrameManagerOption
// at runtime we determine we cannot use transparency (because, for instance, the OS does not support it). // at runtime we determine we cannot use transparency (because, for instance, the OS does not support it).
// setting this flag drops back in such circumstances (only) to the behaviour without wxAUI_MGR_TRANSPARENT_HINT // setting this flag drops back in such circumstances (only) to the behaviour without wxAUI_MGR_TRANSPARENT_HINT
wxAUI_MGR_DISABLE_VENETIAN_BLINDS = 1 << 5, wxAUI_MGR_DISABLE_VENETIAN_BLINDS = 1 << 5,
wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE = 1 << 6,
wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
wxAUI_MGR_TRANSPARENT_HINT | wxAUI_MGR_TRANSPARENT_HINT |
wxAUI_MGR_TRANSPARENT_HINT_FADE wxAUI_MGR_TRANSPARENT_HINT_FADE |
wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE
}; };
enum wxPaneDockArtSetting enum wxPaneDockArtSetting

View File

@@ -2590,16 +2590,20 @@ void wxFrameManager::ShowHint(const wxRect& rect)
if ((m_flags & wxAUI_MGR_TRANSPARENT_HINT) != 0 if ((m_flags & wxAUI_MGR_TRANSPARENT_HINT) != 0
&& m_hint_wnd && m_hint_wnd
// Finally, don't use a venetian blind effect if it's been specifically disabled // Finally, don't use a venetian blind effect if it's been specifically disabled
&& !((m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame))) && (m_flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS)) && !((m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame))) &&
(m_flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS))
) )
{ {
if (m_last_hint == rect) if (m_last_hint == rect)
return; return;
m_last_hint = rect; m_last_hint = rect;
wxByte initial_fade = m_hint_fademax; m_hint_fadeamt = m_hint_fademax;
if (m_flags & wxAUI_MGR_TRANSPARENT_HINT_FADE) if ((m_flags & wxAUI_MGR_TRANSPARENT_HINT_FADE)
initial_fade = 0; && !((m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame))) &&
(m_flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE))
)
m_hint_fadeamt = 0;
if (! m_hint_wnd->IsShown()) if (! m_hint_wnd->IsShown())
m_hint_wnd->Show(); m_hint_wnd->Show();
@@ -2609,15 +2613,14 @@ void wxFrameManager::ShowHint(const wxRect& rect)
if (m_action == actionDragFloatingPane && m_action_window) if (m_action == actionDragFloatingPane && m_action_window)
m_action_window->SetFocus(); m_action_window->SetFocus();
m_hint_wnd->SetTransparent(initial_fade); m_hint_wnd->SetTransparent(m_hint_fadeamt);
m_hint_wnd->SetSize(rect); m_hint_wnd->SetSize(rect);
m_hint_wnd->Raise(); m_hint_wnd->Raise();
if (m_flags & wxAUI_MGR_TRANSPARENT_HINT_FADE) if (m_hint_fadeamt != m_hint_fademax) // Only fade if we need to
{ {
// start fade in timer // start fade in timer
m_hint_fadeamt = 0;
m_hint_fadetimer.SetOwner(this, 101); m_hint_fadetimer.SetOwner(this, 101);
m_hint_fadetimer.Start(5); m_hint_fadetimer.Start(5);
} }