From 219f8908b5e4f0bcc75a2a245dc4a554717186a2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Dec 2023 16:18:18 +0100 Subject: [PATCH] Make hint window fade in animation actually noticeable Using 5ms delay for the fade in timer and 4 point increment for the value running from 0 to 50 meant that the entire fade in took 60ms which wasn't really noticeable, i.e. couldn't be distinguished from not using fade in at all. Increase the delay to 15ms (which corresponds to ~60 FPS) and make the animation last longer by increasing the transparency more progressively to make the fade in actually visible. In the future we probably ought to make all the values involved (animation duration, initial and end values and the step) configurable by adding some SetHintFadeInOptions() to wxAuiManager. --- src/aui/framemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index b7f7f37a0f..528f8dcf3c 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -3298,7 +3298,7 @@ void wxAuiManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event)) return; } - m_hintFadeAmt += 4; + m_hintFadeAmt++; m_hintWnd->SetTransparent(m_hintFadeAmt); } @@ -3339,7 +3339,7 @@ void wxAuiManager::ShowHint(const wxRect& rect) { // start fade in timer m_hintFadeTimer.SetOwner(this); - m_hintFadeTimer.Start(5); + m_hintFadeTimer.Start(15); Bind(wxEVT_TIMER, &wxAuiManager::OnHintFadeTimer, this, m_hintFadeTimer.GetId()); }