Bug 444864

Summary: No option to overlay label over flag anymore
Product: [Plasma] plasmashell Reporter: David Chmelik <dchmelik>
Component: Keyboard LayoutAssignee: Nate Graham <nate>
Status: RESOLVED FIXED    
Severity: normal CC: butirsky, nate
Priority: NOR Keywords: regression
Version: 5.23.0   
Target Milestone: 1.0   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In: 5.26

Description David Chmelik 2021-11-03 03:13:54 UTC
SUMMARY
The keyboard layout indicator used to be good/usable, but lately it's not.  It used to let you have a label you wrote over a flag (though not choose the flag, which it should've).  Now you can't have both, and can't write your own label in case you use two keyboard layouts from one country.  I use US, US international with dead keys, for UK characters, which I labelled usi but would be easier if I could have over UK flag, and sometimes I've used Greek, which you should be able to abbreviate in their own language as el/Ελ (for Ellada, their name.)

STEPS TO REPRODUCE
1. Start KDE after upgrade.
2. check keyboard layout indicator.
3. Became third-rate, removing your labels and not allowing both flag and label, leading to confusion about which you're using.

OBSERVED RESULT
Downgraded layout indicator.  I can no longer tell whether I'm using US or US international keyboard layout--absolutely useless.

EXPECTED RESULT
Should let you use your own label on a flag, and because some people use international layouts more intended for other country's characters (like get UK characters with US keyboard or vice versa) let you choose the flag that best represents the international layout.  My parents' KDE Neon PC had the same setup with us & usi (and French, German, Russian) but never noticed the difference between 'US' layouts (because of forced flag) then had problems typing (and similarly you should be able to write de and Cyrillic ru for these others.)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Slackware64-current / 5.23.2
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2021-11-08 19:42:04 UTC
One issue per bug report please. :) Let's use this one to track the inability to overlay the label on top of the flag.

As for custom text, the new applet does actually respect custom text set in the KCM. You have to set it in the KCM, though. You can do this by double-clicking on the "Label" cell in the table. There, you can set whatever text you want. I just confirmed that this works for me.

This is a fairly crummy and undiscoverable UI, though. Can you file a separate bug report about that? You can file it to systemsettings | key_keyboard. Thanks!
Comment 2 Andrey 2021-11-08 20:46:19 UTC
(In reply to Nate Graham from comment #1)
> As for custom text, the new applet does actually respect custom text set in
> the KCM. You have to set it in the KCM, though. You can do this by
> double-clicking on the "Label" cell in the table. There, you can set
> whatever text you want. I just confirmed that this works for me.
> 
> This is a fairly crummy and undiscoverable UI, though. 
Sorry, this is the result of a quick and dirty refactoring of the KCM UI that was needed, I was not able to do proper design at the time..
I hope it will be addressed when we switch to QML in that KCM.
Also, maybe move the setting of custom labels to the applet, as it belong to it exclusively.. 
But yes, let's discuss it in a separate bug/thread.
Comment 3 Andrey 2021-11-10 17:24:59 UTC
(In reply to David Chmelik from comment #0)
> sometimes I've used Greek,
> which you should be able to abbreviate in their own language as el/Ελ (for
> Ellada, their name.)
Please check if you can abbreviate the label in Greek as Nate showed above.
Comment 4 David Chmelik 2021-11-12 02:21:52 UTC
I don't know what KCM is--in technical writing you're supposed to define abbreviations before you use them, no matter how simple, if they haven't been used before.
Comment 5 Nate Graham 2021-11-12 02:23:35 UTC
Sorry. "KCM" == "KDE Control Module" == "Page in System Settings"
Comment 6 David Chmelik 2021-11-12 02:37:50 UTC
I was able to add label Ελ where the flag was displayed but the letters weren't, so this isn't actually a bug, but as you said, hard to find...
Comment 7 Andrey 2021-11-12 10:51:22 UTC
Nice, thanks you.
I think we now could add label over flag feature too, so it makes sense to track that and "hard to find" in different bugs..
Are you willing to file one?
Comment 8 David Chmelik 2022-08-11 16:34:51 UTC
(In reply to Nate Graham from comment #1)
> One issue per bug report please. :) Let's use this one to track the
> inability to overlay the label on top of the flag.
That was a (and for me, #1) main aspect but became focused on my minor afterthought of non-Latin/-English alphabet usage Andrey replied then asked (re)open keyboard layout indicator flag with text issue, so I did (duplicate besides afterthought not in above steps nor observed & expected results).

> This is a fairly crummy and undiscoverable UI, though. Can you file a
> separate bug report about that? You can file it to systemsettings |
> key_keyboard. Thanks!

You mean that the label column contains flag (normally) but text only when selected?  I suppose.  I memorized so no issue but agree is to others (whom you haven't told) so will report that.
Comment 9 Nate Graham 2022-08-11 17:34:58 UTC
*** Bug 457708 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2022-09-08 20:50:01 UTC
Working on this.
Comment 11 Bug Janitor Service 2022-09-08 22:02:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1131
Comment 12 Fushan Wen 2022-09-12 16:26:07 UTC
Git commit 971dc0a219031504da20a6a38b477387a02cc660 by Fushan Wen, on behalf of Nate Graham.
Committed on 12/09/2022 at 16:18.
Pushed by fusionfuture into branch 'master'.

applets/keyboardlayout: re-introduce "label+flag" display style option

This feature got lost in the QML port and is re-added here.

The old version of the feature drew the label on top of the flag with no
background, thereby making the label appear invisible for certain flags.
To alleviate this, the new implementation draws the label on a badge in
the corner, like the Battery & Brightness widget does.

Because this changes the format of the setting that controls the display
style (going from a bool to an enum), an update script is provided to
migrate people's old settings as needed.
FIXED-IN: 5.26

M  +9    -1    applets/keyboardlayout/contents/config/main.xml
M  +43   -4    applets/keyboardlayout/contents/ui/configGeneral.qml
M  +16   -3    applets/keyboardlayout/contents/ui/main.qml
A  +33   -0    desktoppackage/contents/updates/keyboardlayout_migrateiconsetting.js

https://invent.kde.org/plasma/plasma-desktop/commit/971dc0a219031504da20a6a38b477387a02cc660