Bug 437277

Summary: kstyle git master: StyleConfigData::animationsEnabled() is false, despite default true, and despite global animations are set to default middle speed
Product: [Plasma] Breeze Reporter: Paul McAuley <kde>
Component: QStyleAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate, noahadvs
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Paul McAuley 2021-05-17 21:26:00 UTC
SUMMARY

StyleConfigData::animationsEnabled() is false when global animations are set to default middle speed, despite the default for AnimationsEnabled also to be true. When the default middle animation speed is set the ~/.config/kdeglobals file also does not have a AnimationDurationFactor value in the [KDE] section.

STEPS TO REPRODUCE
1. Boot into git master unstable build of Plasma
2. Go to Settings->Appearance->Application Style->Breeze->Scrollbars and set both arrow types to One button.
3. Go to settings->workspace behaviour->general behaviour and set the animation speed to the middle position. 

OBSERVED RESULT

Scrollbar arrows do not auto-hide when the mouse is not over them.

EXPECTED RESULT

Scrollbar arrows should auto-hide when the mouse is not over them and animations are enabled.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-71-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630

ADDITIONAL INFORMATION
Upon further debugging I found that the reasons for this are twofold:
1. In kstyle/breezestyle.cpp I output the value of StyleConfigData::animationsEnabled() before the  Style::loadGlobalAnimationSettings() function is called. On the git master StyleConfigData::animationsEnabled() returns false, despite the fact that true is the default value for AnimationsEnabled in breeze.kcfg. On release branches (e.g. 5.21.5/5.21.90 ) StyleConfigData::animationsEnabled() returns true as expected.

2. When the default middle animation speed is set, the ~/.config/kdeglobals file also does not have a AnimationDurationFactor value in the [KDE] section. In kstyle/breezestyle.cpp , Style::loadGlobalAnimationSettings() tries to read this value. There is no AnimationDurationFactor set in ~/.config/kdeglobals in both the git master and the release branches.
Comment 1 Nate Graham 2021-05-19 02:40:59 UTC
Nice catch. Wanna submit a merge request? :)