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.
This commit is contained in:
Vadim Zeitlin 2023-12-24 16:18:18 +01:00
parent 48982e5aa4
commit 219f8908b5

View file

@ -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());
}