Fix dark mode in ResolveConflictsDialog
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 23 May 2023 16:30:53 +0000 (00:30 +0800)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Tue, 30 May 2023 08:40:52 +0000 (08:40 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/ConflictItemFileInfo.qml
src/gui/ResolveConflictsDialog.qml

index be345f7e8a9455de30c7aa03e72f3a16db708edd..1e8202a62b29c2eb5ab7a1d4f0781dab6774854c 100644 (file)
@@ -37,6 +37,26 @@ Item {
         leftPadding: 0
         spacing: 0
 
+        // TODO: Rather than setting all these palette colours manually,
+        // create a custom style and do it for all components globally
+        palette {
+            text: Style.ncTextColor
+            windowText: Style.ncTextColor
+            buttonText: Style.ncTextColor
+            brightText: Style.ncTextBrightColor
+            highlight: Style.lightHover
+            highlightedText: Style.ncTextColor
+            light: Style.lightHover
+            midlight: Style.lightHover
+            mid: Style.ncSecondaryTextColor
+            dark: Style.menuBorder
+            button: Style.menuBorder
+            window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+            base: Style.backgroundColor
+            toolTipBase: Style.backgroundColor
+            toolTipText: Style.ncTextColor
+        }
+
         onToggled: function() {
             selectedChanged()
         }
index 99bd61da5a8edaa05f036fcbf6b0f25057a341ce..d4520d6f816a5c7263a184ae771cca33684424b3 100644 (file)
@@ -74,6 +74,26 @@ QtWindow.Window {
 
                 Layout.fillWidth: true
 
+                // TODO: Rather than setting all these palette colours manually,
+                // create a custom style and do it for all components globally
+                palette {
+                    text: Style.ncTextColor
+                    windowText: Style.ncTextColor
+                    buttonText: Style.ncTextColor
+                    brightText: Style.ncTextBrightColor
+                    highlight: Style.lightHover
+                    highlightedText: Style.ncTextColor
+                    light: Style.lightHover
+                    midlight: Style.lightHover
+                    mid: Style.ncSecondaryTextColor
+                    dark: Style.menuBorder
+                    button: Style.menuBorder
+                    window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                    base: Style.backgroundColor
+                    toolTipBase: Style.backgroundColor
+                    toolTipText: Style.ncTextColor
+                }
+
                 text: qsTr('All local versions')
 
                 leftPadding: 0
@@ -92,6 +112,26 @@ QtWindow.Window {
 
                 Layout.fillWidth: true
 
+                // TODO: Rather than setting all these palette colours manually,
+                // create a custom style and do it for all components globally
+                palette {
+                    text: Style.ncTextColor
+                    windowText: Style.ncTextColor
+                    buttonText: Style.ncTextColor
+                    brightText: Style.ncTextBrightColor
+                    highlight: Style.lightHover
+                    highlightedText: Style.ncTextColor
+                    light: Style.lightHover
+                    midlight: Style.lightHover
+                    mid: Style.ncSecondaryTextColor
+                    dark: Style.menuBorder
+                    button: Style.menuBorder
+                    window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                    base: Style.backgroundColor
+                    toolTipBase: Style.backgroundColor
+                    toolTipText: Style.ncTextColor
+                }
+
                 text: qsTr('All server versions')
 
                 leftPadding: 0
@@ -146,6 +186,26 @@ QtWindow.Window {
         DialogButtonBox {
             Layout.fillWidth: true
 
+            // TODO: Rather than setting all these palette colours manually,
+            // create a custom style and do it for all components globally
+            palette {
+                text: Style.ncTextColor
+                windowText: Style.ncTextColor
+                buttonText: Style.ncTextColor
+                brightText: Style.ncTextBrightColor
+                highlight: Style.lightHover
+                highlightedText: Style.ncTextColor
+                light: Style.lightHover
+                midlight: Style.lightHover
+                mid: Style.ncSecondaryTextColor
+                dark: Style.menuBorder
+                button: Style.menuBorder
+                window: Style.backgroundColor
+                base: Style.backgroundColor
+                toolTipBase: Style.backgroundColor
+                toolTipText: Style.ncTextColor
+            }
+
             Button {
                 text: qsTr("Resolve conflicts")
                 DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
@@ -167,7 +227,7 @@ QtWindow.Window {
     }
 
     Rectangle {
-        color: Theme.systemPalette.window
+        color: Style.backgroundColor
         anchors.fill: parent
         z: 1
     }