summaryrefslogtreecommitdiff
path: root/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml
diff options
context:
space:
mode:
authorAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
committerAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
commit70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch)
treeab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml
parent5d94c0a7d44a2255b81815a52a7056a94a39842d (diff)
downloadRaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz
RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml')
-rw-r--r--raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml187
1 files changed, 0 insertions, 187 deletions
diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml
deleted file mode 100644
index 696c76c..0000000
--- a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml
+++ /dev/null
@@ -1,187 +0,0 @@
-import QtQuick
-import qs.Common
-import qs.Modules.Plugins
-import qs.Services
-import qs.Widgets
-
-BasePill {
- id: root
-
- property bool isActive: false
- readonly property bool hasUpdates: SystemUpdateService.updateCount > 0
- readonly property bool isChecking: SystemUpdateService.isChecking
- readonly property bool shouldHide: SettingsData.updaterHideWidget && !hasUpdates && !isChecking && !SystemUpdateService.hasError
-
- opacity: shouldHide ? 0 : 1
-
- states: [
- State {
- name: "hidden_horizontal"
- when: root.shouldHide && !isVerticalOrientation
- PropertyChanges {
- target: root
- width: 0
- }
- },
- State {
- name: "hidden_vertical"
- when: root.shouldHide && isVerticalOrientation
- PropertyChanges {
- target: root
- height: 0
- }
- }
- ]
-
- transitions: [
- Transition {
- NumberAnimation {
- properties: "width,height"
- duration: Theme.shortDuration
- easing.type: Theme.standardEasing
- }
- }
- ]
-
- Behavior on opacity {
- NumberAnimation {
- duration: Theme.shortDuration
- easing.type: Theme.standardEasing
- }
- }
-
- Ref {
- service: SystemUpdateService
- }
-
- content: Component {
- Item {
- implicitWidth: root.isVerticalOrientation ? root.widgetThickness : updaterIcon.implicitWidth
- implicitHeight: root.widgetThickness
-
- DankIcon {
- id: statusIcon
- anchors.centerIn: parent
- visible: root.isVerticalOrientation
- name: {
- if (root.isChecking)
- return "refresh";
- if (SystemUpdateService.hasError)
- return "error";
- if (root.hasUpdates)
- return "system_update_alt";
- return "check_circle";
- }
- size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
- color: {
- if (SystemUpdateService.hasError)
- return Theme.error;
- if (root.hasUpdates)
- return Theme.primary;
- return root.isActive ? Theme.primary : Theme.surfaceText;
- }
-
- RotationAnimation {
- id: rotationAnimation
- target: statusIcon
- property: "rotation"
- from: 0
- to: 360
- duration: 1000
- running: root.isChecking
- loops: Animation.Infinite
-
- onRunningChanged: {
- if (!running) {
- statusIcon.rotation = 0;
- }
- }
- }
- }
-
- Rectangle {
- width: 8
- height: 8
- radius: 4
- color: Theme.error
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.rightMargin: (barConfig?.removeWidgetPadding ?? false) ? 0 : 6
- anchors.topMargin: (barConfig?.removeWidgetPadding ?? false) ? 0 : 6
- visible: root.isVerticalOrientation && root.hasUpdates && !root.isChecking
- }
-
- Row {
- id: updaterIcon
- anchors.centerIn: parent
- spacing: Theme.spacingXS
- visible: !root.isVerticalOrientation
-
- DankIcon {
- id: statusIconHorizontal
- anchors.verticalCenter: parent.verticalCenter
- name: {
- if (root.isChecking)
- return "refresh";
- if (SystemUpdateService.hasError)
- return "error";
- if (root.hasUpdates)
- return "system_update_alt";
- return "check_circle";
- }
- size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
- color: {
- if (SystemUpdateService.hasError)
- return Theme.error;
- if (root.hasUpdates)
- return Theme.primary;
- return root.isActive ? Theme.primary : Theme.surfaceText;
- }
-
- RotationAnimation {
- id: rotationAnimationHorizontal
- target: statusIconHorizontal
- property: "rotation"
- from: 0
- to: 360
- duration: 1000
- running: root.isChecking
- loops: Animation.Infinite
-
- onRunningChanged: {
- if (!running) {
- statusIconHorizontal.rotation = 0;
- }
- }
- }
- }
-
- StyledText {
- id: countText
- anchors.verticalCenter: parent.verticalCenter
- text: SystemUpdateService.updateCount.toString()
- font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
- color: Theme.widgetTextColor
- visible: root.hasUpdates && !root.isChecking
- }
- }
- }
- }
-
- MouseArea {
- z: 1
- anchors.fill: parent
- cursorShape: Qt.PointingHandCursor
- onPressed: mouse => {
- root.triggerRipple(this, mouse.x, mouse.y);
- if (popoutTarget && popoutTarget.setTriggerPosition) {
- const globalPos = root.visualContent.mapToItem(null, 0, 0);
- const currentScreen = parentScreen || Screen;
- const barPosition = root.axis?.edge === "left" ? 2 : (root.axis?.edge === "right" ? 3 : (root.axis?.edge === "top" ? 0 : 1));
- const pos = SettingsData.getPopupTriggerPosition(globalPos, currentScreen, barThickness, root.visualWidth, root.barSpacing, barPosition, root.barConfig);
- popoutTarget.setTriggerPosition(pos.x, pos.y, pos.width, section, currentScreen, barPosition, barThickness, root.barSpacing, root.barConfig);
- }
- root.clicked();
- }
- }
-}