Bug 401012 - Keyboard Layout icon is barely visible in system tray settings when using a dark theme for Plasma
Summary: Keyboard Layout icon is barely visible in system tray settings when using a d...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-11-13 17:13 UTC by ariasuni
Modified: 2022-10-09 19:14 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments
Screenshot of Plasma with «bé» (white on black) and system tray settings («bé» written in white on white) (65.37 KB, image/png)
2018-11-13 17:13 UTC, ariasuni
Details
screenshot of plasma 5.18 beta (193.87 KB, image/png)
2020-01-16 20:36 UTC, Patrick Silva
Details
Screenshot on 5.26 master — bug not present (86.17 KB, image/png)
2022-09-30 12:29 UTC, Bharadwaj Raju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ariasuni 2018-11-13 17:13:32 UTC
Created attachment 116287 [details]
Screenshot of Plasma with «bé» (white on black) and system tray settings («bé» written in white on white)

When using a light theme for Plasma, the indicator use a dark font color, which is readable on the panel and in the settings.

When using a dark theme for Plasma, the indicator use a white font color, which is readable on the panel but not in the panel where it’s displayed on a white background.

STEPS TO REPRODUCE
1. Use Breeze Light
2. Check «Show layout indicator» and «Show label» in the tab Layouts of 

OBSERVED RESULT
Displays well on panel but barely visible in system tray settings.

EXPECTED RESULT
Displays well on both panel and system tray settings.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2
Comment 1 Patrick Silva 2019-02-21 16:03:18 UTC
Confirmed when I set look and feel to breeze and plasma theme to breeze dark.

Operating System: Arch Linux 
KDE Plasma Version: 5.15.1
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 2 Nate Graham 2020-01-15 20:31:18 UTC
Fixes now in Plasma 5.18.
Comment 3 ariasuni 2020-01-16 00:05:31 UTC
Thanks!
Comment 4 Patrick Silva 2020-01-16 20:36:16 UTC
Created attachment 125181 [details]
screenshot of plasma 5.18 beta

humm, it's still happening on Plasma 5.18. beta.

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0
Comment 5 Nate Graham 2020-01-16 20:43:08 UTC
Oh my mistake, I was looking at the IBus entry.
Comment 6 Konrad Materka 2020-05-27 08:01:03 UTC
Should be fixed in 5.19:
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/20
Comment 7 Patrick Silva 2020-06-09 21:03:00 UTC
This issue is still reproducible on X11 when Breeze global theme and Breeze Dark plasma style are used.

Operating System: Arch Linux 
KDE Plasma Version: 5.19.0
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Comment 8 Konrad Materka 2020-06-14 18:52:20 UTC
OK, I can confirm it but with Keyboard Layouts only.
Comment 9 Konrad Materka 2020-06-16 10:13:12 UTC
This is tricky.

For plasmoids/applets, icons are always defined by name. In that case it is easy to style them depending on context (e.g. dark plasma theme, light global theme).

For SNI (Status Notifier Item), that is used by all standalone applications, icon can be defined by name or using pixmap (image). Is it is a pixmap passed from the application there is nothing we can do.

Keyboard Layout is using pixmaps for language icons. As a result only one variant can be used - dark or light. It is not possible to style later.

The proper solution would be to define all icons by name. Then we can load styled variant depending on the context (panel or settings).
Comment 10 Nate Graham 2020-06-16 13:29:22 UTC
Boo, down with pixmaps. We should at least always use icon names for first-party tray items.
Comment 11 Nate Graham 2021-01-16 14:39:55 UTC
Aww man.

I just fixed this for the KCM in Bug 431361, an we now have the facilities for fixing it in the tray config window too by specifying that the color should be taken from the color scheme rather than the plasma theme. I'll see if I can fix it for the tray config window too.
Comment 12 Nate Graham 2021-01-16 14:44:46 UTC
Looked into it, and I don't think this is possible to fix with the current architecture. We would need to move to specifying per-language icon names as Konrad suggested.
Comment 13 Andrey 2021-01-16 20:03:21 UTC
(In reply to Konrad Materka from comment #9)
> The proper solution would be to define all icons by name. Then we can load
> styled variant depending on the context (panel or settings).
Hi there! Thanks for pinging me Nate.
There is ongoing discussion I started when faced with the icons problem for a new layout applet.
The idea is to add flags icons to Plasma icon's theme so it would comply with standard:
https://phabricator.kde.org/T13722
https://invent.kde.org/frameworks/breeze-icons/-/issues/1

Would it help for this particular problem?
Anyway, you are welcome to participate in the discussion because we are not come to the solution yet.

BTW, the new applet has always abstract static icon in systray settings, and I don't even know how to make it show text there.
But for me personally, it's even better - the actual layout is seen in systray anyway.
Please tell if you disagree, though.
Comment 14 ariasuni 2021-01-16 21:00:24 UTC
As you can see, the problem I’m reporting is not with flags but with arbitrary text, filled by default with the language code, that’s used to show which layout is used. I’ve configured two layouts mainly used for French language: fr(oss) (classic French azerty, for other people when they use my computer) and fr(bépo) (that I personally use), and I’m setting the last one’s name to «bé» so I can differentiate the two of them.
Comment 15 Andrey 2021-01-16 21:29:39 UTC
IIRC, this is not a problem any more because new applet ships in 5.21, and supposedly it will be default.
As stated above, it will always show just abstract static keyboard icon in the systray Settings, regardless what's actually displayed by applet in systray itself (in can be either layout's standard/custom text as configured in Keyboard KCM, or flag icon). That icon is rendered regardless of the text and should always be visible.
Old layout SNI will be disabled but still accessible for a while. See Bug 430661.
In the future, old SNI will be removed completely. So it's not worth the efforts to fix it any more IMO.

Having that, shall we close this bug, or am I understand something wrong still?
Comment 16 ariasuni 2021-01-16 21:51:50 UTC
Ah yes sorry. I tried Plasma Neon and indeed the new applet is using a correctly-colored icon in the settings window. I believe this bug should be closed after Bug 430661 is resolved, though.
Comment 17 Andrey 2021-01-16 21:53:48 UTC
Sure. Thanks for testing.
Comment 18 Andrey 2021-01-21 14:50:15 UTC
(In reply to ariasuni from comment #16)
> I believe this bug should be
> closed after Bug 430661 is resolved, though.

It is now, reopen if any questions.
Comment 19 Nate Graham 2021-01-21 14:55:40 UTC
That's not correct.

The old applet is still used on X11 for now because the new one was not ready, and this problem therefore still exists on X11. The old applet can't be unmaintained because we're shipping it in a release.
Comment 20 Andrey 2021-01-21 15:04:18 UTC
What I tried to tell here this problem probably wont ever be fixed for old applet it was reported for, and it doesn't exist for new one.
So it's little point to keep this bug open, IMO.
Comment 21 Nate Graham 2021-01-21 16:01:09 UTC
If we have the power to fix an issue but choose not to, the correct status is INTENTIONAL, not UNMAINTAINED.

So in terms of Bugzilla etiquette and protocol, we have two options:

1. Leave the bug open because it's theoretically possible that someone fixes it sometime in the next 4 months; if not, close it as RESOLVED FIXED once the old applet is deleted entirely and replaced with the new one.

2. Close the bug as RESOLVED INTENTIONAL now, and change that to RESOLVED FIXED once the old applet is deleted entirely and replaced with the new one.
Comment 22 Andrey 2021-01-21 16:28:36 UTC
Didn't notice INTENTIONAL, thanks for letting me know.
I think it's more proper but we'll have to return to this anyway.
Comment 23 Bharadwaj Raju 2022-09-30 12:29:33 UTC
Created attachment 152519 [details]
Screenshot on 5.26 master — bug not present

Cannot reproduce in 5.26 master. Icon is normal keyboard icon, even with dark Plasma + light app theme.
Comment 24 Nate Graham 2022-10-09 19:14:09 UTC
Yep, in the config window it's now always shown as its icon and not the text, which means this bug was fixed automatically.