The dismiss button is now a CustomButton component.
authorCamila <hello@camila.codes>
Fri, 30 Sep 2022 12:31:24 +0000 (14:31 +0200)
committerCamila (Rebase PR Action) <hello@camila.codes>
Mon, 17 Oct 2022 11:29:23 +0000 (11:29 +0000)
Signed-off-by: Camila <hello@camila.codes>
src/gui/tray/ActivityItemContent.qml

index 4ba1b95e8f18fd7b962e1a8dddd3d9fbc168dda6..50aa41d5f2dc13b857dfa3485c71335ed33114d2 100644 (file)
@@ -180,37 +180,20 @@ RowLayout {
         }
     }
 
-    Button {
+    CustomButton {
         id: dismissActionButton
 
-        Layout.preferredWidth: Style.trayListItemIconSize * 0.6
-        Layout.preferredHeight: Style.trayListItemIconSize * 0.6
-
-        Layout.alignment: Qt.AlignCenter
-
-        Layout.margins: Style.roundButtonBackgroundVerticalMargins
-
-        NCToolTip {
-            visible: parent.hovered
-            text: qsTr("Dismiss")
-        }
-
-        Accessible.name: qsTr("Dismiss")
+        Layout.preferredWidth: Style.trayListItemIconSize
+        Layout.preferredHeight: Style.trayListItemIconSize
 
         visible: root.showDismissButton && !shareButton.visible
 
-        background: Rectangle {
-            color: "transparent"
-        }
+        imageSource: "image://svgimage-custom-color/clear.svg" + "/" + Style.ncTextColor
+        imageSourceHover: "image://svgimage-custom-color/clear.svg" + "/" + UserModel.currentUser.headerTextColor
 
-        contentItem: Image {
-            anchors.fill: parent
-            source: parent.hovered ? Theme.darkMode ?
-                "image://svgimage-custom-color/clear.svg/white" : "image://svgimage-custom-color/clear.svg/black" :
-                "image://svgimage-custom-color/clear.svg/grey"
-            sourceSize.width: 24
-            sourceSize.height: 24
-        }
+        toolTipText: qsTr("Dismiss")
+
+        bgColor: Style.menuBorder
 
         onClicked: root.dismissButtonClicked()
     }