From 2e84e5f74b7b2cb80042d0710187f026ab3cb9cb Mon Sep 17 00:00:00 2001 From: purian23 Date: Sun, 27 Jul 2025 23:05:38 -0400 Subject: [PATCH] Update notification dismiss definitions --- .../Notifications/Center/NotificationCard.qml | 24 +++++++++---------- .../Notifications/Popup/NotificationPopup.qml | 16 ++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Modules/Notifications/Center/NotificationCard.qml b/Modules/Notifications/Center/NotificationCard.qml index 8de927dc..992ef53a 100644 --- a/Modules/Notifications/Center/NotificationCard.qml +++ b/Modules/Notifications/Center/NotificationCard.qml @@ -491,14 +491,14 @@ Rectangle { Rectangle { property bool isHovered: false - width: Math.max(dismissText.implicitWidth + 12, 50) + width: Math.max(clearText.implicitWidth + 12, 50) height: 24 radius: 4 color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent" Text { - id: dismissText - text: "Dismiss" + id: clearText + text: "Clear" color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText font.pixelSize: Theme.fontSizeSmall font.weight: Font.Medium @@ -525,7 +525,7 @@ Rectangle { Row { visible: !expanded - anchors.right: dismissButton.left + anchors.right: clearButton.left anchors.rightMargin: 8 anchors.bottom: parent.bottom anchors.bottomMargin: 8 @@ -569,7 +569,7 @@ Rectangle { } Rectangle { - id: dismissButton + id: clearButton property bool isHovered: false @@ -578,16 +578,16 @@ Rectangle { anchors.rightMargin: 16 anchors.bottom: parent.bottom anchors.bottomMargin: 8 - width: dismissText.width + 16 - height: dismissText.height + 8 + width: clearText.width + 16 + height: clearText.height + 8 radius: 6 color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent" Text { - id: dismissText + id: clearText - text: "Dismiss" - color: dismissButton.isHovered ? Theme.primary : Theme.surfaceVariantText + text: "Clear" + color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText font.pixelSize: Theme.fontSizeSmall font.weight: Font.Medium anchors.centerIn: parent @@ -597,8 +597,8 @@ Rectangle { anchors.fill: parent hoverEnabled: true cursorShape: Qt.PointingHandCursor - onEntered: dismissButton.isHovered = true - onExited: dismissButton.isHovered = false + onEntered: clearButton.isHovered = true + onExited: clearButton.isHovered = false onClicked: NotificationService.dismissGroup(notificationGroup?.key || "") } } diff --git a/Modules/Notifications/Popup/NotificationPopup.qml b/Modules/Notifications/Popup/NotificationPopup.qml index 17b00ae9..89ebac76 100644 --- a/Modules/Notifications/Popup/NotificationPopup.qml +++ b/Modules/Notifications/Popup/NotificationPopup.qml @@ -286,7 +286,7 @@ PanelWindow { } Row { - anchors.right: dismissButton.left + anchors.right: clearButton.left anchors.rightMargin: 8 anchors.bottom: parent.bottom anchors.bottomMargin: 8 @@ -335,23 +335,23 @@ PanelWindow { } Rectangle { - id: dismissButton + id: clearButton property bool isHovered: false anchors.right: parent.right anchors.rightMargin: 16 anchors.bottom: parent.bottom anchors.bottomMargin: 8 - width: Math.max(dismissText.implicitWidth + 12, 50) + width: Math.max(clearText.implicitWidth + 12, 50) height: 24 radius: 4 color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent" z: 20 Text { - id: dismissText - text: "Dismiss" - color: dismissButton.isHovered ? Theme.primary : Theme.surfaceVariantText + id: clearText + text: "Clear" + color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText font.pixelSize: Theme.fontSizeSmall font.weight: Font.Medium anchors.centerIn: parent @@ -362,8 +362,8 @@ PanelWindow { hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton - onEntered: dismissButton.isHovered = true - onExited: dismissButton.isHovered = false + onEntered: clearButton.isHovered = true + onExited: clearButton.isHovered = false onClicked: { if (notificationData && !win.exiting) { NotificationService.dismissNotification(notificationData);