Bug 456835 - Accent color do not show preview when user chooses the wallpaper option until the Apply button is clicked
Summary: Accent color do not show preview when user chooses the wallpaper option until...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (show other bugs)
Version: master
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 456858 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-17 20:26 UTC by tantalising
Modified: 2022-10-05 23:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tantalising 2022-07-17 20:26:06 UTC
For provided custom colors, the chosen color is shown in the colorscheme thumbnails. This does not work for wallpaper accent color until user press apply.

STEPS TO REPRODUCE
1.  Make sure the accent color is not from wallpaper
2.  Choose accent color from wallpaper
3.  Note that the accent color preview is not shown in the colorscheme thumbnails.

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 tantalising 2022-07-17 20:42:08 UTC
Sorry I forgot to include OBSERVED RESULT AND EXPECTED RESULT section and I can't find a way to edit now.
Comment 2 Nate Graham 2022-07-18 20:31:17 UTC
It's okay :)

I can reproduce it.
Comment 3 Nate Graham 2022-07-18 20:31:33 UTC
*** Bug 456858 has been marked as a duplicate of this bug. ***
Comment 4 Fushan Wen 2022-10-05 23:33:32 UTC
Git commit 5b7c5a201dc2517a5545a7017caf10bf78dde335 by Fushan Wen, on behalf of Tanbir Jishan.
Committed on 05/10/2022 at 23:33.
Pushed by fusionfuture into branch 'master'.

kcms/colors: Fix color previews not updating until apply is pressed

The reason colors are not updating correctly because there is no color(valid) to show in the first place. The color generation was later disabled when setting is not from wallpaper after the feature being implemented, I guess for efficiency. So we need to temporarily turn on the color engine, take the color and then again disable it. There is two reason for which we should always return a valid color for primary desktop:
1. We need to show the preview when asked.
2. There is a public dbus api which was added so that any third party code can get the correct wallpaper accent color any moment, regardless of setting. This may be useful, for example some app which always want to show some ui element in the wallpaper color.
FIXED-IN: 5.26

M  +41   -2    shell/shellcorona.cpp
M  +2    -0    shell/shellcorona.h

https://invent.kde.org/plasma/plasma-workspace/commit/5b7c5a201dc2517a5545a7017caf10bf78dde335
Comment 5 Fushan Wen 2022-10-05 23:34:07 UTC
Git commit 85fc6be62cfe6a6fe29868117ff0b11695fb9817 by Fushan Wen, on behalf of Tanbir Jishan.
Committed on 05/10/2022 at 23:34.
Pushed by fusionfuture into branch 'Plasma/5.26'.

kcms/colors: Fix color previews not updating until apply is pressed

The reason colors are not updating correctly because there is no color(valid) to show in the first place. The color generation was later disabled when setting is not from wallpaper after the feature being implemented, I guess for efficiency. So we need to temporarily turn on the color engine, take the color and then again disable it. There is two reason for which we should always return a valid color for primary desktop:
1. We need to show the preview when asked.
2. There is a public dbus api which was added so that any third party code can get the correct wallpaper accent color any moment, regardless of setting. This may be useful, for example some app which always want to show some ui element in the wallpaper color.
FIXED-IN: 5.26


(cherry picked from commit 5b7c5a201dc2517a5545a7017caf10bf78dde335)

M  +41   -2    shell/shellcorona.cpp
M  +2    -0    shell/shellcorona.h

https://invent.kde.org/plasma/plasma-workspace/commit/85fc6be62cfe6a6fe29868117ff0b11695fb9817