diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-23 23:11:08 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-23 23:11:08 +1000 |
| commit | f662717c0ab9a2a23fde199fb0bc79207fb641e8 (patch) | |
| tree | e4af220fc916f81dc7f07e421b3c1027b794b485 /modules/bar | |
| parent | nix: fix patch (diff) | |
| download | caelestia-shell-f662717c0ab9a2a23fde199fb0bc79207fb641e8.tar.gz caelestia-shell-f662717c0ab9a2a23fde199fb0bc79207fb641e8.tar.bz2 caelestia-shell-f662717c0ab9a2a23fde199fb0bc79207fb641e8.zip | |
popouts/network: better rescan loading
Diffstat (limited to 'modules/bar')
| -rw-r--r-- | modules/bar/popouts/Network.qml | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/modules/bar/popouts/Network.qml b/modules/bar/popouts/Network.qml index 966823e..35146aa 100644 --- a/modules/bar/popouts/Network.qml +++ b/modules/bar/popouts/Network.qml @@ -146,11 +146,11 @@ ColumnLayout { Layout.fillWidth: true implicitHeight: rescanBtn.implicitHeight + Appearance.padding.small * 2 - radius: Appearance.rounding.normal - color: Network.scanning ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3primaryContainer + radius: Appearance.rounding.full + color: Colours.palette.m3primaryContainer StateLayer { - color: Network.scanning ? Colours.palette.m3onSurface : Colours.palette.m3onPrimaryContainer + color: Colours.palette.m3onPrimaryContainer disabled: Network.scanning || !Network.wifiEnabled function onClicked(): void { @@ -160,30 +160,36 @@ ColumnLayout { RowLayout { id: rescanBtn + anchors.centerIn: parent spacing: Appearance.spacing.small + opacity: Network.scanning ? 0 : 1 MaterialIcon { id: scanIcon animate: true - text: Network.scanning ? "refresh" : "wifi_find" - color: Network.scanning ? Colours.palette.m3onSurface : Colours.palette.m3onPrimaryContainer - - RotationAnimation on rotation { - running: Network.scanning - loops: Animation.Infinite - from: 0 - to: 360 - duration: 1000 - } + text: "wifi_find" + color: Colours.palette.m3onPrimaryContainer } StyledText { - text: Network.scanning ? qsTr("Scanning...") : qsTr("Rescan networks") - color: Network.scanning ? Colours.palette.m3onSurface : Colours.palette.m3onPrimaryContainer + text: qsTr("Rescan networks") + color: Colours.palette.m3onPrimaryContainer + } + + Behavior on opacity { + Anim {} } } + + StyledBusyIndicator { + anchors.centerIn: parent + strokeWidth: Appearance.padding.small / 2 + bgColour: "transparent" + implicitHeight: parent.implicitHeight - Appearance.padding.smaller * 2 + running: Network.scanning + } } // Reset connecting state when network changes |