1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

settings: fix network refresh button animation behavior

fixes #1258
This commit is contained in:
bbedward
2026-01-03 14:37:27 -05:00
parent 2bf85bc4dd
commit f3f720bb37
2 changed files with 80 additions and 24 deletions

View File

@@ -15,3 +15,4 @@ This file is more of a quick reference so I know what to account for before next
- new IPC targets
- Initial RTL support/i18n
- Theme registry
- Notification persistence & history

View File

@@ -587,16 +587,30 @@ Item {
spacing: Theme.spacingS
DankIcon {
id: wiredLoadIcon
name: "sync"
size: 16
color: Theme.surfaceVariantText
RotationAnimation on rotation {
SequentialAnimation {
running: NetworkService.networkWiredInfoLoading
loops: Animation.Infinite
from: 0
to: 360
duration: 1000
NumberAnimation {
target: wiredLoadIcon
property: "opacity"
to: 0.3
duration: 400
easing.type: Easing.InOutQuad
}
NumberAnimation {
target: wiredLoadIcon
property: "opacity"
to: 1.0
duration: 400
easing.type: Easing.InOutQuad
}
onRunningChanged: if (!running)
wiredLoadIcon.opacity = 1.0
}
}
@@ -757,17 +771,8 @@ Item {
DankActionButton {
iconName: "refresh"
buttonSize: 32
visible: NetworkService.wifiEnabled && !NetworkService.wifiToggling
enabled: !NetworkService.isScanning
visible: NetworkService.wifiEnabled && !NetworkService.wifiToggling && !NetworkService.isScanning
onClicked: NetworkService.scanWifi()
RotationAnimation on rotation {
running: NetworkService.isScanning
loops: Animation.Infinite
from: 0
to: 360
duration: 1000
}
}
DankToggle {
@@ -956,17 +961,31 @@ Item {
spacing: Theme.spacingS
DankIcon {
name: "refresh"
id: scanningIcon
name: "wifi_find"
size: 32
color: Theme.surfaceVariantText
anchors.horizontalCenter: parent.horizontalCenter
RotationAnimation on rotation {
running: true
SequentialAnimation {
running: NetworkService.isScanning
loops: Animation.Infinite
from: 0
to: 360
duration: 1000
NumberAnimation {
target: scanningIcon
property: "opacity"
to: 0.3
duration: 400
easing.type: Easing.InOutQuad
}
NumberAnimation {
target: scanningIcon
property: "opacity"
to: 1.0
duration: 400
easing.type: Easing.InOutQuad
}
onRunningChanged: if (!running)
scanningIcon.opacity = 1.0
}
}
@@ -1241,16 +1260,30 @@ Item {
spacing: Theme.spacingS
DankIcon {
id: wifiInfoLoadIcon
name: "sync"
size: 16
color: Theme.surfaceVariantText
RotationAnimation on rotation {
SequentialAnimation {
running: NetworkService.networkInfoLoading
loops: Animation.Infinite
from: 0
to: 360
duration: 1000
NumberAnimation {
target: wifiInfoLoadIcon
property: "opacity"
to: 0.3
duration: 400
easing.type: Easing.InOutQuad
}
NumberAnimation {
target: wifiInfoLoadIcon
property: "opacity"
to: 1.0
duration: 400
easing.type: Easing.InOutQuad
}
onRunningChanged: if (!running)
wifiInfoLoadIcon.opacity = 1.0
}
}
@@ -1707,9 +1740,31 @@ Item {
spacing: Theme.spacingS
DankIcon {
id: vpnLoadIcon
name: "sync"
size: 16
color: Theme.surfaceVariantText
SequentialAnimation {
running: VPNService.configLoading
loops: Animation.Infinite
NumberAnimation {
target: vpnLoadIcon
property: "opacity"
to: 0.3
duration: 400
easing.type: Easing.InOutQuad
}
NumberAnimation {
target: vpnLoadIcon
property: "opacity"
to: 1.0
duration: 400
easing.type: Easing.InOutQuad
}
onRunningChanged: if (!running)
vpnLoadIcon.opacity = 1.0
}
}
StyledText {