From 87f70c66ba867f05dd83070ac7d30a19ff0991aa Mon Sep 17 00:00:00 2001 From: bbedward Date: Sun, 31 Aug 2025 20:04:00 -0400 Subject: [PATCH] color tweaks --- Modals/ClipboardHistoryModal.qml | 12 +- Modals/ConfirmModal.qml | 6 +- Modals/SettingsModal.qml | 8 - Modules/ControlCenter/ControlCenterPopout.qml | 147 ++++-------------- Modules/ProcessList/ProcessListItem.qml | 17 -- Modules/ProcessList/SystemOverview.qml | 2 +- 6 files changed, 40 insertions(+), 152 deletions(-) diff --git a/Modals/ClipboardHistoryModal.qml b/Modals/ClipboardHistoryModal.qml index e6fd0daa..e5d3794d 100644 --- a/Modals/ClipboardHistoryModal.qml +++ b/Modals/ClipboardHistoryModal.qml @@ -280,7 +280,7 @@ DankModal { id: clearConfirmDialog confirmButtonText: "Clear All" - confirmButtonColor: Theme.error + confirmButtonColor: Theme.primary onVisibleChanged: { if (visible) { @@ -452,8 +452,8 @@ DankModal { DankActionButton { iconName: "delete_sweep" iconSize: Theme.iconSize - iconColor: Theme.error - hoverColor: Theme.errorHover + iconColor: Theme.surfaceText + hoverColor: Theme.surfaceHover onClicked: { clearConfirmDialog.show( "Clear All History?", @@ -471,7 +471,7 @@ DankModal { iconName: "close" iconSize: Theme.iconSize - 4 iconColor: Theme.surfaceText - hoverColor: Theme.errorHover + hoverColor: Theme.surfaceHover onClicked: hide() } } @@ -841,8 +841,8 @@ DankModal { anchors.verticalCenter: parent.verticalCenter iconName: "close" iconSize: Theme.iconSize - 6 - iconColor: Theme.error - hoverColor: Theme.errorHover + iconColor: Theme.surfaceText + hoverColor: Theme.surfaceHover onClicked: { deleteEntry(model.entry) } diff --git a/Modals/ConfirmModal.qml b/Modals/ConfirmModal.qml index 66988d1f..904da7e7 100644 --- a/Modals/ConfirmModal.qml +++ b/Modals/ConfirmModal.qml @@ -13,7 +13,7 @@ DankModal { property string confirmMessage: "" property string confirmButtonText: "Confirm" property string cancelButtonText: "Cancel" - property color confirmButtonColor: Theme.error + property color confirmButtonColor: Theme.primary property var onConfirm: function() {} property var onCancel: function() {} @@ -25,7 +25,7 @@ DankModal { confirmMessage = message || "" confirmButtonText = "Confirm" cancelButtonText = "Cancel" - confirmButtonColor = Theme.error + confirmButtonColor = Theme.primary onConfirm = onConfirmCallback || function() {} onCancel = onCancelCallback || function() {} selectedButton = -1 @@ -38,7 +38,7 @@ DankModal { confirmMessage = options.message || "" confirmButtonText = options.confirmText || "Confirm" cancelButtonText = options.cancelText || "Cancel" - confirmButtonColor = options.confirmColor || Theme.error + confirmButtonColor = options.confirmColor || Theme.primary onConfirm = options.onConfirm || function() {} onCancel = options.onCancel || function() {} selectedButton = -1 diff --git a/Modals/SettingsModal.qml b/Modals/SettingsModal.qml index cff9f072..bc1326c7 100644 --- a/Modals/SettingsModal.qml +++ b/Modals/SettingsModal.qml @@ -233,14 +233,6 @@ DankModal { } } - DankIcon { - anchors.centerIn: parent - name: "warning" - size: Theme.iconSizeLarge - color: Theme.error - visible: PortalService.profileImage !== "" - && profileImageSource.status === Image.Error - } Rectangle { anchors.fill: parent diff --git a/Modules/ControlCenter/ControlCenterPopout.qml b/Modules/ControlCenter/ControlCenterPopout.qml index c4091311..65173c7a 100644 --- a/Modules/ControlCenter/ControlCenterPopout.qml +++ b/Modules/ControlCenter/ControlCenterPopout.qml @@ -280,82 +280,23 @@ DankPopout { } } - Rectangle { - width: 40 - height: 40 - radius: 20 - color: powerButton.containsMouse - || root.powerOptionsExpanded ? Qt.rgba( - Theme.error.r, - Theme.error.g, - Theme.error.b, - 0.12) : Qt.rgba( - Theme.surfaceVariant.r, - Theme.surfaceVariant.g, - Theme.surfaceVariant.b, - 0.5) - - Rectangle { - anchors.centerIn: parent - width: parent.width - height: parent.height - radius: parent.radius - color: "transparent" - clip: true - - DankIcon { - id: dankIcon - - anchors.centerIn: parent - name: root.powerOptionsExpanded ? "expand_less" : "power_settings_new" - size: Theme.iconSize - 2 - color: powerButton.containsMouse - || root.powerOptionsExpanded ? Theme.error : Theme.surfaceText - - Behavior on name { - SequentialAnimation { - NumberAnimation { - target: dankIcon - property: "opacity" - to: 0 - duration: Theme.shortDuration / 2 - easing.type: Theme.standardEasing - } - - PropertyAction { - target: dankIcon - property: "name" - } - - NumberAnimation { - target: dankIcon - property: "opacity" - to: 1 - duration: Theme.shortDuration / 2 - easing.type: Theme.standardEasing - } - } - } - } + DankActionButton { + buttonSize: 40 + iconName: root.powerOptionsExpanded ? "expand_less" : "power_settings_new" + iconSize: Theme.iconSize - 2 + iconColor: Theme.surfaceText + backgroundColor: Qt.rgba( + Theme.surfaceVariant.r, + Theme.surfaceVariant.g, + Theme.surfaceVariant.b, + 0.5) + hoverColor: Qt.rgba(Theme.primary.r, + Theme.primary.g, + Theme.primary.b, 0.12) + onClicked: { + root.powerOptionsExpanded = !root.powerOptionsExpanded } - MouseArea { - id: powerButton - - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onPressed: { - root.powerOptionsExpanded = !root.powerOptionsExpanded - } - } - - Behavior on color { - ColorAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } } DankActionButton { @@ -409,9 +350,9 @@ DankPopout { height: 34 radius: Theme.cornerRadius color: logoutButton.containsMouse ? Qt.rgba( - Theme.warning.r, - Theme.warning.g, - Theme.warning.b, + Theme.primary.r, + Theme.primary.g, + Theme.primary.b, 0.12) : Qt.rgba( Theme.surfaceVariant.r, Theme.surfaceVariant.g, @@ -425,14 +366,14 @@ DankPopout { DankIcon { name: "logout" size: Theme.fontSizeSmall - color: logoutButton.containsMouse ? Theme.warning : Theme.surfaceText + color: logoutButton.containsMouse ? Theme.primary : Theme.surfaceText anchors.verticalCenter: parent.verticalCenter } StyledText { text: "Logout" font.pixelSize: Theme.fontSizeSmall - color: logoutButton.containsMouse ? Theme.warning : Theme.surfaceText + color: logoutButton.containsMouse ? Theme.primary : Theme.surfaceText font.weight: Font.Medium anchors.verticalCenter: parent.verticalCenter } @@ -452,13 +393,6 @@ DankPopout { "Are you sure you want to logout?") } } - - Behavior on color { - ColorAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } } Rectangle { @@ -466,9 +400,9 @@ DankPopout { height: 34 radius: Theme.cornerRadius color: rebootButton.containsMouse ? Qt.rgba( - Theme.warning.r, - Theme.warning.g, - Theme.warning.b, + Theme.primary.r, + Theme.primary.g, + Theme.primary.b, 0.12) : Qt.rgba( Theme.surfaceVariant.r, Theme.surfaceVariant.g, @@ -482,14 +416,14 @@ DankPopout { DankIcon { name: "restart_alt" size: Theme.fontSizeSmall - color: rebootButton.containsMouse ? Theme.warning : Theme.surfaceText + color: rebootButton.containsMouse ? Theme.primary : Theme.surfaceText anchors.verticalCenter: parent.verticalCenter } StyledText { text: "Restart" font.pixelSize: Theme.fontSizeSmall - color: rebootButton.containsMouse ? Theme.warning : Theme.surfaceText + color: rebootButton.containsMouse ? Theme.primary : Theme.surfaceText font.weight: Font.Medium anchors.verticalCenter: parent.verticalCenter } @@ -509,13 +443,6 @@ DankPopout { "Are you sure you want to restart?") } } - - Behavior on color { - ColorAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } } Rectangle { @@ -566,13 +493,6 @@ DankPopout { "Are you sure you want to suspend?") } } - - Behavior on color { - ColorAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } } Rectangle { @@ -580,9 +500,9 @@ DankPopout { height: 34 radius: Theme.cornerRadius color: shutdownButton.containsMouse ? Qt.rgba( - Theme.error.r, - Theme.error.g, - Theme.error.b, + Theme.primary.r, + Theme.primary.g, + Theme.primary.b, 0.12) : Qt.rgba( Theme.surfaceVariant.r, Theme.surfaceVariant.g, @@ -596,14 +516,14 @@ DankPopout { DankIcon { name: "power_settings_new" size: Theme.fontSizeSmall - color: shutdownButton.containsMouse ? Theme.error : Theme.surfaceText + color: shutdownButton.containsMouse ? Theme.primary : Theme.surfaceText anchors.verticalCenter: parent.verticalCenter } StyledText { text: "Shutdown" font.pixelSize: Theme.fontSizeSmall - color: shutdownButton.containsMouse ? Theme.error : Theme.surfaceText + color: shutdownButton.containsMouse ? Theme.primary : Theme.surfaceText font.weight: Font.Medium anchors.verticalCenter: parent.verticalCenter } @@ -623,13 +543,6 @@ DankPopout { "Are you sure you want to shutdown?") } } - - Behavior on color { - ColorAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } } } } diff --git a/Modules/ProcessList/ProcessListItem.qml b/Modules/ProcessList/ProcessListItem.qml index 4b1b9957..7588c87a 100644 --- a/Modules/ProcessList/ProcessListItem.qml +++ b/Modules/ProcessList/ProcessListItem.qml @@ -65,9 +65,6 @@ Rectangle { if (process && process.cpu > 80) return Theme.error - if (process && process.cpu > 50) - return Theme.warning - return Theme.surfaceText } opacity: 0.8 @@ -99,10 +96,6 @@ Rectangle { return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) - if (process && process.cpu > 50) - return Qt.rgba(Theme.warning.r, Theme.warning.g, - Theme.warning.b, 0.12) - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) } @@ -119,9 +112,6 @@ Rectangle { if (process && process.cpu > 80) return Theme.error - if (process && process.cpu > 50) - return Theme.warning - return Theme.surfaceText } anchors.centerIn: parent @@ -139,10 +129,6 @@ Rectangle { return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) - if (process && process.memoryKB > 512 * 1024) - return Qt.rgba(Theme.warning.r, Theme.warning.g, - Theme.warning.b, 0.12) - return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) } @@ -160,9 +146,6 @@ Rectangle { if (process && process.memoryKB > 1024 * 1024) return Theme.error - if (process && process.memoryKB > 512 * 1024) - return Theme.warning - return Theme.surfaceText } anchors.centerIn: parent diff --git a/Modules/ProcessList/SystemOverview.qml b/Modules/ProcessList/SystemOverview.qml index 6682b476..cfdc6e53 100644 --- a/Modules/ProcessList/SystemOverview.qml +++ b/Modules/ProcessList/SystemOverview.qml @@ -210,7 +210,7 @@ Row { font.pixelSize: Theme.fontSizeMedium font.family: SettingsData.monoFontFamily font.weight: Font.Medium - color: DgopService.usedSwapKB > 0 ? Theme.warning : Theme.surfaceText + color: Theme.surfaceText anchors.verticalCenter: parent.verticalCenter visible: DgopService.totalSwapKB > 0 }