Refine quickshell bar and Noctalia compatibility

This commit is contained in:
Ryan Hughes
2026-05-14 02:21:48 -04:00
parent 5086654d51
commit 7d2745b6a6
28 changed files with 1096 additions and 699 deletions
@@ -8,14 +8,18 @@ Menu {
id: root
property var model: []
signal triggered(string action)
// Noctalia passes the owning ShellScreen through here. Qt Quick Controls
// Menu doesn't need it, but accepting the property keeps plugin QML from
// failing at load time.
property var screen: null
signal triggered(var action, var item)
Instantiator {
model: root.model
delegate: MenuItem {
required property var modelData
text: modelData ? String(modelData.label || modelData.action || "") : ""
onTriggered: root.triggered(modelData ? String(modelData.action || "") : "")
onTriggered: root.triggered(modelData ? String(modelData.action || "") : "", modelData)
}
onObjectAdded: function(index, object) { root.insertItem(index, object) }
onObjectRemoved: function(index, object) { root.removeItem(object) }