Render Omarchy menu icon with Omarchy font
This commit is contained in:
@@ -410,6 +410,7 @@ Item {
|
||||
itemId: "dmenu." + i,
|
||||
kind: "dmenu",
|
||||
icon: "",
|
||||
iconFont: "",
|
||||
label: label,
|
||||
target: "",
|
||||
detail: "",
|
||||
@@ -932,6 +933,7 @@ Item {
|
||||
required property string itemId
|
||||
required property string kind
|
||||
required property string icon
|
||||
required property string iconFont
|
||||
required property string label
|
||||
required property string target
|
||||
required property string detail
|
||||
@@ -964,7 +966,7 @@ Item {
|
||||
visible: row.hasIcon
|
||||
text: row.icon
|
||||
color: row.hasCursor ? root.selectedText : root.foreground
|
||||
font.family: root.fontFamily
|
||||
font.family: row.iconFont.length > 0 ? row.iconFont : root.fontFamily
|
||||
font.pixelSize: Style.font.iconLarge
|
||||
width: Style.space(36)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
@@ -38,6 +38,7 @@ function normalizeItem(id, raw) {
|
||||
parent: parent,
|
||||
kind: kind,
|
||||
icon: value.icon || "",
|
||||
iconFont: value.iconFont || "",
|
||||
label: value.label || id,
|
||||
target: value.target || "",
|
||||
keywords: normalizeKeywords(id, aliases, value.keywords),
|
||||
@@ -95,7 +96,7 @@ function mergeMenuSources(defaultItems, userItems) {
|
||||
}
|
||||
|
||||
if (!nextItems.root) {
|
||||
nextItems.root = { id: "root", parent: "", kind: "menu", icon: "", label: "Go", target: "", keywords: "", description: "", aliases: [], when: "", checked: "", action: "", provider: "" }
|
||||
nextItems.root = { id: "root", parent: "", kind: "menu", icon: "", iconFont: "", label: "Go", target: "", keywords: "", description: "", aliases: [], when: "", checked: "", action: "", provider: "" }
|
||||
nextOrder.unshift("root")
|
||||
}
|
||||
for (var k3 = 0; k3 < nextOrder.length; k3++) nextItems[nextOrder[k3]].order = k3
|
||||
@@ -253,6 +254,7 @@ function displayRow(items, itemOrder, checkedResults, entry, detail, score, sect
|
||||
itemId: entry.id,
|
||||
kind: entry.kind,
|
||||
icon: entry.icon,
|
||||
iconFont: entry.iconFont || "",
|
||||
label: labelFor(entry, checkedResults),
|
||||
target: target,
|
||||
detail: detail || "",
|
||||
|
||||
Reference in New Issue
Block a user