From cfc0d42c7a3a913bb16f8221bdddd7e9c489fd67 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 26 Jan 2024 14:25:57 +0100 Subject: [PATCH] keyboard: Add/document "height" optional property This will allow OSK descriptions to declare "tall" keys. May be used in combination with the "start" property added in previous commits, in case a gap needs to be explicitly left. No OSK description uses this yet. Part-of: --- data/README.osk-layouts | 5 ++++- js/ui/keyboard.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/README.osk-layouts b/data/README.osk-layouts index 88e746e4d..8c58f62e4 100644 --- a/data/README.osk-layouts +++ b/data/README.osk-layouts @@ -63,7 +63,10 @@ it has the following structure: accepted. - width (Double): Relative width of the key in the row. 1 is for a square key. Multiples of 0.5 are - accepted. + accepted. The implicit default value is 1. + - height (Double): Relative height of the key in + the grid. The key will overflow downwards. Multiples + of 0.5 are accepted. The implicit default value is 1. - level (Integer): Level that the key switches to. See the levelSwitch action. - action (string): Action performed by the key, diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index bf6317840..56c8d585e 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1564,7 +1564,7 @@ export const Keyboard = GObject.registerClass({ if (key.action || key.keyval) button.keyButton.add_style_class_name('default-key'); - layout.appendKey(button, key.width, 1, key.leftOffset); + layout.appendKey(button, key.width, key.height, key.leftOffset); } }