fix
This commit is contained in:
@@ -232,6 +232,15 @@ Item {
|
||||
manager.closePowerMenu();
|
||||
}
|
||||
|
||||
function resolveTrayIconSource(iconValue) {
|
||||
const normalized = String(iconValue || "").trim();
|
||||
if (normalized.length === 0)
|
||||
return "";
|
||||
if (normalized.indexOf("/") >= 0 || normalized.indexOf("file://") === 0)
|
||||
return normalized;
|
||||
return String(Quickshell.iconPath(normalized, true) || "");
|
||||
}
|
||||
|
||||
function handleKey(key) {
|
||||
switch (key) {
|
||||
case Qt.Key_Up:
|
||||
@@ -343,6 +352,7 @@ Item {
|
||||
visible: !root.inSubmenu && index >= root.scrollOffset && index < root.scrollOffset + root.visibleRows
|
||||
|
||||
property var trayItem: modelData
|
||||
readonly property string trayIconSource: root.resolveTrayIconSource(trayItem ? trayItem.icon : "")
|
||||
|
||||
Text {
|
||||
x: root.textStartX
|
||||
@@ -366,7 +376,7 @@ Item {
|
||||
x: 182
|
||||
y: 8 + 14
|
||||
implicitSize: root.iconSize
|
||||
source: trayItem ? trayItem.icon : ""
|
||||
source: trayIconSource
|
||||
asynchronous: true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user