diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 18:47:45 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 18:47:45 +1000 |
| commit | 169450aa2e9d9058686aab0f7cf54b728ecd6efa (patch) | |
| tree | 22b84e83831f975db86c676ef4716815f59ab10d /modules | |
| parent | bar: increase spacing between pill content (diff) | |
| download | caelestia-shell-169450aa2e9d9058686aab0f7cf54b728ecd6efa.tar.gz caelestia-shell-169450aa2e9d9058686aab0f7cf54b728ecd6efa.tar.bz2 caelestia-shell-169450aa2e9d9058686aab0f7cf54b728ecd6efa.zip | |
feat: bar bluetooth devices
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/bar/Pills.qml | 8 | ||||
| -rw-r--r-- | modules/bar/components/Clock.qml | 2 | ||||
| -rw-r--r-- | modules/bar/components/StatusIcons.qml | 38 |
3 files changed, 42 insertions, 6 deletions
diff --git a/modules/bar/Pills.qml b/modules/bar/Pills.qml index 814643a..042e9c1 100644 --- a/modules/bar/Pills.qml +++ b/modules/bar/Pills.qml @@ -35,9 +35,9 @@ Item { vertical: BarConfig.vertical anchors.left: root.get(osIcon.right, undefined) - anchors.leftMargin: root.get(Appearance.padding.normal, 0) + anchors.leftMargin: root.get(Appearance.padding.large, 0) anchors.top: root.get(undefined, osIcon.bottom) - anchors.topMargin: root.get(0, Appearance.padding.normal) + anchors.topMargin: root.get(0, Appearance.padding.large) anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter) anchors.verticalCenter: root.get(parent.verticalCenter, undefined) @@ -70,9 +70,9 @@ Item { StatusIcons { anchors.left: root.get(clock.right, undefined) - anchors.leftMargin: root.get(Appearance.padding.normal, 0) + anchors.leftMargin: root.get(Appearance.padding.large, 0) anchors.top: root.get(undefined, clock.bottom) - anchors.topMargin: root.get(0, Appearance.padding.normal) + anchors.topMargin: root.get(0, Appearance.padding.large) anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter) anchors.verticalCenter: root.get(parent.verticalCenter, undefined) diff --git a/modules/bar/components/Clock.qml b/modules/bar/components/Clock.qml index 91e978c..c4764a5 100644 --- a/modules/bar/components/Clock.qml +++ b/modules/bar/components/Clock.qml @@ -19,7 +19,7 @@ StyledRect { prevAnchor: icon horizontalAlignment: StyledText.AlignHCenter - text: root.vertical ? Time.format("hh\nmm") : Time.format("dd/MM/yy hh:mm") + text: root.vertical ? Time.format("hh\nmm") : Time.format("hh:mm • dddd, dd MMMM") font.pointSize: Appearance.font.size.smaller font.family: Appearance.font.family.mono color: root.colour diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml index d3df67d..dd63fc6 100644 --- a/modules/bar/components/StatusIcons.qml +++ b/modules/bar/components/StatusIcons.qml @@ -3,6 +3,7 @@ import "root:/services" import "root:/utils" import "root:/config" import QtQuick +import QtQuick.Controls StyledRect { id: root @@ -10,9 +11,44 @@ StyledRect { readonly property color colour: Appearance.colours.rosewater MaterialIcon { - id: icon + id: network + animate: true text: Icons.getNetworkIcon(Network.active.strength) color: root.colour } + + AnchorText { + id: bluetooth + + prevAnchor: network + + animate: true + text: Bluetooth.powered ? "bluetooth" : "bluetooth_disabled" + color: root.colour + font.family: Appearance.font.family.material + font.pointSize: Appearance.font.size.larger + } + + BoxLayout { + anchors.left: vertical ? undefined : bluetooth.right + anchors.leftMargin: vertical ? 0 : Appearance.padding.smaller + anchors.top: vertical ? bluetooth.bottom : undefined + anchors.topMargin: vertical ? Appearance.padding.smaller : 0 + + anchors.horizontalCenter: vertical ? bluetooth.horizontalCenter : undefined + anchors.verticalCenter: vertical ? undefined : bluetooth.verticalCenter + + Repeater { + model: Bluetooth.connected + + MaterialIcon { + required property Bluetooth.Device modelData + + animate: true + text: Icons.getBluetoothIcon(modelData.icon) + color: root.colour + } + } + } } |