More Warning fixes
This commit is contained in:
parent
b3972fd862
commit
aed728ec9c
2 changed files with 8 additions and 5 deletions
|
|
@ -49,8 +49,13 @@ Row {
|
||||||
if (!focusedWindow || !focusedWindow.appId)
|
if (!focusedWindow || !focusedWindow.appId)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
let icon = Quickshell.iconPath(DesktopEntries.byId(focusedWindow.appId).icon)
|
// DesktopEntries.byId may return null for unknown apps; guard accordingly
|
||||||
return icon || ""
|
if (typeof DesktopEntries === 'undefined' || !DesktopEntries.byId)
|
||||||
|
return ""
|
||||||
|
const entry = DesktopEntries.byId(focusedWindow.appId)
|
||||||
|
const iconName = entry && entry.icon ? entry.icon : ""
|
||||||
|
const iconPath = iconName ? Quickshell.iconPath(iconName) : ""
|
||||||
|
return iconPath || ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// A hidden text element to safely measure the full title width
|
// A hidden text element to safely measure the full title width
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ Loader {
|
||||||
sequences: ["Escape"]
|
sequences: ["Escape"]
|
||||||
enabled: root.active && !root.isClosing
|
enabled: root.active && !root.isClosing
|
||||||
onActivated: root.close()
|
onActivated: root.close()
|
||||||
context: Shortcut.WindowShortcut
|
context: Qt.WindowShortcut
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clicking outside of the rectangle to close
|
// Clicking outside of the rectangle to close
|
||||||
|
|
@ -158,8 +158,6 @@ Loader {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
root.scaleValue = 1.0
|
root.scaleValue = 1.0
|
||||||
root.opacityValue = 1.0
|
root.opacityValue = 1.0
|
||||||
// Ensure the panel window becomes the active window so window-scoped shortcuts work (Esc)
|
|
||||||
Qt.callLater(() => panelWindow.forceActiveFocus())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent closing when clicking in the panel bg
|
// Prevent closing when clicking in the panel bg
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue