diff options
Diffstat (limited to 'modules/system/quickshell/ConnectivityBox.qml')
| -rw-r--r-- | modules/system/quickshell/ConnectivityBox.qml | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/modules/system/quickshell/ConnectivityBox.qml b/modules/system/quickshell/ConnectivityBox.qml index e1fb03f..384aff2 100644 --- a/modules/system/quickshell/ConnectivityBox.qml +++ b/modules/system/quickshell/ConnectivityBox.qml @@ -14,19 +14,23 @@ Squircle { ColumnLayout { anchors.fill: parent anchors.margins: 12 - spacing: 0 // Using spacers for better control + spacing: 0 - // WiFi Row Item { Layout.fillWidth: true height: 50 scale: wifiArea.pressed ? 0.96 : 1.0 - Behavior on scale { NumberAnimation { duration: 150; easing.type: Easing.OutCubic } } + Behavior on scale { + NumberAnimation { + duration: 150 + easing.type: Easing.OutCubic + } + } RowLayout { anchors.fill: parent spacing: 12 - + IconCircle { source: "network-wireless" active: Networking.wifiEnabled @@ -46,14 +50,16 @@ Squircle { } Text { text: { - const vs = Networking.devices?.values || [] + const vs = Networking.devices?.values || []; for (const device of vs) { if (device.scannerEnabled !== undefined) { - const nets = device.networks?.values || [] - for (const n of nets) if (n.connected) return n.name + const nets = device.networks?.values || []; + for (const n of nets) + if (n.connected) + return n.name; } } - return Networking.wifiEnabled ? "On" : "Off" + return Networking.wifiEnabled ? "On" : "Off"; } color: Theme.textMuted font.pixelSize: 12 @@ -71,19 +77,23 @@ Squircle { } } - Item { Layout.fillHeight: true } // Spacer + //Item { Layout.fillHeight: true } - // Bluetooth Row Item { Layout.fillWidth: true height: 50 scale: btArea.pressed ? 0.96 : 1.0 - Behavior on scale { NumberAnimation { duration: 150; easing.type: Easing.OutCubic } } + Behavior on scale { + NumberAnimation { + duration: 150 + easing.type: Easing.OutCubic + } + } RowLayout { anchors.fill: parent spacing: 12 - + IconCircle { source: "bluetooth-active" active: Bluetooth.defaultAdapter?.enabled ?? false |
