Use header text color to improve contrast with header colours when hovering on themed...
authorClaudio Cambra <claudio.cambra@gmail.com>
Wed, 13 Apr 2022 22:06:28 +0000 (00:06 +0200)
committerClaudio Cambra <claudio.cambra@gmail.com>
Fri, 15 Apr 2022 11:17:09 +0000 (13:17 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
src/gui/tray/ActivityItemContent.qml
src/gui/tray/HeaderButton.qml
src/gui/tray/Window.qml

index 4b4f1e3ffdcd75fc1496ef9b89800a13ad7d2e46..d716d76ebf4be094a6234ba573fa3528833e28a6 100644 (file)
@@ -212,7 +212,7 @@ RowLayout {
         visible: root.activityData.isShareable
 
         imageSource: "image://svgimage-custom-color/share.svg" + "/" + UserModel.currentUser.headerColor
-        imageSourceHover: "image://svgimage-custom-color/share.svg" + "/" + Style.ncTextColor
+        imageSourceHover: "image://svgimage-custom-color/share.svg" + "/" + UserModel.currentUser.headerTextColor
 
         toolTipText: qsTr("Open share dialog")
 
index b6fe6ab86b5d9b3190ffa3062c11e797021be6b0..c101188774daa9429cb4b581f913af26a7eb1a1d 100644 (file)
@@ -8,6 +8,7 @@ import QtGraphicalEffects 1.0
 
 // Custom qml modules are in /theme (and included by resources.qrc)
 import Style 1.0
+import com.nextcloud.desktopclient 1.0
 
 Button {
     id: root
@@ -25,7 +26,7 @@ Button {
     Layout.preferredHeight: Style.trayWindowHeaderHeight
 
     background: Rectangle {
-        color: root.hovered || root.visualFocus ? "white" : "transparent"
+        color: root.hovered || root.visualFocus ? UserModel.currentUser.headerTextColor : "transparent"
         opacity: 0.2
     }
 }
index 2b4ef3f8adbb3fb5ba42badefbff3489c20512cd..c1c56039cf794f0f1e3c7d9f49040822478a7214 100644 (file)
@@ -339,7 +339,7 @@ Window {
                     }\r
 \r
                     background: Rectangle {\r
-                        color: parent.hovered || parent.visualFocus ? "white" : "transparent"\r
+                        color: parent.hovered || parent.visualFocus ? UserModel.currentUser.headerTextColor : "transparent"\r
                         opacity: 0.2\r
                     }\r
 \r
@@ -383,7 +383,7 @@ Window {
                                 height: width\r
                                 anchors.bottom: currentAccountAvatar.bottom\r
                                 anchors.right: currentAccountAvatar.right\r
-                                color: currentAccountButton.hovered ? "white" : "transparent"\r
+                                color: currentAccountButton.hovered ? UserModel.currentUser.headerTextColor : "transparent"\r
                                 opacity: 0.2\r
                                 radius: width*0.5\r
                             }\r
@@ -526,7 +526,7 @@ Window {
                                 width: Style.folderStateIndicatorSize + 2\r
                                 height: width\r
                                 anchors.centerIn: parent\r
-                                color: openLocalFolderButton.hovered ? "white" : "transparent"\r
+                                color: openLocalFolderButton.hovered ? UserModel.currentUser.headerTextColor : "transparent"\r
                                 opacity: 0.2\r
                                 radius: width*0.5\r
                                 z: -1\r