mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
TrayMenu: use live menu model for dynamic tray state (#1957)
This commit is contained in:
@@ -169,7 +169,8 @@ PopupWindow {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!opener.children || opener.children.values.length === 0) {
|
||||
const hasEntries = opener.children && ((opener.children.count ?? -1) > 0 || (opener.children.values && opener.children.values.length > 0));
|
||||
if (!hasEntries) {
|
||||
//Logger.w("TrayMenu", "Menu not ready, delaying show")
|
||||
Qt.callLater(() => showAt(item, x, y));
|
||||
return;
|
||||
@@ -254,7 +255,7 @@ PopupWindow {
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
model: opener.children ? [...opener.children.values] : []
|
||||
model: opener.children
|
||||
|
||||
delegate: Rectangle {
|
||||
id: entry
|
||||
|
||||
Reference in New Issue
Block a user