Procházet zdrojové kódy

Fix dark mode in ResolveConflictsDialog

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Claudio Cambra před 2 roky
rodič
revize
afdf4f0ebc

+ 20 - 0
src/gui/ConflictItemFileInfo.qml

@@ -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()
         }

+ 61 - 1
src/gui/ResolveConflictsDialog.qml

@@ -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
     }