diff --git a/quickshell/Modals/Greeter/GreeterDoctorPage.qml b/quickshell/Modals/Greeter/GreeterDoctorPage.qml index 5d9b904e..73c29c7c 100644 --- a/quickshell/Modals/Greeter/GreeterDoctorPage.qml +++ b/quickshell/Modals/Greeter/GreeterDoctorPage.qml @@ -61,26 +61,22 @@ Item { border.color: Theme.primary opacity: 0 - SequentialAnimation on opacity { + OpacityAnimator on opacity { running: root.isRunning loops: Animation.Infinite - NumberAnimation { - from: 0.8 - to: 0 - duration: 1500 - easing.type: Easing.OutQuad - } + from: 0.8 + to: 0 + duration: 1500 + easing.type: Easing.OutQuad } - SequentialAnimation on scale { + ScaleAnimator on scale { running: root.isRunning loops: Animation.Infinite - NumberAnimation { - from: 0.5 - to: 1.5 - duration: 1500 - easing.type: Easing.OutQuad - } + from: 0.5 + to: 1.5 + duration: 1500 + easing.type: Easing.OutQuad } } @@ -95,26 +91,22 @@ Item { border.color: Theme.secondary opacity: 0 - SequentialAnimation on opacity { + OpacityAnimator on opacity { running: root.isRunning loops: Animation.Infinite - NumberAnimation { - from: 0.8 - to: 0 - duration: 1500 - easing.type: Easing.OutQuad - } + from: 0.8 + to: 0 + duration: 1500 + easing.type: Easing.OutQuad } - SequentialAnimation on scale { + ScaleAnimator on scale { running: root.isRunning loops: Animation.Infinite - NumberAnimation { - from: 0.3 - to: 1.3 - duration: 1500 - easing.type: Easing.OutQuad - } + from: 0.3 + to: 1.3 + duration: 1500 + easing.type: Easing.OutQuad } } diff --git a/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml b/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml index 3cd2da2d..b03e2969 100644 --- a/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/BluetoothDetail.qml @@ -449,7 +449,7 @@ Rectangle { size: 24 color: Qt.rgba(Theme.surfaceText.r || 0.8, Theme.surfaceText.g || 0.8, Theme.surfaceText.b || 0.8, 0.4) - RotationAnimation on rotation { + RotationAnimator on rotation { running: parent.visible loops: Animation.Infinite from: 0 diff --git a/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml b/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml index 3814343c..cc27dcea 100644 --- a/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/NetworkDetail.qml @@ -178,7 +178,7 @@ Rectangle { size: 32 color: Theme.primary - RotationAnimation on rotation { + RotationAnimator on rotation { running: NetworkService.wifiToggling loops: Animation.Infinite from: 0 @@ -494,7 +494,7 @@ Rectangle { size: 48 color: Qt.rgba(Theme.surfaceText.r || 0.8, Theme.surfaceText.g || 0.8, Theme.surfaceText.b || 0.8, 0.3) - RotationAnimation on rotation { + RotationAnimator on rotation { running: wifiScanningOverlay.visible loops: Animation.Infinite from: 0 diff --git a/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml b/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml index c4434e6c..bce02dd1 100644 --- a/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml +++ b/quickshell/Modules/DankBar/Popouts/SystemUpdatePopout.qml @@ -148,19 +148,16 @@ DankPopout { opacity: enabled ? 1.0 : 0.5 onClicked: SystemUpdateService.checkForUpdates() - RotationAnimation { - target: refreshButton - property: "rotation" + RotationAnimator on rotation { from: 0 to: 360 duration: 1000 - running: SystemUpdateService.isChecking loops: Animation.Infinite + running: SystemUpdateService.isChecking onRunningChanged: { - if (!running) { + if (!running) refreshButton.rotation = 0; - } } } } diff --git a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml index ac53c3fe..db7114da 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml @@ -73,20 +73,17 @@ BasePill { return root.isActive ? Theme.primary : Theme.surfaceText; } - RotationAnimation { + RotationAnimator on rotation { id: rotationAnimation - target: statusIcon - property: "rotation" from: 0 to: 360 duration: 1000 - running: root.isChecking loops: Animation.Infinite + running: root.isChecking onRunningChanged: { - if (!running) { + if (!running) statusIcon.rotation = 0; - } } } } @@ -130,20 +127,17 @@ BasePill { return root.isActive ? Theme.primary : Theme.surfaceText; } - RotationAnimation { + RotationAnimator on rotation { id: rotationAnimationHorizontal - target: statusIconHorizontal - property: "rotation" from: 0 to: 360 duration: 1000 - running: root.isChecking loops: Animation.Infinite + running: root.isChecking onRunningChanged: { - if (!running) { + if (!running) statusIconHorizontal.rotation = 0; - } } } } diff --git a/quickshell/Modules/DankDash/WeatherTab.qml b/quickshell/Modules/DankDash/WeatherTab.qml index c699fcf8..510f6746 100644 --- a/quickshell/Modules/DankDash/WeatherTab.qml +++ b/quickshell/Modules/DankDash/WeatherTab.qml @@ -192,7 +192,7 @@ Item { onTriggered: refreshButtonTwo.isRefreshing = false } - NumberAnimation on rotation { + RotationAnimator on rotation { running: refreshButtonTwo.isRefreshing from: 0 to: 360 @@ -930,7 +930,7 @@ Item { onTriggered: refreshButton.isRefreshing = false } - NumberAnimation on rotation { + RotationAnimator on rotation { running: refreshButton.isRefreshing from: 0 to: 360 diff --git a/quickshell/Modules/Lock/LockScreenContent.qml b/quickshell/Modules/Lock/LockScreenContent.qml index 1a5bb5d7..be2d6c21 100644 --- a/quickshell/Modules/Lock/LockScreenContent.qml +++ b/quickshell/Modules/Lock/LockScreenContent.qml @@ -1025,7 +1025,7 @@ Item { color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9) } - RotationAnimation on rotation { + RotationAnimator on rotation { running: pam.passwd.active && !root.unlocking loops: Animation.Infinite duration: Anims.durLong diff --git a/quickshell/Modules/Notepad/NotepadTextEditor.qml b/quickshell/Modules/Notepad/NotepadTextEditor.qml index f989caa5..3d92d696 100644 --- a/quickshell/Modules/Notepad/NotepadTextEditor.qml +++ b/quickshell/Modules/Notepad/NotepadTextEditor.qml @@ -525,13 +525,13 @@ Column { SequentialAnimation on opacity { running: textArea.activeFocus loops: Animation.Infinite - PropertyAnimation { + OpacityAnimator { from: 1.0 to: 0.0 duration: 650 easing.type: Easing.InOutQuad } - PropertyAnimation { + OpacityAnimator { from: 0.0 to: 1.0 duration: 650 diff --git a/quickshell/Modules/Settings/KeybindsTab.qml b/quickshell/Modules/Settings/KeybindsTab.qml index 6bf5d547..ba46d9bd 100644 --- a/quickshell/Modules/Settings/KeybindsTab.qml +++ b/quickshell/Modules/Settings/KeybindsTab.qml @@ -344,11 +344,7 @@ Item { return I18n.tr("%1 exists but is not included in config. Custom keybinds will not work until this is fixed.").arg(bindsFile); if (warningBox.showWarning) { const count = warningBox.status.overriddenBy; - return I18n.ntr( - "%1 DMS bind may be overridden by config binds that come after the include.", - "%1 DMS binds may be overridden by config binds that come after the include.", - count - ).arg(count); + return I18n.ntr("%1 DMS bind may be overridden by config binds that come after the include.", "%1 DMS binds may be overridden by config binds that come after the include.", count).arg(count); } return ""; } @@ -543,13 +539,11 @@ Item { StyledText { text: { - if (KeybindsService.loading) - return I18n.tr("Shortcuts"); - const count = keybindsTab._filteredBinds.length; - return count === 1 - ? I18n.tr("Shortcut (%1)").arg(count) - : I18n.tr("Shortcuts (%1)").arg(count); - } + if (KeybindsService.loading) + return I18n.tr("Shortcuts"); + const count = keybindsTab._filteredBinds.length; + return count === 1 ? I18n.tr("Shortcut (%1)").arg(count) : I18n.tr("Shortcuts (%1)").arg(count); + } font.pixelSize: Theme.fontSizeMedium font.weight: Font.Medium color: Theme.surfaceText @@ -569,7 +563,7 @@ Item { color: Theme.primary anchors.verticalCenter: parent.verticalCenter - RotationAnimation on rotation { + RotationAnimator on rotation { from: 0 to: 360 duration: 1000 diff --git a/quickshell/Modules/Settings/NetworkTab.qml b/quickshell/Modules/Settings/NetworkTab.qml index ace8adc2..a229314e 100644 --- a/quickshell/Modules/Settings/NetworkTab.qml +++ b/quickshell/Modules/Settings/NetworkTab.qml @@ -36,36 +36,36 @@ Item { function normalizePinList(value) { if (Array.isArray(value)) - return value.filter(v => v) + return value.filter(v => v); if (typeof value === "string" && value.length > 0) - return [value] - return [] + return [value]; + return []; } function getPinnedWifiNetworks() { - const pins = SettingsData.wifiNetworkPins || {} - return normalizePinList(pins["preferredWifi"]) + const pins = SettingsData.wifiNetworkPins || {}; + return normalizePinList(pins["preferredWifi"]); } function toggleWifiPin(ssid) { - const pins = JSON.parse(JSON.stringify(SettingsData.wifiNetworkPins || {})) - let pinnedList = normalizePinList(pins["preferredWifi"]) - const pinIndex = pinnedList.indexOf(ssid) + const pins = JSON.parse(JSON.stringify(SettingsData.wifiNetworkPins || {})); + let pinnedList = normalizePinList(pins["preferredWifi"]); + const pinIndex = pinnedList.indexOf(ssid); if (pinIndex !== -1) { - pinnedList.splice(pinIndex, 1) + pinnedList.splice(pinIndex, 1); } else { - pinnedList.unshift(ssid) + pinnedList.unshift(ssid); if (pinnedList.length > maxPinnedWifiNetworks) - pinnedList = pinnedList.slice(0, maxPinnedWifiNetworks) + pinnedList = pinnedList.slice(0, maxPinnedWifiNetworks); } if (pinnedList.length > 0) - pins["preferredWifi"] = pinnedList + pins["preferredWifi"] = pinnedList; else - delete pins["preferredWifi"] + delete pins["preferredWifi"]; - SettingsData.set("wifiNetworkPins", pins) + SettingsData.set("wifiNetworkPins", pins); } LazyLoader { @@ -340,9 +340,7 @@ Item { if (devices.length === 0) return I18n.tr("No adapters"); if (connected === 0) - return devices.length === 1 - ? I18n.tr("%1 adapter, none connected").arg(devices.length) - : I18n.tr("%1 adapters, none connected").arg(devices.length); + return devices.length === 1 ? I18n.tr("%1 adapter, none connected").arg(devices.length) : I18n.tr("%1 adapters, none connected").arg(devices.length); return I18n.tr("%1 connected").arg(connected); } font.pixelSize: Theme.fontSizeSmall @@ -658,16 +656,14 @@ Item { SequentialAnimation { running: NetworkService.networkWiredInfoLoading loops: Animation.Infinite - NumberAnimation { + OpacityAnimator { target: wiredLoadIcon - property: "opacity" to: 0.3 duration: 400 easing.type: Easing.InOutQuad } - NumberAnimation { + OpacityAnimator { target: wiredLoadIcon - property: "opacity" to: 1.0 duration: 400 easing.type: Easing.InOutQuad @@ -1046,16 +1042,14 @@ Item { SequentialAnimation { running: NetworkService.isScanning loops: Animation.Infinite - NumberAnimation { + OpacityAnimator { target: scanningIcon - property: "opacity" to: 0.3 duration: 400 easing.type: Easing.InOutQuad } - NumberAnimation { + OpacityAnimator { target: scanningIcon - property: "opacity" to: 1.0 duration: 400 easing.type: Easing.InOutQuad @@ -1087,14 +1081,14 @@ Item { let sorted = [...networks]; sorted.sort((a, b) => { - const aPinnedIndex = pinnedList.indexOf(a.ssid) - const bPinnedIndex = pinnedList.indexOf(b.ssid) + const aPinnedIndex = pinnedList.indexOf(a.ssid); + const bPinnedIndex = pinnedList.indexOf(b.ssid); if (aPinnedIndex !== -1 || bPinnedIndex !== -1) { if (aPinnedIndex === -1) - return 1 + return 1; if (bPinnedIndex === -1) - return -1 - return aPinnedIndex - bPinnedIndex + return -1; + return aPinnedIndex - bPinnedIndex; } if (a.ssid === ssid) return -1; @@ -1297,7 +1291,7 @@ Item { buttonSize: 28 iconColor: isPinned ? Theme.primary : Theme.surfaceVariantText onClicked: { - networkTab.toggleWifiPin(modelData.ssid) + networkTab.toggleWifiPin(modelData.ssid); } } @@ -1375,16 +1369,14 @@ Item { SequentialAnimation { running: NetworkService.networkInfoLoading loops: Animation.Infinite - NumberAnimation { + OpacityAnimator { target: wifiInfoLoadIcon - property: "opacity" to: 0.3 duration: 400 easing.type: Easing.InOutQuad } - NumberAnimation { + OpacityAnimator { target: wifiInfoLoadIcon - property: "opacity" to: 1.0 duration: 400 easing.type: Easing.InOutQuad @@ -1866,16 +1858,14 @@ Item { SequentialAnimation { running: VPNService.configLoading loops: Animation.Infinite - NumberAnimation { + OpacityAnimator { target: vpnLoadIcon - property: "opacity" to: 0.3 duration: 400 easing.type: Easing.InOutQuad } - NumberAnimation { + OpacityAnimator { target: vpnLoadIcon - property: "opacity" to: 1.0 duration: 400 easing.type: Easing.InOutQuad @@ -1984,7 +1974,9 @@ Item { checked: configData ? (configData.autoconnect || false) : false visible: !VPNService.configLoading && configData !== null onToggled: checked => { - VPNService.updateConfig(modelData.uuid, {autoconnect: checked}); + VPNService.updateConfig(modelData.uuid, { + autoconnect: checked + }); } } diff --git a/quickshell/Modules/Settings/PrinterTab.qml b/quickshell/Modules/Settings/PrinterTab.qml index 437dc472..b2c63a5b 100644 --- a/quickshell/Modules/Settings/PrinterTab.qml +++ b/quickshell/Modules/Settings/PrinterTab.qml @@ -458,7 +458,7 @@ Item { enabled: !CupsService.loadingDevices onClicked: CupsService.getDevices() - RotationAnimation on rotation { + RotationAnimator on rotation { running: CupsService.loadingDevices loops: Animation.Infinite from: 0 @@ -736,7 +736,7 @@ Item { enabled: !CupsService.loadingPPDs onClicked: CupsService.getPPDs() - RotationAnimation on rotation { + RotationAnimator on rotation { running: CupsService.loadingPPDs loops: Animation.Infinite from: 0 diff --git a/quickshell/Modules/Settings/TimeWeatherTab.qml b/quickshell/Modules/Settings/TimeWeatherTab.qml index 61f4d43c..b6c29b7e 100644 --- a/quickshell/Modules/Settings/TimeWeatherTab.qml +++ b/quickshell/Modules/Settings/TimeWeatherTab.qml @@ -693,7 +693,7 @@ Item { onTriggered: refreshButton.isRefreshing = false } - NumberAnimation on rotation { + RotationAnimator on rotation { running: refreshButton.isRefreshing from: 0 to: 360