summaryrefslogtreecommitdiff
path: root/modules/bar/components/StatusIcons.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 18:47:45 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 18:47:45 +1000
commit169450aa2e9d9058686aab0f7cf54b728ecd6efa (patch)
tree22b84e83831f975db86c676ef4716815f59ab10d /modules/bar/components/StatusIcons.qml
parentbar: increase spacing between pill content (diff)
downloadcaelestia-shell-169450aa2e9d9058686aab0f7cf54b728ecd6efa.tar.gz
caelestia-shell-169450aa2e9d9058686aab0f7cf54b728ecd6efa.tar.bz2
caelestia-shell-169450aa2e9d9058686aab0f7cf54b728ecd6efa.zip
feat: bar bluetooth devices
Diffstat (limited to 'modules/bar/components/StatusIcons.qml')
-rw-r--r--modules/bar/components/StatusIcons.qml38
1 files changed, 37 insertions, 1 deletions
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
+ }
+ }
+ }
}