Bug 456724

Summary: No transition when changing color schemes through "Use" button in "Get New Color Schemes"
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: Kareem <karemjaleel34>
Component: generalAssignee: Dan Leinir Turthra Jensen <admin>
Status: RESOLVED FIXED    
Severity: minor CC: alexander.lohnau, haiwilliam0, kdelibs-bugs-null, me, nate
Priority: NOR    
Version First Reported In: 5.96.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.27
Sentry Crash Report:
Attachments: "Use" button after installing color schemes

Description Kareem 2022-07-14 17:56:20 UTC
Created attachment 150626 [details]
"Use" button after installing color schemes

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
New transition effect is not triggered when changing theme through knewstuff

STEPS TO REPRODUCE
1. install a color scheme from the "Get New Color Schemes" button in system settings
2. click 'Use' after installing 

OBSERVED RESULT
Color schemes changes without transition

EXPECTED RESULT
A transition effect like the one you get when changing from the Colors kcm

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.25.2
(available in About System)
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-07-15 19:40:57 UTC
Can confirm. We need to manually trigger the Blend effect when this button is clicked.
Comment 2 Kareem 2022-07-21 12:14:59 UTC
(In reply to Nate Graham from comment #1)
> Can confirm. We need to manually trigger the Blend effect when this button
> is clicked.

The button internally calls plasma-apply-colorscheme
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/colors/plasma-apply-colorscheme.cpp#L59

Not sure why it doesn't trigger the effect, since the same function is called from the KCM
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/colors/colors.cpp#L71
Comment 3 Nate Graham 2022-07-21 15:18:21 UTC
(In reply to Kareem from comment #2)
> (In reply to Nate Graham from comment #1)
> > Can confirm. We need to manually trigger the Blend effect when this button
> > is clicked.
> 
> The button internally calls plasma-apply-colorscheme
> https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/colors/
> plasma-apply-colorscheme.cpp#L59
> 
> Not sure why it doesn't trigger the effect, since the same function is
> called from the KCM
> https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/colors/
> colors.cpp#L71

It gets done in void KCMColors::save(), in the KCM code.

So we will need to add similar code to do that in either plasma-apply-colorscheme, or in the knewstuff code that calls it. I think it would probably make sense to do it in plasma-apply-colorscheme.
Comment 4 William Franco Abdul Hai 2023-01-28 13:03:21 UTC
Fixed as of https://invent.kde.org/plasma/plasma-workspace/-/commit/08d37c535ea1438e124347a4988bff0eb98f375d in plasma-workspace.