From 57669bca1b249f7cb8274becbb242cb0417b795c Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 14 Feb 2020 18:11:43 +0100 Subject: [PATCH] keyboard: Specify symbolic icons to use in default keys The style classes are not removed yet, might make sense to do that if they don't bring anything wrt theming. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2214 --- js/ui/keyboard.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index a4a4f2fa2..635d9b12e 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -24,29 +24,29 @@ const SHOW_KEYBOARD = 'screen-keyboard-enabled'; const KEY_SIZE = 2; const defaultKeysPre = [ - [[], [], [{ width: 1.5, level: 1, extraClassName: 'shift-key-lowercase' }], [{ label: '?123', width: 1.5, level: 2 }]], - [[], [], [{ width: 1.5, level: 0, extraClassName: 'shift-key-uppercase' }], [{ label: '?123', width: 1.5, level: 2 }]], + [[], [], [{ width: 1.5, level: 1, extraClassName: 'shift-key-lowercase', icon: 'keyboard-shift-filled-symbolic' }], [{ label: '?123', width: 1.5, level: 2 }]], + [[], [], [{ width: 1.5, level: 0, extraClassName: 'shift-key-uppercase', icon: 'keyboard-shift-filled-symbolic' }], [{ label: '?123', width: 1.5, level: 2 }]], [[], [], [{ label: '=/<', width: 1.5, level: 3 }], [{ label: 'ABC', width: 1.5, level: 0 }]], [[], [], [{ label: '?123', width: 1.5, level: 2 }], [{ label: 'ABC', width: 1.5, level: 0 }]], ]; const defaultKeysPost = [ - [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], - [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], - [{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], - [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], - [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], - [{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], - [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], - [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], + [[{ width: 1.5, keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic' }], + [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic' }], + [{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase', icon: 'keyboard-shift-filled-symbolic' }], + [{ action: 'emoji', icon: 'face-smile-symbolic' }, { action: 'languageMenu', extraClassName: 'layout-key', icon: 'keyboard-layout-filled-symbolic' }, { action: 'hide', extraClassName: 'hide-key', icon: 'go-down-symbolic' }]], + [[{ width: 1.5, keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic' }], + [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic' }], + [{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase', icon: 'keyboard-shift-filled-symbolic' }], + [{ action: 'emoji', icon: 'face-smile-symbolic' }, { action: 'languageMenu', extraClassName: 'layout-key', icon: 'keyboard-layout-filled-symbolic' }, { action: 'hide', extraClassName: 'hide-key', icon: 'go-down-symbolic' }]], + [[{ width: 1.5, keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic' }], + [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic' }], [{ label: '=/<', width: 3, level: 3, right: true }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], - [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], - [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], + [{ action: 'emoji', icon: 'face-smile-symbolic' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], + [[{ width: 1.5, keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic' }], + [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic' }], [{ label: '?123', width: 3, level: 2, right: true }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], + [{ action: 'emoji', icon: 'face-smile-symbolic' }, { action: 'languageMenu', extraClassName: 'layout-key', icon: 'keyboard-layout-filled-symbolic' }, { action: 'hide', extraClassName: 'hide-key', icon: 'go-down-symbolic' }]], ]; var AspectContainer = GObject.registerClass( @@ -1035,7 +1035,7 @@ var EmojiSelection = GObject.registerClass({ section.button = key; } - key = new Key(null, []); + key = new Key(null, [], 'go-down-symbolic'); key.keyButton.add_style_class_name('default-key'); key.keyButton.add_style_class_name('hide-key'); key.connect('released', () => {