More menu tweaks
This commit is contained in:
@@ -67,7 +67,7 @@ Item {
|
|||||||
property int dividerHeight: 17
|
property int dividerHeight: 17
|
||||||
property bool searchDivider: false
|
property bool searchDivider: false
|
||||||
property int layoutSerial: 0
|
property int layoutSerial: 0
|
||||||
property int cardWidth: Math.min(root.activeMenu === "trigger.capture.screenrecord" ? 520 : 300, panel.width - 48)
|
property int cardWidth: Math.min((root.activeMenu === "trigger.capture.screenrecord" || root.activeMenu === "style.font") ? 520 : 300, panel.width - 48)
|
||||||
property int visibleRowsHeight: rowListHeight(layoutSerial, displayModel.count, filterText, searchDivider)
|
property int visibleRowsHeight: rowListHeight(layoutSerial, displayModel.count, filterText, searchDivider)
|
||||||
property int cardHeight: Math.min(Math.max(220, contentMargin * 2 + headerHeight + contentSpacing + visibleRowsHeight), panel.height - 48)
|
property int cardHeight: Math.min(Math.max(220, contentMargin * 2 + headerHeight + contentSpacing + visibleRowsHeight), panel.height - 48)
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ Item {
|
|||||||
readonly property var providers: ({
|
readonly property var providers: ({
|
||||||
"fonts": {
|
"fonts": {
|
||||||
script: "current=$(omarchy-font-current 2>/dev/null); omarchy-font-list 2>/dev/null | while read -r f; do [[ -z $f ]] && continue; printf '%s\\t%s\\t%s\\n' \"$f\" \"$f\" \"$current\"; done",
|
script: "current=$(omarchy-font-current 2>/dev/null); omarchy-font-list 2>/dev/null | while read -r f; do [[ -z $f ]] && continue; printf '%s\\t%s\\t%s\\n' \"$f\" \"$f\" \"$current\"; done",
|
||||||
icon: "",
|
icon: "",
|
||||||
actionFor: function(value) { return "omarchy-font-set '" + value.replace(/'/g, "'\\''") + "'" },
|
actionFor: function(value) { return "omarchy-font-set '" + value.replace(/'/g, "'\\''") + "'" },
|
||||||
keywordsFor: function(value) { return value + " typeface" }
|
keywordsFor: function(value) { return value + " typeface" }
|
||||||
},
|
},
|
||||||
@@ -275,14 +275,13 @@ Item {
|
|||||||
var current = parts[2] || ""
|
var current = parts[2] || ""
|
||||||
if (!label) continue
|
if (!label) continue
|
||||||
var id = menuId + "." + root.slugify(value)
|
var id = menuId + "." + root.slugify(value)
|
||||||
var displayLabel = (value === current) ? (label + " ✓") : label
|
|
||||||
if (!root.items[id]) nextOrder.push(id)
|
if (!root.items[id]) nextOrder.push(id)
|
||||||
root.items[id] = {
|
root.items[id] = {
|
||||||
id: id,
|
id: id,
|
||||||
parent: menuId,
|
parent: menuId,
|
||||||
kind: "action",
|
kind: "action",
|
||||||
icon: spec.icon || "",
|
icon: (value === current) ? "✓" : (spec.icon || ""),
|
||||||
label: displayLabel,
|
label: label,
|
||||||
target: "",
|
target: "",
|
||||||
keywords: spec.keywordsFor(value),
|
keywords: spec.keywordsFor(value),
|
||||||
description: "",
|
description: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user