Bug 249121 - Add support for both flag and label to keyboard layout indicator
Summary: Add support for both flag and label to keyboard layout indicator
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 267376 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-26 14:50 UTC by Andriy Rysin
Modified: 2011-10-27 08:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
full screen with label only (349.13 KB, image/jpeg)
2010-09-11 20:25 UTC, Thomas Caswell
Details
il label on dark theme (5.27 KB, image/png)
2010-09-11 20:26 UTC, Thomas Caswell
Details
us label on dark theme (7.16 KB, image/png)
2010-09-11 20:26 UTC, Thomas Caswell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Rysin 2010-08-26 14:50:29 UTC
Version:           unspecified (using Devel) 
OS:                Linux

In KDE 4.5.0 only label or flag is supported.
Add support for both flag and label to keyboard layout indicator

Reproducible: Always
Comment 1 Thomas Caswell 2010-09-11 19:37:48 UTC
I second this request.  

The default font color is dark which is hard to see on dark plamsa themes.  Using only flags is difficult when you have multiple variants of the same layout eg (us,us-dvp).
Comment 2 Andriy Rysin 2010-09-11 20:09:34 UTC
There's a shadow which should help with contrasting text. If it does not work right we might want to improve shadowing. Also you can change the label text when using same layout twice so that you can tell them apart.

In general I don't mind adding this feature but with better rendering but I won't have time to implement it any time soon so patches for this feature are welcome. :)
Comment 3 Thomas Caswell 2010-09-11 20:25:10 UTC
Created attachment 51547 [details]
full screen with label only
Comment 4 Thomas Caswell 2010-09-11 20:26:09 UTC
Created attachment 51548 [details]
il label on dark theme
Comment 5 Thomas Caswell 2010-09-11 20:26:46 UTC
Created attachment 51550 [details]
us label on dark theme
Comment 6 Thomas Caswell 2010-09-11 20:36:35 UTC
Fair enough.  I have attached images of the shadowing on a dark theme.  Zoomed in they look fine, but I have trouble reading them at normal size.  

I had been using the flag as a back ground for the text, ie the US flag with 'asd' on it for qwerty layout, the US flag with 'aoe' on it for a Dvorák layout and 'il' on an Israeli flag for the Hebrew layout.
Comment 7 Andriy Rysin 2010-09-11 20:42:17 UTC
Agree doesn't look very readable - I'll take a look if shadowing can be stronger.
Comment 8 Andriy Rysin 2010-09-21 17:03:45 UTC
(In reply to comment #5)
> Created an attachment (id=51550) [details]
> us label on dark theme

I've increased the text shadow radius from 2 to 4 (pushed both to trunk and 4.5 branch), please try and see if it looks readable now. Thanks.
Comment 9 Andriy Rysin 2011-03-01 13:50:35 UTC
*** Bug 267376 has been marked as a duplicate of this bug. ***
Comment 10 Dotan Cohen 2011-03-01 14:00:38 UTC
Hi Andriy. Using the text by itself is not enough. Reading and parsing text is much slower and more demanding than parsing an icon: that is why racecars still use manual gauges and even the Space Shuttle's glass cockpit simulates analogue gauges. I am currently using text-only as a workaround (as you mentioned in my dupe) but even with improved shadowing it is not ideal.

Thanks.
Comment 11 Andriy Rysin 2011-03-01 17:37:18 UTC
Dotan, I think reading and parsing text over striped and colored background probably would not be better
Comment 12 Dotan Cohen 2011-03-01 17:58:01 UTC
> Dotan, I think reading and parsing text over striped
> and colored background probably would not be better
>

Actually, it works for the following reasons:
1) The colours and shapes of the flag are easy to recognise from the corner of the eye without looking for them. For languages with a single layout one does not even need to find and parse the text, a quick glance in the System Tray's direction is sufficient.
2) For languages with multiple layouts the indicator can be found quickly due to having an icon (the flag itself).

The keyboard indicator is not like other System Tray icons which are rarely looked for. This one needs to be easy to spot, the user will look for it each time he begins typing.
Comment 13 nenad 2011-03-07 14:53:55 UTC
I use two variants of Serbian keyboard, so the option of having both flag and text label for a layout was really useful to me. I was very disappointed to see it abandoned. I hope you can bring it back - doesn't seem like too much hard work!
Comment 14 Andriy Rysin 2011-10-27 03:25:00 UTC
Git commit 314823a29b598ca2c4577028c43e2b756b4d7bb6 by Andriy Rysin.
Committed on 18/09/2011 at 16:28.
Pushed by rysin into branch 'master'.

Allow flag and label in keyboard layout indicator
FEATURE: 249121

M  +92   -28   kcontrol/keyboard/flags.cpp
M  +3    -0    kcontrol/keyboard/flags.h
M  +5    -6    kcontrol/keyboard/kcm_add_layout_dialog.cpp
M  +1    -1    kcontrol/keyboard/kcm_add_layout_dialog.h
M  +8    -1    kcontrol/keyboard/kcm_keyboard.ui
M  +17   -4    kcontrol/keyboard/kcm_keyboard_widget.cpp
M  +8    -8    kcontrol/keyboard/kcm_view_models.cpp
M  +9    -5    kcontrol/keyboard/keyboard_applet.cpp
M  +22   -3    kcontrol/keyboard/keyboard_config.cpp
M  +13   -1    kcontrol/keyboard/keyboard_config.h
M  +7    -0    kcontrol/keyboard/layout_memory.cpp
M  +1    -1    kcontrol/keyboard/layout_tray_icon.cpp
M  +1    -1    kcontrol/keyboard/layout_widget.cpp
M  +1    -1    kcontrol/keyboard/layouts_menu.cpp

http://commits.kde.org/kde-workspace/314823a29b598ca2c4577028c43e2b756b4d7bb6
Comment 15 Dotan Cohen 2011-10-27 06:56:12 UTC
Thank you Andriy!
Comment 16 Sander van Grieken 2011-10-27 08:18:58 UTC
Yeah thanks! Much appreciated..