mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
keyboard: Avoid using key.label for anything else than presentation
Do the finicky checks to adjust key widths and whatnot based on other values than the label. This makes the label exclusively used for presentation (i.e. setting up a St.Label). https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
This commit is contained in:
parent
5f6745cad0
commit
9cf2ec8bd2
1 changed files with 3 additions and 2 deletions
|
|
@ -849,7 +849,8 @@ var Keyboard = new Lang.Class({
|
|||
}
|
||||
|
||||
/* Fixup default keys based on the number of levels/keys */
|
||||
if (key.label == '⇧' && numLevels == 3) {
|
||||
if (switchToLevel == 1 && numLevels == 3) {
|
||||
// Hide shift key if the keymap has no uppercase level
|
||||
if (key.right) {
|
||||
/* Only hide the key actor, so the container still takes space */
|
||||
extraButton.keyButton.hide();
|
||||
|
|
@ -859,7 +860,7 @@ var Keyboard = new Lang.Class({
|
|||
extraButton.setWidth(1.5);
|
||||
} else if (key.right && numKeys > 8) {
|
||||
extraButton.setWidth(2);
|
||||
} else if (key.label == '⏎' && numKeys > 9) {
|
||||
} else if (keyval == Clutter.KEY_Return && numKeys > 9) {
|
||||
extraButton.setWidth(1.5);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue