remove most usages of transparent background: fix visual regressions
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 12 Aug 2024 08:18:32 +0000 (10:18 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Mon, 12 Aug 2024 14:53:33 +0000 (16:53 +0200)
with transparent backgrounds, most of teh time the result is hard to
read

that is mostly unintended and unless there is some blur added, the UI
becomes unusable

Close https://github.com/nextcloud/desktop/issues/6992

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
12 files changed:
src/gui/PredefinedStatusButton.qml
src/gui/filedetails/FileTag.qml
src/gui/filedetails/NCTabButton.qml
src/gui/tray/ActivityItemActions.qml
src/gui/tray/CallNotificationDialog.qml
src/gui/tray/EditFileLocallyLoadingDialog.qml
src/gui/tray/HeaderButton.qml
src/gui/tray/TrayFolderListItem.qml
src/gui/tray/TrayFoldersMenuButton.qml
src/gui/tray/UnifiedSearchResultListItem.qml
src/gui/tray/UserLine.qml
src/gui/tray/Window.qml

index 8c5ab851cf16f802c110dd08c78fecb327c981da..f51716a725d3e17dd5c7a9289eeb53f8cb41798b 100644 (file)
@@ -35,7 +35,7 @@ AbstractButton {
     property string clearAtText: ""
 
     background: Rectangle {
-        color: root.hovered || root.checked ? palette.highlight : "transparent"
+        color: root.hovered || root.checked ? palette.highlight : palette.base
         radius: Style.slightlyRoundedButtonRadius
     }
 
index 2a5207586cf4632ef994c136bff3c9797ac61917..f9a340f2c3c03db416575bc903111a6e85b5aae0 100644 (file)
@@ -24,7 +24,7 @@ EnforcedPlainTextLabel {
         border.color: palette.dark
         border.width: Style.normalBorderWidth
         radius: Style.veryRoundedButtonRadius
-        color: "transparent"
+        color: palette.base
     }
 
     color: palette.midlight
index 8c6c7426ff5eef1e898201d559f4d82821873c52..f1ac3c3037e105e864a2f139905d6522bb1e594d 100644 (file)
@@ -83,7 +83,7 @@ TabButton {
             implicitWidth: textWidth + Style.standardSpacing * 2
             implicitHeight: 2
 
-            color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : "transparent"
+            color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : palette.base
         }
     }
 }
index a44fc9880ee158d73e0ad2f03fbae68781292244..c233d218e8e2cafbd666801a4152ecb82e1d5f6e 100644 (file)
@@ -13,7 +13,7 @@ Repeater {
     property variant linksContextMenu: []
     property bool displayActions: false
 
-    property color moreActionsButtonColor: "transparent"
+    property color moreActionsButtonColor: palette.base
 
     property int maxActionButtons: 0
 
index 77a9fef20d61662a816a011b970e41020cacb054..46b2d225f310d832ba90d7dc9cc7a6c3a7d12f61 100644 (file)
@@ -24,7 +24,7 @@ import Qt5Compat.GraphicalEffects
 
 ApplicationWindow {
     id: root
-    color: "transparent"
+    color: palette.base
     flags: Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
 
     readonly property int windowSpacing: 10
index c453279f2650eee2d8dfc188697fa65e32d3b942..c6d9af6a1754dd3efd91d823f528a389f0c4fb4b 100644 (file)
@@ -9,7 +9,7 @@ ApplicationWindow {
     id: root
     flags: Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
 
-    color: "transparent"
+    color: palette.base
 
     width: 320
     height: contentLayout.implicitHeight
index 3d16aa3509617060b37fdced7f85d55d4459c945..cb217db1cdcf0aaf9bcfcdc6c98d1b5324d9d916 100644 (file)
@@ -38,7 +38,7 @@ Button {
     Layout.preferredHeight: Style.trayWindowHeaderHeight
 
     background: Rectangle {
-        color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : "transparent"
+        color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : palette.base
         opacity: 0.2
     }
 
index b83160bc6d54fc8232f363a386fa7c78fa2fdff7..8031d7fcba46ffc17034829e25312e5c4d90ffcf 100644 (file)
@@ -36,7 +36,7 @@ MenuItem {
         Rectangle {
             anchors.fill: parent
             anchors.margins: Style.normalBorderWidth
-            color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
+            color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.base
         }
     }
 
index 00c878dcc0d8400733a8571ea4e1cbc2ff1f9a29..b4d466bda5919f33cc85664219f8565e760759ec 100644 (file)
@@ -100,7 +100,7 @@ HeaderButton {
                     width: Style.folderStateIndicatorSize + Style.trayFolderStatusIndicatorSizeOffset
                     height: width
                     anchors.centerIn: parent
-                    color: root.hovered ? Style.currentUserHeaderTextColor : "transparent"
+                    color: root.hovered ? Style.currentUserHeaderTextColor : palette.base
                     opacity: Style.trayFolderStatusIndicatorMouseHoverOpacityFactor
                     radius: width * Style.trayFolderStatusIndicatorRadiusFactor
                     z: -1
index f8a025572d5ed96ce5f6648067a9469d7c98e64f..acfee2da5c3b667c55604dfa967acfcc91dc583d 100644 (file)
@@ -46,7 +46,7 @@ MouseArea {
     Rectangle {
         id: unifiedSearchResultHoverBackground
         anchors.fill: parent
-        color: (parent.containsMouse ? palette.highlight : "transparent")
+        color: parent.containsMouse ? palette.highlight : palette.base
     }
 
     Loader {
index a546cf5573072d6daede95153bf9af3f8ba90b87..28ec40c99801a240dd75b7aabb99f57cc526ecab 100644 (file)
@@ -149,7 +149,7 @@ AbstractButton {
             background: Rectangle {\r
                 anchors.fill: parent\r
                 anchors.margins: 1\r
-                color: userMoreButton.hovered || userMoreButton.visualFocus ? palette.highlight : "transparent"\r
+                color: userMoreButton.hovered || userMoreButton.visualFocus ? palette.highlight : palette.base\r
             }\r
 \r
             contentItem: Image {\r
@@ -188,7 +188,7 @@ AbstractButton {
                         Rectangle {\r
                             anchors.fill: parent\r
                             anchors.margins: 1\r
-                            color: parent.parent.hovered ? palette.highlight : "transparent"\r
+                            color: parent.parent.hovered ? palette.highlight : palette.base\r
                         }\r
                     }\r
 \r
@@ -222,7 +222,7 @@ AbstractButton {
                         Rectangle {\r
                             anchors.fill: parent\r
                             anchors.margins: 1\r
-                            color: parent.parent.hovered ? palette.highlight : "transparent"\r
+                            color: parent.parent.hovered ? palette.highlight : palette.base\r
                         }\r
                     }\r
 \r
index 386c8990b277600aae9cb2089ebf15ec878c64e8..5e5b1270262dd5de410dfc7097b54461f1ffb5cf 100644 (file)
@@ -345,7 +345,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.base\r
                                 }\r
                             }\r
 \r
@@ -397,7 +397,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.base\r
                                 }\r
                             }\r
 \r
@@ -419,7 +419,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.base\r
                                 }\r
                             }\r
 \r
@@ -441,7 +441,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.base\r
                                 }\r
                             }\r
 \r
@@ -452,7 +452,7 @@ ApplicationWindow {
                     }\r
 \r
                     background: Rectangle {\r
-                        color: parent.hovered || parent.visualFocus ? Style.currentUserHeaderTextColor : "transparent"\r
+                        color: parent.hovered || parent.visualFocus ? Style.currentUserHeaderTextColor : palette.base\r
                         opacity: 0.2\r
                     }\r
 \r
@@ -496,7 +496,7 @@ ApplicationWindow {
                                 height: width\r
                                 anchors.bottom: currentAccountAvatar.bottom\r
                                 anchors.right: currentAccountAvatar.right\r
-                                color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : "transparent"\r
+                                color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : palette.base\r
                                 opacity: Style.trayFolderStatusIndicatorMouseHoverOpacityFactor\r
                                 radius: width * Style.trayFolderStatusIndicatorRadiusFactor\r
                             }\r
@@ -699,7 +699,7 @@ ApplicationWindow {
                                         Rectangle {\r
                                             anchors.fill: parent\r
                                             anchors.margins: 1\r
-                                            color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
+                                            color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.base\r
                                         }\r
                                     }\r
 \r