From 169450aa2e9d9058686aab0f7cf54b728ecd6efa Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 29 Apr 2025 18:47:45 +1000 Subject: feat: bar bluetooth devices --- modules/bar/components/StatusIcons.qml | 38 +++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'modules/bar/components/StatusIcons.qml') 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 + } + } + } } -- cgit v1.2.3-freya