Bug 244145 - keyboard layout indicator no longer shows label when flag icons is enabled
Summary: keyboard layout indicator no longer shows label when flag icons is enabled
Status: RESOLVED FIXED
Alias: None
Product: kxkb
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
: 247374 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-10 19:21 UTC by Sander van Grieken
Modified: 2010-08-26 18:58 UTC (History)
3 users (show)

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


Attachments
Snapshot: changing label for keyboard layout works in 4.5 (70.29 KB, image/png)
2010-08-19 07:17 UTC, Andriy Rysin
Details
snapshot of choosing/defining keyboard layout (83.40 KB, image/png)
2010-08-19 21:35 UTC, Freek de Kruijf
Details
window to add a keyboard layout (22.34 KB, image/png)
2010-08-19 21:38 UTC, Freek de Kruijf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sander van Grieken 2010-07-10 19:21:53 UTC
Version:           unspecified (using Devel) 
OS:                Linux

keyboard layout indicator no longer shows label when flag icons is enabled. I have two keyboard layouts, both use the same map, but have different labels (in my case 'us' and 'intl')

KDE4.4 used to print the label on top of the flag, but KDE4.5 4.4.90 does not. 

Reproducible: Didn't try

Steps to Reproduce:
- go to keyboard settings
- create 2 layouts, using the same map (=> same flag), but using a different label
- enable the 'show layout indicator' checkbox
- enable the 'show flag' checkbox
- switch between keyboard layouts and observe the system tray icon 

Actual Results:  
unable to differentiate between active keyboard layouts

Expected Results:  
label printed on top of layout map-flag to be able to distinguish between layouts
Comment 1 Andriy Rysin 2010-07-24 22:36:32 UTC
It was changed intentionally. Why do you want to use flags if both are the same?
Comment 2 Sander van Grieken 2010-08-01 10:53:19 UTC
The flags, even though the same, are also an icon for the indicator in the system tray. Without icon it looks a bit weird in the tray..

But esthetics aside, both 'show ..' options are checkboxes, suggesting both are possible at the same time. If you want to keep this new behaviour (I very much hope not) they should become radiobuttons.
Comment 3 Martin Brodbeck 2010-08-11 09:34:05 UTC
I use the German qwertz layout as well as the variant Neo 2. I appreciated in the past that both the flag and the label are shown in the keyboard layout indicator. But now I can only see the flag which doesn't of course change while switching the two layouts (so I can't distinguish the two) or I can see the rather ugly text labels.

I would very much appreciate if you would switch to the old behaviour, so that it is possible - optionally - that both flag and label are shown in the keyboard layout indicator.
Comment 4 Christoph Feck 2010-08-11 16:13:10 UTC
*** Bug 247374 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Murach 2010-08-16 18:23:42 UTC
The same is valid for me. I regularly use two different German layouts, so it would be really nice to have the flag with label on it back. I would propose another option in kde system settings to enable the combination of flag and label or otherwise have flag OR label.

Thanks for your attention! Best regards,
Thomas
Comment 6 Freek de Kruijf 2010-08-16 21:14:51 UTC
The option of having a flag OR label is already there.

However, since the last update, I no longer can change the label. So not choosing the flag gives me two equal labels.
Comment 7 Sander van Grieken 2010-08-16 21:19:36 UTC
I can confirm that. The label is editable, but not saved when pressing enter.
Comment 8 Andriy Rysin 2010-08-19 07:17:24 UTC
Created attachment 50720 [details]
Snapshot: changing label for keyboard layout works in 4.5
Comment 9 Andriy Rysin 2010-08-19 07:20:24 UTC
Hmm, changing the label works for me - I've attached the snapshot above.

Having flag-only and label-only should suffice taking to account one can change label. Though currently I agree UI is not very straightforward, it should have been radiobuttons - I'll take care of it in 4.6.

I'll also consider adding "old" mode flag+label though it feels redundant to me at the moment and displaying text over flag reliably is quite tricky (as flags differ quite a lot in sizes and colors).
Comment 10 Martin Brodbeck 2010-08-19 08:24:31 UTC
I would really appreciate the old behavior (flag+label). Using different layouts in the same country is the reason for it.

By the way, changing the label works here, as long as the length of it is <= 3 characters. If you type in more, it just resets to the previous label.
Comment 11 Sander van Grieken 2010-08-19 16:20:23 UTC
IMO it´s not redundant (see reasons above), and not tricky (old behaviour worked great). I have never seen problems with flag size, and there should be plenty of options available for blending in KDE, see for instance how desktop icons are handled, with various effects and text shadow and such.

You mentioned that it was changed intentionally. Can you point us to a mailing list discussion where that issue was discussed?
Comment 12 Andriy Rysin 2010-08-19 16:48:16 UTC
I had announced my plans in May when keyboard2 moved the kdereview and the only note was from David, but he didn't reiterate after the move was made:
http://lists.kde.org/?l=kde-core-devel&m=127291088506998&w=2

It seems there's several issues here:
1) checkbox "show flag" is misleading - should be radiobutton
2) with label-only mode users can change the label to tell variants apart, but that may be not obvious (but I think that should be an issue even if the flag is shown as if layout is the same the flag AND default label will be the same - that's same as in 4.4)
3) people say labels are "somewhat" ugly :), but personally I think they look way better than in 4.4, and now some more reasonable code (borrowed from plasma) is used for shading letters instead of old-hacky-way-visible-only-on-some-flags, so if we add back "label-over-flag" mode the letters appearance won't change back (they just be overlayed on flag) and that may look ugly, unless font is reduced or some other tricks are implemented

so what I am thinking to go ahead with:
1) change "show flag" checkbox with radiobuttons
2) improve a way to tell users they can change labels if same layout with different variants used (not sure exactly how to do that, may be change default label if same layout added twice, but then if I had a reliable way to autogenerate unique and reasonable label for such cases I'd just do it automatically and don't confuse users with label editing)
3) add label-over-flag radiobutton, but I would wait for this and see if 1) and 2) help the problem

In any case if 1) and 2) can be considered for 4.5, 3) won't happen until 4.6
Comment 13 Freek de Kruijf 2010-08-19 21:35:59 UTC
Created attachment 50759 [details]
snapshot of choosing/defining keyboard layout

On this window I can't find any possibility to change the label.
Comment 14 Freek de Kruijf 2010-08-19 21:38:07 UTC
Created attachment 50760 [details]
window to add a keyboard layout

Adding a new layout does not have this possibility of defining a label either
Comment 15 Andriy Rysin 2010-08-19 23:31:12 UTC
(In reply to comment #13)
> Created an attachment (id=50759) [details]
> snapshot of choosing/defining keyboard layout
> 
> On this window I can't find any possibility to change the label.

You double-click on label cell to start editing (same as for variant) - that's what I was talking about in 2) - marking the cell as editable should help here, I just need to find out how. Also adding label field to the "add" dialog seems like a good idea.
Comment 16 Freek de Kruijf 2010-08-20 09:34:05 UTC
To edit the label I tried to click RMB on that field, obviously I did not try to double-click. For me RMB is more natural; it should give you the possible actions on that field.
Comment 17 Sander van Grieken 2010-08-20 10:24:15 UTC
Thanks for the thorough response Andriy

Too bad you didn´t get more feedback in the list. I wish I was subscribed to kde-core-devel back then :) But now that it´s in a stable release my guess is there will be more voters for this bug once 4.5 hits the mainstream distros..

My comments on your points:
1) agreed
2) maybe a small edit toolbutton inside the label cell? Then it´s a matter of a simple single left-click. The input box should however limit the input to 3, so we don´t get false ´cant edit label´ reports, as seen above. Maybe also increase the limit to 4 chars.
3) if you re-introduce the label + flag option, you should go back to using checkboxes again.

Additionally, if you detect 2 variants using the same map, you could show a popup when pressing Ok/Apply suggesting to use the ´show label´ option.

That said, I STILL think the old behaviour should be an option :) At least users can decide for themselves if it suits them (we´re not Gnome!). I am willing to help improve the blending code to make it more independent from the flag colors.
Comment 18 Andriy Rysin 2010-08-21 00:46:13 UTC
I've pushed a change (both trunk and 4.5) to make "show flag"/"show label" radiobuttons to make it more explicit.

(In reply to comment #17)
> 3) if you re-introduce the label + flag option, you should go back to using
> checkboxes again.
I think that even in this case 3 radiobuttons will be better, as two checboxes allow 4th combination "neither is checked" which we don't want
Comment 19 Andriy Rysin 2010-08-26 15:01:27 UTC
So I've introduced some improvements for label only to be useful (via more explicit UI to edit labels):
* changed checkbox 'show flag' to radio buttons: 'show flag'/'show label'
* added "label" edit in the 'add layout' dialog (it's visible if label mode is on)
* added 'single-click on selected cell to edit' flag so it's easier to trigger
* also now label text in the table doesn't show if 'flag' mode is selected

I've also added a separate bug to track adding 'flag+label' option: https://bugs.kde.org/show_bug.cgi?id=249121 (this won't happen at least till 4.6)

I've also added a separate bug to track adding automatic unique label suggestion if same layout added twice: https://bugs.kde.org/show_bug.cgi?id=249122 (this may happen in 4.5 branch - not sure yet)
Comment 20 Andriy Rysin 2010-08-26 15:03:30 UTC
SVN commit 1168344 by rysin:

kcm_keyboard UI improvements to remove confusion about flag/label mode work
BUG: 244145
FIXED-IN: 4.5.1


 M  +17 -0     kcm_add_layout_dialog.cpp  
 M  +26 -2     kcm_add_layout_dialog.ui  
 M  +10 -3     kcm_keyboard_widget.cpp  
 M  +57 -2     kcm_view_models.cpp  
 M  +18 -2     kcm_view_models.h  
 M  +2 -0      x11_helper.cpp  
 M  +2 -0      x11_helper.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1168344
Comment 21 Andriy Rysin 2010-08-26 15:04:09 UTC
SVN commit 1168345 by rysin:

kcm_keyboard UI improvements to remove confusion about flag/label mode work
BUG: 244145


 M  +17 -0     kcm_add_layout_dialog.cpp  
 M  +26 -2     kcm_add_layout_dialog.ui  
 M  +10 -3     kcm_keyboard_widget.cpp  
 M  +57 -2     kcm_view_models.cpp  
 M  +18 -2     kcm_view_models.h  
 M  +2 -0      x11_helper.cpp  
 M  +2 -0      x11_helper.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1168345
Comment 22 Andriy Rysin 2010-08-26 15:05:44 UTC
BTW I could not find a nice and easy way to indicate editable cells and there seems to be no standard way to do it. If I find how to do it I may add this later.
Comment 23 Christoph Feck 2010-08-26 18:43:38 UTC
There seems to be a confusion about the commit that made this bug "fixed". The commit only clarified that it is currently not possible to enable both the icon as well as the text label in the system tray indicator.

Bug 249121 has been opened by the author as a new request.
Comment 24 Andriy Rysin 2010-08-26 18:58:00 UTC
Thanks for clarification Christoph!

Yes this bug is closed as UI now clearly indicates two things:
1) it's not possible to have both flag & label
2) in 'label' mode, the label is editable so if same layout used twice you can still have different labels shown in the indicator

If you want 'flag+label' mode you can follow Bug 249121, though better don't just wait but send patches which reliably and nicely draw the label over any flag. :)