diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 13:31:36 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 13:31:36 +0800 |
| commit | 01b38be6afbe660e3b9f9e136870a76afb69bf31 (patch) | |
| tree | a18c46b9d8fb0261addeadb89ca2a8ebd22f0ccc /modules/bar/components/StatusIcons.qml | |
| parent | dashboard: default weather (diff) | |
| download | caelestia-shell-01b38be6afbe660e3b9f9e136870a76afb69bf31.tar.gz caelestia-shell-01b38be6afbe660e3b9f9e136870a76afb69bf31.tar.bz2 caelestia-shell-01b38be6afbe660e3b9f9e136870a76afb69bf31.zip | |
internal: fix binding loops
Diffstat (limited to 'modules/bar/components/StatusIcons.qml')
| -rw-r--r-- | modules/bar/components/StatusIcons.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml index 62823e0..14c02f9 100644 --- a/modules/bar/components/StatusIcons.qml +++ b/modules/bar/components/StatusIcons.qml @@ -5,12 +5,15 @@ import "root:/config" import Quickshell import QtQuick -StyledRect { +Item { id: root + readonly property bool vertical: parent?.vertical ?? false property color colour: Colours.palette.rosewater clip: true + implicitWidth: vertical ? Math.max(network.implicitWidth, bluetooth.implicitWidth, devices.implicitWidth) : network.implicitWidth + bluetooth.implicitWidth + bluetooth.anchors.leftMargin + (repeater.count > 0 ? devices.implicitWidth + devices.anchors.leftMargin : 0) + implicitHeight: vertical ? network.implicitHeight + bluetooth.implicitHeight + bluetooth.anchors.topMargin + (repeater.count > 0 ? devices.implicitHeight + devices.anchors.topMargin : 0) : Math.max(network.implicitHeight, bluetooth.implicitHeight, devices.implicitHeight) MaterialIcon { id: network @@ -35,6 +38,8 @@ StyledRect { } Box { + id: devices + anchors.left: vertical ? undefined : bluetooth.right anchors.leftMargin: vertical ? 0 : Appearance.padding.smaller anchors.top: vertical ? bluetooth.bottom : undefined @@ -44,6 +49,8 @@ StyledRect { anchors.verticalCenter: vertical ? undefined : bluetooth.verticalCenter Repeater { + id: repeater + model: ScriptModel { values: Bluetooth.devices.filter(d => d.connected) } |