Keymap: key size, combos and hints settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-29 15:00:14 +01:00
1 parent 9efb66fe5e
commit 2a5374936b
2 files changed
+45 -7

No files matched your search

+4 -2
View File
@@ -32,7 +32,8 @@ Panel {
// Board geometry in key units. // Board geometry in key units.
readonly property real unitsW: layoutKeys.reduce((m, k) => Math.max(m, k.x + 1), 0) readonly property real unitsW: layoutKeys.reduce((m, k) => Math.max(m, k.x + 1), 0)
readonly property real unitsH: layoutKeys.reduce((m, k) => Math.max(m, k.y + 1), 0) + 0.2 readonly property real unitsH: layoutKeys.reduce((m, k) => Math.max(m, k.y + 1), 0) + 0.2
readonly property real unit: Math.min(Style.space(66), unitsW > 0 ? (card.availableCardWidth - card.padding * 2) / unitsW : Style.space(66)) readonly property real keySize: Style.space(Math.max(36, Math.min(120, Number(setting("keySize", 66)) || 66)))
readonly property real unit: Math.min(keySize, unitsW > 0 ? (card.availableCardWidth - card.padding * 2) / unitsW : keySize)
readonly property real gap: Math.max(3, Math.round(unit * 0.07)) readonly property real gap: Math.max(3, Math.round(unit * 0.07))
readonly property int cardWidth: Math.max(Style.space(560), Math.ceil(unitsW * unit)) + card.padding * 2 readonly property int cardWidth: Math.max(Style.space(560), Math.ceil(unitsW * unit)) + card.padding * 2
@@ -495,7 +496,7 @@ Panel {
Column { Column {
width: parent.width width: parent.width
spacing: Style.spacing.lg spacing: Style.spacing.lg
visible: root.combos.length > 0 || root.layerCombos.length > 0 visible: root.setting("showCombos", true) !== false && (root.combos.length > 0 || root.layerCombos.length > 0)
Rectangle { Rectangle {
width: parent.width width: parent.width
@@ -655,6 +656,7 @@ Panel {
Text { Text {
width: parent.width width: parent.width
visible: root.setting("showHints", true) !== false
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
text: "Arrow keys or 0–" + Math.min(9, root.layers.length) + " switch layers · R refresh · checks the repo every " + (root.service ? root.service.checkMinutes : 2) + " min" text: "Arrow keys or 0–" + Math.min(9, root.layers.length) + " switch layers · R refresh · checks the repo every " + (root.service ? root.service.checkMinutes : 2) + " min"
color: Qt.alpha(Color.foreground, 0.32) color: Qt.alpha(Color.foreground, 0.32)
+41 -5
View File
@@ -26,14 +26,20 @@
"branch": "", "branch": "",
"path": "", "path": "",
"checkMinutes": 2, "checkMinutes": 2,
"startView": "overview" "startView": "overview",
"keySize": 66,
"showCombos": true,
"showHints": true
}, },
"schema": [ "schema": [
{ {
"key": "background", "key": "background",
"label": "Background", "label": "Background",
"description": "pill: the button sits on a round pill; transparent: just the icon.", "description": "pill: the button sits on a round pill; transparent: just the icon.",
"choices": ["pill", "transparent"], "choices": [
"pill",
"transparent"
],
"defaultValue": "pill" "defaultValue": "pill"
}, },
{ {
@@ -60,16 +66,46 @@
{ {
"key": "checkMinutes", "key": "checkMinutes",
"type": "integer", "type": "integer",
"label": "Check for changes every (minutes)", "label": "Check for changes every",
"description": "A git ls-remote, so frequent checks are cheap. The sheet also checks when you open it.", "description": "A git ls-remote, so frequent checks are cheap. The sheet also checks when you open it.",
"defaultValue": 2 "defaultValue": 2,
"min": 1,
"max": 60,
"unit": "min"
}, },
{ {
"key": "startView", "key": "startView",
"label": "Opens on", "label": "Opens on",
"description": "Overview shows every layer on one keyboard; Base shows the first layer on its own.", "description": "Overview shows every layer on one keyboard; Base shows the first layer on its own.",
"choices": ["overview", "base"], "choices": [
"overview",
"base"
],
"defaultValue": "overview" "defaultValue": "overview"
},
{
"key": "keySize",
"type": "integer",
"label": "Key size",
"description": "Size of one key on the sheet. It shrinks by itself when the screen is too narrow.",
"min": 44,
"max": 96,
"unit": "px",
"defaultValue": 66
},
{
"key": "showCombos",
"type": "boolean",
"label": "Show combos",
"description": "List the combos (and layers you reach by holding two) under the keyboard.",
"defaultValue": true
},
{
"key": "showHints",
"type": "boolean",
"label": "Show keyboard hints",
"description": "The line at the bottom with the keys that switch layers.",
"defaultValue": true
} }
] ]
} }