bar modules own active state, fix circular effectiveVisible deadlock in BarGroup
This commit is contained in:
parent
7eaa50327f
commit
7e594b7f8d
24 changed files with 52 additions and 73 deletions
|
|
@ -12,32 +12,14 @@ M.BarModule {
|
|||
spacing: S.Theme.moduleSpacing + 2
|
||||
cursorShape: Qt.ArrowCursor
|
||||
|
||||
// Workaround: Qt 6 compiled bindings break on `visible` when the expression
|
||||
// references Repeater.count on a Row-derived component. The binding silently
|
||||
// dies (imperative overwrite by the engine) and never re-evaluates. Routing
|
||||
// through a custom property forces the interpreted binding path, which works.
|
||||
property bool _shouldBeVisible: S.Modules.tray.enable && _trayRepeater.count > 0
|
||||
visible: _shouldBeVisible
|
||||
active: S.Modules.tray.enable && _trayRepeater.count > 0
|
||||
|
||||
required property var bar
|
||||
property var _activeMenu: null
|
||||
|
||||
// --- debug logging (remove once tray is confirmed working) ---
|
||||
on_ShouldBeVisibleChanged: console.log("[TrayModule] _shouldBeVisible:", _shouldBeVisible, "actual visible:", visible)
|
||||
Component.onCompleted: console.log("[TrayModule] created, enable:", S.Modules.tray.enable, "repeater count:", _trayRepeater.count)
|
||||
onVisibleChanged: console.log("[TrayModule] visible:", visible, "enable:", S.Modules.tray.enable, "count:", _trayRepeater.count)
|
||||
Connections {
|
||||
target: _trayRepeater
|
||||
function onCountChanged() {
|
||||
console.log("[TrayModule] repeater count:", _trayRepeater.count, "visible:", root.visible, "shouldBe:", S.Modules.tray.enable && _trayRepeater.count > 0);
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: SystemTray.items
|
||||
function onValuesChanged() {
|
||||
console.log("[TrayModule] model valuesChanged, values.length:", SystemTray.items.values.length, "repeater count:", _trayRepeater.count);
|
||||
}
|
||||
}
|
||||
onActiveChanged: console.log("[TrayModule] active:", active, "count:", _trayRepeater.count)
|
||||
onVisibleChanged: console.log("[TrayModule] visible:", visible)
|
||||
|
||||
Repeater {
|
||||
id: _trayRepeater
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue