Created attachment 134685 [details]
Screenshot of the bug
I just discovered that the Labels column in the Layouts tab of the Keyboard KCM is not empty, but shows layout labels colored in almost white, which makes them barely visible.
STEPS TO REPRODUCE
1. Open the Keyboard KCM
2. Go to the Layouts tab
3. Configure layouts to show labels without flags
Label demos are barely visible
Label demos are black
Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Created attachment 134756 [details]
Looks good to me
Weird, it looks fine to me (see attached screenshot).
Are you using a non-default or customized color scheme?
I use what is now called Breeze Twilight: Breeze for apps, Breeze Dark for Plasma.
Can confirm now. The KCM must be using the text color from the Plasma theme, somehow. Will see if I can fix it.
Found it. The problem is in Flags::drawLabel(), in plasma-desktop/kcms/keyboard/flags.cpp
const QColor textColor = flagShown ? Qt::black : Plasma::Theme().color(Plasma::Theme::TextColor);
This is appropriate when the label is being drawn on a Plasma widget, but this code is re-used for drawing the flag or text in the KCM too, which is not appropriate.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/294
Git commit e6e11758d255afa78cc0e11ecb1e044d30a25c86 by Nate Graham.
Committed on 15/01/2021 at 19:56.
Pushed by ngraham into branch 'master'.
[kcms/keyboard] Use correct color for layout label in KCM
The label was always using the text color from the Plasma theme, which
just happened to work fine as long you were using the same colors for
both your Plasma and Apps colors (e.g. both dark or both light). But
when using one dark and the other light, the text would become
This is resolved by adding a paremeter to the function that allows it to
specify whether it should get its text color from the Plasma theme or
apps color scheme. Then the function invocation for the tray item asks
for the Plasma theme color and the invocation in the KCM asks for the
apps color scheme color.
M +12 -4 kcms/keyboard/flags.cpp
M +7 -2 kcms/keyboard/flags.h
M +1 -1 kcms/keyboard/kcm_view_models.cpp
M +1 -1 kcms/keyboard/layout_tray_icon.cpp
Same bug in system tray settings, see bug 401012