Query QStyle::SH_Widget_Animation_Duration style hint.
QTimeLine requires a duration > 0, so use 1 [ms] to make the animation as fast as possible when disabled.
BUG: 397103
FIXED-IN: 5.51.0
ngraham | |
elvisangelaccio |
Frameworks |
Query QStyle::SH_Widget_Animation_Duration style hint.
QTimeLine requires a duration > 0, so use 1 [ms] to make the animation as fast as possible when disabled.
BUG: 397103
FIXED-IN: 5.51.0
./bin/kcollapsiblegroupboxtest with Breeze animations enabled and disabled and with different duration settings.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Shouldn't the duration respect the global setting rather than being hardcoded to 500ms?
SH_Widget_Animate is deprecated in favor of SH_Widget_Animation_Duration introduced in Qt 5.10, so perhaps this needs an ifdef
Indeed Breeze style was already updated to return the actual configured duration on Qt 5.10.
Would KMessageWidget need the same change?
Yeah, I think so. No sense in having a user-tweakable "animation duration" value if we're not going to respect it.
I was skeptical, because my impression was that KMessageWidget animations are intentionally slow to stay readable.
That would only affect the speed of appearing and disappearing though, right? Not the total duration that is status on the screen.