move network/bluetooth refresh + active tracking into applets, fix dock parent.expanded

This commit is contained in:
Damocles 2026-04-25 22:52:28 +02:00
parent c96856581d
commit 02910957f1
7 changed files with 11 additions and 9 deletions

View file

@ -5,6 +5,9 @@ Column {
id: root
required property color accentColor
property bool active: true
onActiveChanged: if (active)
S.BluetoothService.refresh()
Repeater {
model: S.BluetoothService.devices

View file

@ -5,6 +5,9 @@ Column {
id: root
required property color accentColor
property bool active: true
onActiveChanged: if (active)
S.NetworkService.refresh()
Repeater {
model: S.NetworkService.networks

View file

@ -251,7 +251,7 @@ PanelWindow {
devices: S.SystemStats.tempDevices
accentColor: root._accent
deviceFilter: S.Modules.temperature.device || ""
active: parent.parent.expanded
active: parent.expanded
}
}
@ -296,6 +296,7 @@ PanelWindow {
C.NetworkApplet {
width: parent.width
accentColor: root._accent
active: parent.expanded
}
}
@ -310,6 +311,7 @@ PanelWindow {
C.BluetoothApplet {
width: parent.width
accentColor: root._accent
active: parent.expanded
}
}

View file

@ -89,9 +89,10 @@ Rectangle {
}
}
// Content area
// Content area - expanded propagated so children can bind `active: parent.expanded`
Column {
id: _contentColumn
property bool expanded: root.expanded
anchors.top: _header.bottom
anchors.topMargin: 4
width: parent.width

View file

@ -54,9 +54,6 @@ M.BarModule {
}
}
on_ShowPanelChanged: if (_showPanel)
S.BluetoothService.refresh()
Connections {
target: S.BluetoothService
function onDevicesChanged() {

View file

@ -56,9 +56,6 @@ M.BarModule {
readonly property string state: S.NetworkService.state
on_ShowPanelChanged: if (_showPanel)
S.NetworkService.refresh()
Connections {
target: S.NetworkService
function onNetworksChanged() {