Bug 483614 - Wrong button icon colors throughout Plasma when using certain third-party themes/color schemes
Summary: Wrong button icon colors throughout Plasma when using certain third-party the...
Status: CONFIRMED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: components (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-14 22:26 UTC by obnosim
Modified: 2024-09-08 20:52 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Calendar view - OK (358.72 KB, image/png)
2024-03-14 22:26 UTC, obnosim
Details
Tray popup - not OK (227.00 KB, image/png)
2024-03-14 22:27 UTC, obnosim
Details
krunner - not OK (39.14 KB, image/png)
2024-03-14 22:28 UTC, obnosim
Details
Other example: widget edit menu at top of screen is also black on black (86.96 KB, image/png)
2024-03-14 22:34 UTC, obnosim
Details
Notification popup with colors file fix - not ok (52.33 KB, image/png)
2024-03-14 22:52 UTC, obnosim
Details
Test theme based on Breeze (Dark) to reproduce the issue (1.14 MB, application/gzip)
2024-03-21 22:18 UTC, obnosim
Details
Calendar view with plasma-test theme : notice white icons (40.24 KB, image/png)
2024-03-21 22:20 UTC, obnosim
Details
System tray window : notice magenta icons (20.76 KB, image/png)
2024-03-21 22:22 UTC, obnosim
Details
Cannot install Velours on Plasma 6 (42.02 KB, image/png)
2024-03-22 08:48 UTC, Nick
Details
Cannot get test theme to install either (241.56 KB, image/png)
2024-03-22 08:54 UTC, Nick
Details
Aha! (187.92 KB, image/png)
2024-03-22 08:58 UTC, Nick
Details
Fixed test theme (1.14 MB, application/gzip)
2024-03-22 21:20 UTC, obnosim
Details
Test with updated theme (154.44 KB, image/png)
2024-03-23 08:42 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description obnosim 2024-03-14 22:26:43 UTC
Created attachment 167212 [details]
Calendar view - OK

SUMMARY
Icons in Plasma's popup window don't all use the same colorscheme, resulting in black-on-black icons in third-party themes that did not have this issue before Plasma 6.

STEPS TO REPRODUCE
1. Use a third-party Plasma theme that works for Plasma 5 (example: https://codeberg.org/obnosim/velours)
2. Open calendar view from Plasma's digital clock widget
3. Open any other tray widget's popup view
4. Open krunner

OBSERVED RESULT
2: The Pin and Settings icons in the calendar popup view are white on a black background, as expected.
3: The Pin, Settings and Menu icons, depending on the view, are all black on a black background.
4: The Settings and Pin icons are black on a black background.

EXPECTED RESULT
All icons should use a consistent colorscheme and be visible.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Wayland

ADDITIONAL INFORMATION
Icons are visible when using the Breeze, Breeze Light and Breeze Dark themes, so I don't know at the moment what is wrong with my theme. The thing is, with Plasma 6 removing support for icons in themes, I no longer have any control over the icon assets, so it should just work. I assume other third-party themes could also be affected.
Comment 1 obnosim 2024-03-14 22:27:36 UTC
Created attachment 167213 [details]
Tray popup - not OK

Icons are barely visible in the top right corner
Comment 2 obnosim 2024-03-14 22:28:07 UTC
Created attachment 167214 [details]
krunner - not OK

Icons are barely visible (left and right of the input field)
Comment 3 obnosim 2024-03-14 22:28:34 UTC
Added more attachments to illustrate the issue
Comment 4 obnosim 2024-03-14 22:34:55 UTC
Created attachment 167215 [details]
Other example: widget edit menu at top of screen is also black on black
Comment 5 obnosim 2024-03-14 22:36:09 UTC
I renamed the issue after finding more places where it applies.
Comment 6 obnosim 2024-03-14 22:52:11 UTC
Editing the theme's `colors` file to replace

[Colors:Button]
ForegroundNormal=0,0,0

with

[Colors:Button]
ForegroundNormal=255,255,255

fixes all the previous cases, however it creates new issues with other buttons (the ones that are always visible and not just on hover) that are now white on white where they were previously black on white.
Comment 7 obnosim 2024-03-14 22:52:56 UTC
Created attachment 167219 [details]
Notification popup with colors file fix - not ok
Comment 8 Nick 2024-03-21 20:51:55 UTC
Hi - I've tried to duplicate this but I am not able to work out how to install the theme you have used as an example. Are you able to confirm precisely which folders it is installed in? Meanwhile I have tried installing a couple of random themes via the Plasma Themes settings (Relax-Light-Global-6 and Ocean) and my quick testing suggests they are OK. Could you try one of these too and confirm if they work for you? Thanks, Nick.
Comment 9 obnosim 2024-03-21 22:16:04 UTC
Hi Nick,
It should be as simple as
cd ~/.local/share/plasma/desktoptheme
git clone https://codeberg.org/obnosim/velours.git velours

Or you could download the latest release here: https://store.kde.org/p/998798 or search "velours" in system settings GetNewTheme window.

It tried some other third-party themes but I couldn't find any except mine that uses an inverted scheme for buttons with backgrounds, so the issue is not apparent in any of them because buttons with or without backgrounds have the same foreground color.

Here is another way to debug the issue without needing a third-party theme.
# Create a local fork of Breeze:
cp /usr/share/plasma/desktoptheme/default ~/.local/share/plasma/desktoptheme/plasma-test
# Copy the colors file from Breeze Dark (since Breeze does not have one as it uses the application colorscheme)
cp /usr/share/plasma/desktoptheme/breeze-dark/colors ~/.local/share/plasma/desktoptheme/plasma-test/colors
# Now edit in ~/.local/share/plasma/desktoptheme/plasma-test/colors the value ForegroundNormal under the [Colors:Button] section to something easy to pick up visually, like magenta:
ForegroundNormal=252,0,252
# Now edit ~/.local/share/plasma/desktoptheme/plasma-test/metadata.json to give it a distinct name, then go enable the theme in system settings

Then you can do the following tests:
- open a calendar and notice that the buttons in the top-right corner, Settings and Keep Open, which have no background by design, still have white icons
- switch to any system tray widget (for example: the volume control, or klipper) and notice that the same buttons with no background now have magenta icons
- open the logout prompt and notice that the "Ok" and "Cancel" buttons, which do have a background, still have white text

Conclusion: some buttons use the color from "[Colors:Button] ForegroundNormal", some don't, and it's not consistent: buttons without backgrounds don't all use the same foreground color. I could not find an example of a button with a background that does use "[Colors:Button] ForegroundNormal".

I'll upload an archive with that test project to make it more convenient and screenshots so it's clearer.
Comment 10 obnosim 2024-03-21 22:18:10 UTC
Created attachment 167575 [details]
Test theme based on Breeze (Dark) to reproduce the issue

Added a test theme based on Breeze with minimal modifications to reproduce the issue.
Extract it into ~/.local/share/plasma/desktoptheme/ and enable it in system settings.
Comment 11 obnosim 2024-03-21 22:20:46 UTC
Created attachment 167576 [details]
Calendar view with plasma-test theme : notice white icons

Added a screenshot of the calendar view when using the modified plasma-test theme
Comment 12 obnosim 2024-03-21 22:22:30 UTC
Created attachment 167577 [details]
System tray window : notice magenta icons

Added another screenshot with the same theme but in another view: notice how the icons are now magenta
Comment 13 Nick 2024-03-22 08:48:44 UTC
Created attachment 167591 [details]
Cannot install Velours on Plasma 6

Hi - I'm still unable to install Velours on my Neon Plasma 6 system. I have tried the git method and the theme does not appear in the them selector after installation. Also, as you can see in this screenshot, it is not appearing in the "Download New Themes" selector. Did you install this theme on Plasma 5 and then upgrade? Perhaps there is some king of compatibility check happening on my fresh install Plasma 6 which is causing this to not install? Meanwhile let me try the test theme you have attached...
Comment 14 Nick 2024-03-22 08:54:19 UTC
Created attachment 167592 [details]
Cannot get test theme to install either

Hi - I think I'm at my knowledge limit here. I have installed your test theme into the correct folder (see screenshot) and logged out and in again but it still does not appear in the Plasma theme selector. I do wonder whether this is related (i.e. is Plasma somehow spotting an error in the theme format and blocking it)? Hoping someone else reading this bug might have some ideas.
Comment 15 Nick 2024-03-22 08:58:11 UTC
Created attachment 167593 [details]
Aha!

Hang-on, I've found it in Plasma Style. So, I have now switched to breeze dark theme and then selected your test style. See attached screenshot. No magenta icons in the system tray. Can you confirm I am testing this correctly, in which case I'll do some more tests to try to get your symptoms. Thanks.
Comment 16 obnosim 2024-03-22 21:20:53 UTC
Created attachment 167626 [details]
Fixed test theme

Oops, I had reverted the change to the colors file before creating the archive. Here is the version with the magenta icons. Sorry for having wasted your time.

Regarding my theme, yes, I have been using it continually since Plasma 4 and through Plasma 5 and I have now upgraded to Plasma 6 on the same system.
I have noticed that in Plasma 6, themes now have a metadata.json file rather than metadata.desktop, and a new plasmarc file which my theme does not have. This might be why it does not show up in the installer, I don't know; though store.kde.org does not currently have a separate section for Plasma 6 themes so who knows.
Comment 17 Nick 2024-03-23 08:42:45 UTC
Created attachment 167639 [details]
Test with updated theme

Hi - no problem. I've just installed your update theme and here's a screenshot of what I'm seeing. I'm still a little unclear as to the issue we are trying to duplicate here (that's down to my understanding of themes!) so based on my screenshot does this mean I have duplicated the symptoms you are seeing? Thanks, Nick.
Comment 18 obnosim 2024-03-23 14:01:21 UTC
Yes, your screenshot shows the problem, which is that some buttons pick their foreground color from one value in the colors file while other buttons pick theirs from another value.
Comment 19 Nick 2024-03-23 17:48:27 UTC
OK - I'll mark this one as confirmed in case a dev can take a look. I am able to duplicate the symptoms as per the original bug description and there is a sample theme to test with.
Comment 20 Nate Graham 2024-04-12 04:34:24 UTC
Perhaps the Plasma components need a similar fix as https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/389.