Always use palette colours for colouring UI elements
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 25 May 2023 03:51:51 +0000 (11:51 +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>
50 files changed:
src/gui/BasicComboBox.qml
src/gui/EmojiPicker.qml
src/gui/ErrorBox.qml
src/gui/PredefinedStatusButton.qml
src/gui/ResolveConflictsDialog.qml
src/gui/UserStatusSelector.qml
src/gui/UserStatusSelectorButton.qml
src/gui/UserStatusSelectorPage.qml
src/gui/filedetails/FileDetailsPage.qml
src/gui/filedetails/FileDetailsView.qml
src/gui/filedetails/FileTag.qml
src/gui/filedetails/NCInputTextEdit.qml
src/gui/filedetails/NCInputTextField.qml
src/gui/filedetails/NCRadioButton.qml
src/gui/filedetails/NCTabButton.qml
src/gui/filedetails/ShareDelegate.qml
src/gui/filedetails/ShareDetailsPage.qml
src/gui/filedetails/ShareView.qml
src/gui/filedetails/ShareeDelegate.qml
src/gui/filedetails/ShareeSearchField.qml
src/gui/tray/ActivityActionButton.qml
src/gui/tray/ActivityItemContent.qml
src/gui/tray/ActivityItemContextMenu.qml
src/gui/tray/ActivityList.qml
src/gui/tray/AutoSizingMenu.qml
src/gui/tray/CallNotificationDialog.qml
src/gui/tray/CustomButton.qml
src/gui/tray/EditFileLocallyLoadingDialog.qml
src/gui/tray/HeaderButton.qml
src/gui/tray/ListItemLineAndSubline.qml
src/gui/tray/NCBusyIndicator.qml
src/gui/tray/NCButtonBackground.qml
src/gui/tray/NCButtonContents.qml
src/gui/tray/NCToolTip.qml
src/gui/tray/SyncStatus.qml
src/gui/tray/TalkReplyTextField.qml
src/gui/tray/TextButtonContents.qml
src/gui/tray/TrayFolderListItem.qml
src/gui/tray/TrayFoldersMenuButton.qml
src/gui/tray/UnifiedSearchInputContainer.qml
src/gui/tray/UnifiedSearchResultFetchMoreTrigger.qml
src/gui/tray/UnifiedSearchResultItem.qml
src/gui/tray/UnifiedSearchResultItemSkeleton.qml
src/gui/tray/UnifiedSearchResultItemSkeletonContainer.qml
src/gui/tray/UnifiedSearchResultItemSkeletonGradientRectangle.qml
src/gui/tray/UnifiedSearchResultListItem.qml
src/gui/tray/UnifiedSearchResultNothingFound.qml
src/gui/tray/UserLine.qml
src/gui/tray/Window.qml
theme/Style/Style.qml

index 3437a0a5723b42d55be1cab17de9122acbac7b58..6405f4ed0883801f7c2b289510a059085e0fc884 100644 (file)
@@ -30,7 +30,7 @@ ComboBox {
 
     background: Rectangle {
         radius: Style.slightlyRoundedButtonRadius
-        color: Style.buttonBackgroundColor
+        color: palette.button
         opacity: clearComboBox.hovered ? Style.hoverOpacity : 1.0
     }
 
@@ -39,7 +39,6 @@ ComboBox {
         rightPadding: clearComboBox.indicator.width + clearComboBox.spacing
 
         text: clearComboBox.displayText
-        color: Style.ncTextColor
         verticalAlignment: Text.AlignVCenter
         elide: Text.ElideRight
     }
@@ -50,7 +49,6 @@ ComboBox {
         anchors.verticalCenter: clearComboBox.verticalCenter
 
         cached: true
-        color: Style.ncTextColor
         width: source.width
         height: source.height
         source: Image {
@@ -80,8 +78,8 @@ ComboBox {
         }
 
         background: Rectangle {
-            color: Style.backgroundColor
-            border.color: Style.menuBorder
+            color: palette.toolTipBase
+            border.color: palette.dark
             radius: Style.slightlyRoundedButtonRadius
         }
     }
@@ -92,13 +90,12 @@ ComboBox {
         width: clearComboBox.width
         contentItem: EnforcedPlainTextLabel {
             text: modelData.display
-            color: Style.ncTextColor
             elide: Text.ElideRight
             verticalAlignment: Text.AlignVCenter
         }
         highlighted: clearComboBox.highlightedIndex === index
         background: Rectangle {
-           color: clearStatusDelegate.highlighted || clearStatusDelegate.hovered ? Style.lightHover : Style.backgroundColor
+           color: clearStatusDelegate.highlighted || clearStatusDelegate.hovered ? palette.highlight : palette.base
        }
     }
 }
index bcc853fd5c8c132620913ecb3bd3560d4f6c66b3..9c1882ed433ffe33d065e52c873bc824730bad16 100644 (file)
@@ -50,8 +50,12 @@ ColumnLayout {
             height: headerLayout.height
 
             background: Rectangle {
-                color: Style.lightHover
-                visible: ListView.isCurrentItem || headerDelegate.highlighted || headerDelegate.checked || headerDelegate.down || headerDelegate.hovered
+                color: palette.highlight
+                visible: ListView.isCurrentItem ||
+                         headerDelegate.highlighted ||
+                         headerDelegate.checked ||
+                         headerDelegate.down ||
+                         headerDelegate.hovered
                 radius: Style.slightlyRoundedButtonRadius
             }
 
@@ -59,7 +63,6 @@ ColumnLayout {
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
                 text: emoji
-                color: Style.ncTextColor
             }
 
             Rectangle {
@@ -70,7 +73,7 @@ ColumnLayout {
 
                 visible: ListView.isCurrentItem
 
-                color: Style.menuBorder
+                color: palette.dark
             }
 
 
@@ -84,7 +87,7 @@ ColumnLayout {
     Rectangle {
         height: Style.normalBorderWidth
         Layout.fillWidth: true
-        color: Style.menuBorder
+        color: palette.dark
     }
 
     GridView {
@@ -109,7 +112,7 @@ ColumnLayout {
             height: metrics.height * 2
 
             background: Rectangle {
-                color: Style.lightHover
+                color: palette.highlight
                 visible: ListView.isCurrentItem || emojiDelegate.highlighted || emojiDelegate.checked || emojiDelegate.down || emojiDelegate.hovered
                 radius: Style.slightlyRoundedButtonRadius
             }
@@ -118,7 +121,6 @@ ColumnLayout {
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
                 text: modelData === undefined ? "" : modelData.unicode
-                color: Style.ncTextColor
             }
 
             onClicked: {
@@ -132,7 +134,7 @@ ColumnLayout {
             width: parent.width * 0.8
             anchors.centerIn: parent
             text: qsTr("No recent emojis")
-            color: Style.ncSecondaryTextColor
+            color: palette.midlight
             wrapMode: Text.Wrap
             font.bold: true
             visible: emojiView.count === 0
index a90c9a0c509c8de496c43a736448665d92443ef1..1ac6c5e2ac3650192fcc817423e2c587ee376c67 100644 (file)
@@ -59,7 +59,6 @@ Item {
 
         EnforcedPlainTextLabel {
             Layout.fillWidth: true
-            color: Style.ncTextColor
             font.bold: true
             text: qsTr("Error")
             visible: errorBox.showCloseButton
@@ -70,7 +69,7 @@ Item {
             Layout.preferredHeight: Style.iconButtonWidth
 
             background: null
-            icon.color: Style.ncTextColor
+            icon.color: palette.buttonText
             icon.source: "qrc:///client/theme/close.svg"
 
             visible: errorBox.showCloseButton
@@ -86,7 +85,6 @@ Item {
             Layout.fillHeight: true
             Layout.columnSpan: 2
 
-            color: Style.ncTextColor
             wrapMode: Text.WordWrap
             text: errorBox.text
         }
index 488249e0cbed0339f34921a22edd345a4a078050..8c5ab851cf16f802c110dd08c78fecb327c981da 100644 (file)
@@ -35,7 +35,7 @@ AbstractButton {
     property string clearAtText: ""
 
     background: Rectangle {
-        color: root.hovered || root.checked ? Style.lightHover : "transparent"
+        color: root.hovered || root.checked ? palette.highlight : "transparent"
         radius: Style.slightlyRoundedButtonRadius
     }
 
@@ -53,20 +53,17 @@ AbstractButton {
             spacing: Style.smallSpacing
             EnforcedPlainTextLabel {
                 text: root.statusText
-                color: Style.ncTextColor
                 verticalAlignment: Text.AlignVCenter
                 font.bold: true
             }
 
             EnforcedPlainTextLabel {
                 text: "-"
-                color: Style.ncTextColor
                 verticalAlignment: Text.AlignVCenter
             }
 
             EnforcedPlainTextLabel {
                 text: root.clearAtText
-                color: Style.ncTextColor
                 verticalAlignment: Text.AlignVCenter
             }
         }
index 1e27d86776ec4bae4010ad4363b713d6d8475b9c..799a11034d663710a89c241151fd3a570ff5f75c 100644 (file)
@@ -130,7 +130,7 @@ ApplicationWindow {
             Layout.fillWidth: true
             Layout.leftMargin: 5
             Layout.rightMargin: 5
-            color: Style.menuBorder
+            color: palette.dark
             height: 1
         }
 
index 6b532b8a1e759a93de05221397a425ad9377fa34..35c4793ce2d3191f212b613842a46f66c0d5a1d9 100644 (file)
@@ -38,7 +38,6 @@ ColumnLayout {
             horizontalAlignment: Text.AlignHCenter
             font.bold: true
             text: qsTr("Online status")
-            color: Style.ncTextColor
         }
 
         GridLayout {
@@ -123,7 +122,6 @@ ColumnLayout {
             horizontalAlignment: Text.AlignHCenter
             font.bold: true
             text: qsTr("Status message")
-            color: Style.ncTextColor
         }
 
         RowLayout {
@@ -146,13 +144,13 @@ ColumnLayout {
                 padding: 0
                 z: hovered ? 2 : 0 // Make sure highlight is seen on top of text field
 
-                property color borderColor: showBorder ? Style.ncBlue : Style.menuBorder
+                property color borderColor: showBorder ? Style.ncBlue : palette.dark
 
                 // We create the square with only the top-left and bottom-left rounded corners
                 // by overlaying different rectangles on top of each other
                 background: Rectangle {
                     radius: Style.slightlyRoundedButtonRadius
-                    color: Style.buttonBackgroundColor
+                    color: palette.button
                     border.color: fieldButton.borderColor
                     border.width: Style.normalBorderWidth
 
@@ -161,7 +159,7 @@ ColumnLayout {
                         anchors.leftMargin: parent.width / 2
                         anchors.rightMargin: -1
                         z: 1
-                        color: Style.buttonBackgroundColor
+                        color: palette.button
                         border.color: fieldButton.borderColor
                         border.width: Style.normalBorderWidth
                     }
@@ -173,7 +171,7 @@ ColumnLayout {
                         anchors.topMargin: Style.normalBorderWidth
                         anchors.bottomMargin: Style.normalBorderWidth
                         z: 2
-                        color: Style.buttonBackgroundColor
+                        color: palette.button
                     }
                 }
             }
@@ -187,9 +185,9 @@ ColumnLayout {
                 anchors.centerIn: Overlay.overlay
 
                 background: Rectangle {
-                    color: Style.backgroundColor
+                    color: palette.toolTipBase
                     border.width: Style.normalBorderWidth
-                    border.color: Style.menuBorder
+                    border.color: palette.dark
                     radius: Style.slightlyRoundedButtonRadius
                 }
 
@@ -206,22 +204,21 @@ ColumnLayout {
             TextField {
                 id: userStatusMessageTextField
 
-                property color borderColor: activeFocus ? Style.ncBlue : Style.menuBorder
+                property color borderColor: activeFocus ? Style.ncBlue : palette.dark
 
                 Layout.fillWidth: true
                 Layout.preferredHeight: contentHeight + (Style.smallSpacing * 2)
 
                 placeholderText: qsTr("What is your status?")
-                placeholderTextColor: Style.ncSecondaryTextColor
+                placeholderTextColor: palette.midlight
                 text: userStatusSelectorModel.userStatusMessage
-                color: Style.ncTextColor
                 verticalAlignment: TextInput.AlignVCenter
                 selectByMouse: true
                 onEditingFinished: userStatusSelectorModel.userStatusMessage = text
 
                 background: Rectangle {
                     radius: Style.slightlyRoundedButtonRadius
-                    color: Style.backgroundColor
+                    color: palette.base
                     border.color: userStatusMessageTextField.borderColor
                     border.width: Style.normalBorderWidth
 
@@ -229,7 +226,7 @@ ColumnLayout {
                         anchors.fill: parent
                         anchors.rightMargin: parent.width / 2
                         z: 1
-                        color: Style.backgroundColor
+                        color: palette.base
                         border.color: userStatusMessageTextField.borderColor
                         border.width: Style.normalBorderWidth
                     }
@@ -241,7 +238,7 @@ ColumnLayout {
                         anchors.topMargin: Style.normalBorderWidth
                         anchors.bottomMargin: Style.normalBorderWidth
                         z: 2
-                        color: Style.backgroundColor
+                        color: palette.base
                     }
                 }
             }
@@ -285,7 +282,6 @@ ColumnLayout {
                 verticalAlignment: Text.AlignVCenter
 
                 text: qsTr("Clear status message after")
-                color: Style.ncTextColor
                 wrapMode: Text.Wrap
             }
 
index e2d700c355686b0cff25cabba2c011ad86ac061a..c549d25267e2a5649a6541a213c97ad4d2c1aa2b 100644 (file)
@@ -34,7 +34,7 @@ AbstractButton {
 
     background: Rectangle {
         radius: root.primary ? Style.veryRoundedButtonRadius : Style.mediumRoundedButtonRadius
-        color: root.colored ? Style.ncBlue : Style.buttonBackgroundColor
+        color: root.colored ? Style.ncBlue : palette.button
         opacity: root.colored && root.hovered ? Style.hoverOpacity : 1.0
         border.color: Style.ncBlue
         border.width: root.showBorder ? root.primary ? Style.normalBorderWidth : Style.thickBorderWidth : 0
@@ -71,7 +71,7 @@ AbstractButton {
 
             text: root.text
             wrapMode: Text.Wrap
-            color: root.colored ? Style.ncHeaderTextColor : Style.ncTextColor
+            color: root.colored ? palette.brightText : palette.buttonText
             font.bold: root.primary
         }
 
@@ -85,7 +85,7 @@ AbstractButton {
 
             text: root.secondaryText
             wrapMode: Text.Wrap
-            color: Style.ncSecondaryTextColor
+            color: palette.midlight
             visible: root.secondaryText !== ""
         }
     }
index 8c9aeea7a325076c6ccc4bb2c9a1d91a8bb9a3b3..42b92249f35aebe1d9ad637de5a81ad3208b9cd6 100644 (file)
@@ -32,7 +32,7 @@ Page {
     padding: Style.standardSpacing * 2
 
     background: Rectangle {
-        color: Style.backgroundColor
+        color: palette.window
         radius: Style.trayWindowRadius
     }
     
index b85b5808c0e76307d0e51ed61a87c6aa4e7a5092..5cced618a47e142682c5c04ac9aac9f632339193 100644 (file)
@@ -64,7 +64,7 @@ Page {
     bottomPadding: intendedPadding
 
     background: Rectangle {
-        color: Style.backgroundColor
+        color: palette.window
         visible: root.backgroundsVisible
     }
 
@@ -121,7 +121,6 @@ Page {
                 Layout.rightMargin: headerGridLayout.textRightMargin
 
                 text: root.fileDetails.name
-                color: Style.ncTextColor
                 font.bold: true
                 wrapMode: Text.Wrap
             }
@@ -134,8 +133,8 @@ Page {
                 Layout.preferredHeight: width
                 Layout.rightMargin: headerGridLayout.textRightMargin
 
-                icon.source: "image://svgimage-custom-color/clear.svg" + "/" + Style.ncTextColor
-                bgColor: Style.lightHover
+                icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
+                bgColor: palette.highlight
                 bgNormalOpacity: 0
                 toolTipText: qsTr("Dismiss")
 
@@ -151,7 +150,7 @@ Page {
                 Layout.rightMargin: headerGridLayout.textRightMargin
 
                 text: `${root.fileDetails.sizeString} Â· ${root.fileDetails.lastChangedString}`
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 wrapMode: Text.Wrap
             }
 
@@ -162,7 +161,7 @@ Page {
                 Layout.rightMargin: headerGridLayout.textRightMargin
 
                 text: root.fileDetails.lockExpireString
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 wrapMode: Text.Wrap
                 visible: headerGridLayout.showFileLockedString
             }
@@ -220,7 +219,7 @@ Page {
 
             padding: 0
             background: Rectangle {
-                color: Style.backgroundColor
+                color: palette.window
             }
 
             NCTabButton {
index de5fec16e399adcce13d88ac50f974187daddcd2..93e130e0534db4db723a9d8bdd502c783b064ae4 100644 (file)
@@ -30,7 +30,7 @@ StackView {
     property bool backgroundsVisible: true
 
     background: Rectangle {
-        color: Style.backgroundColor
+        color: palette.window
         visible: root.backgroundsVisible
     }
 
index 1a62637883def838ef4089910e3c7e1ed7accdca..2a5207586cf4632ef994c136bff3c9797ac61917 100644 (file)
@@ -21,13 +21,13 @@ EnforcedPlainTextLabel {
     id: internalLabel
 
     background: Rectangle {
-        border.color: Style.lightHover
+        border.color: palette.dark
         border.width: Style.normalBorderWidth
         radius: Style.veryRoundedButtonRadius
         color: "transparent"
     }
 
-    color: Style.ncSecondaryTextColor
+    color: palette.midlight
     elide: Text.ElideRight
     padding: Style.smallSpacing
 }
index 85cd399402568b56594052f7ccde4b17bf26d74f..a43c2bd0a42caa663f718e9235f62437aaa892ff 100644 (file)
@@ -22,12 +22,11 @@ import Style 1.0
 TextEdit {
     id: root
 
-    property color accentColor: Style.ncBlue
-    property color secondaryColor: Style.menuBorder
-    property alias submitButton: submitButton
+    readonly property color accentColor: Style.ncBlue
+    readonly property color secondaryColor: palette.dark
+    readonly property alias submitButton: submitButton
 
     clip: true
-    color: Style.ncTextColor
     textMargin: Style.smallSpacing
     wrapMode: TextEdit.Wrap
     selectByMouse: true
@@ -39,7 +38,7 @@ TextEdit {
         radius: Style.slightlyRoundedButtonRadius
         border.width: Style.normalBorderWidth
         border.color: root.activeFocus ? root.accentColor : root.secondaryColor
-        color: Style.backgroundColor
+        color: palette.base
         z: -1
     }
 
index 36dd42ee7633a80b4794d0f2d4137d284ba73b83..37a7d23dc8b6f67c9e8e7f5bb7134212080cf5f9 100644 (file)
@@ -22,13 +22,11 @@ import Style 1.0
 TextField {
     id: root
 
-    property color accentColor: Style.ncBlue
-    property color secondaryColor: Style.menuBorder
-    property alias submitButton: submitButton
+    readonly property color accentColor: Style.ncBlue
+    readonly property color secondaryColor: palette.dark
+    readonly property alias submitButton: submitButton
 
     implicitHeight: Style.talkReplyTextFieldPreferredHeight
-    color: Style.ncTextColor
-    placeholderTextColor: secondaryColor
 
     rightPadding: submitButton.width
 
@@ -39,7 +37,7 @@ TextField {
         radius: Style.slightlyRoundedButtonRadius
         border.width: Style.normalBorderWidth
         border.color: root.activeFocus ? root.accentColor : root.secondaryColor
-        color: Style.backgroundColor
+        color: palette.base
     }
 
     Button {
index 05e879164709ac1f62288a4ba473f70faeae7826..4fa1a905713ff6553953c0d3db0420efdca07bda 100644 (file)
@@ -18,10 +18,10 @@ import Style 1.0
 
 RadioButton {
     id: root
+
     property int indicatorItemWidth: Style.radioButtonIndicatorSize
     property int indicatorItemHeight: Style.radioButtonIndicatorSize
-    property string color: Style.ncTextColor
-    readonly property int radius: Style.radioButtonCustomRadius
+    property int radius: Style.radioButtonCustomRadius
 
     indicator: Rectangle {
         implicitWidth: root.indicatorItemWidth
@@ -30,12 +30,13 @@ RadioButton {
         anchors.left: parent.left
         anchors.leftMargin: Style.radioButtonCustomMarginLeftOuter
         radius: root.radius
-        border.color: root.color
+        border.color: palette.dark
         border.width: Style.normalBorderWidth
+
         Rectangle {
             anchors.fill: parent
             visible: root.checked
-            color: root.color
+            color: palette.buttonText
             radius: root.radius
             anchors.margins: Style.radioButtonCustomMarginLeftInner
         }
index 569569e63cb3a9d0906fa42ab806aafa454234e8..dfd31faafd71c0a1d1a5217dae6ac7ecbcc1fcaf 100644 (file)
@@ -29,13 +29,13 @@ TabButton {
     padding: Style.smallSpacing
     background: Rectangle {
         radius: Style.slightlyRoundedButtonRadius
-        color: tabButton.pressed ? Style.lightHover : Style.backgroundColor
+        color: tabButton.pressed ? palette.highlight : palette.window
     }
 
     contentItem: ColumnLayout {
         id: tabButtonLayout
 
-        property var elementColors: tabButton.checked || tabButton.hovered ? Style.ncTextColor : Style.ncSecondaryTextColor
+        property var elementColors: tabButton.checked || tabButton.hovered ? palette.buttonText : palette.midlight
 
         // We'd like to just set the height of the Image, but this causes crashing.
         // So we use a wrapping Item and use anchors to adjust the size.
@@ -82,7 +82,7 @@ TabButton {
             implicitWidth: textWidth + Style.standardSpacing * 2
             implicitHeight: 2
 
-            color: tabButton.checked ? Style.ncBlue : tabButton.hovered ? Style.lightHover : "transparent"
+            color: tabButton.checked ? Style.ncBlue : tabButton.hovered ? palette.highlight : "transparent"
         }
     }
 }
index 5338ce18cbeca7eec8846c2cfc801528c251053c..0539f7119a516a9ae104645b74988d381575344d 100644 (file)
@@ -126,7 +126,6 @@ GridLayout {
         Layout.rowSpan: root.rows
 
         text: root.text
-        color: Style.ncTextColor
         elide: Text.ElideRight
     }
 
@@ -139,7 +138,7 @@ GridLayout {
         Layout.column: 1
 
         text: root.detailText
-        color: Style.ncSecondaryTextColor
+        color: palette.midlight
         elide: Text.ElideRight
         visible: text !== ""
     }
@@ -161,10 +160,10 @@ GridLayout {
 
             toolTipText: qsTr("Create a new share link")
 
-            bgColor: Style.lightHover
+            bgColor: palette.highlight
             bgNormalOpacity: 0
 
-            icon.source: "image://svgimage-custom-color/add.svg/" + Style.ncTextColor
+            icon.source: "image://svgimage-custom-color/add.svg/" + palette.buttonText
             icon.width: Style.smallIconSize
             icon.height: Style.smallIconSize
 
@@ -196,13 +195,13 @@ GridLayout {
             toolTipText: qsTr("Copy share link location")
 
             text: shareLinkCopied ? qsTr("Copied!") : ""
-            textColor: Style.ncHeaderTextColor
+            textColor: palette.brightText
             contentsFont.bold: true
-            bgColor: shareLinkCopied ? Style.positiveColor : Style.lightHover
+            bgColor: shareLinkCopied ? Style.positiveColor : palette.highlight
             bgNormalOpacity: shareLinkCopied ? 1 : 0
 
-            icon.source: shareLinkCopied ? "image://svgimage-custom-color/copy.svg/" + Style.ncHeaderTextColor :
-                                           "image://svgimage-custom-color/copy.svg/" + Style.ncTextColor
+            icon.source: shareLinkCopied ? "image://svgimage-custom-color/copy.svg/" + palette.brightText :
+                                           "image://svgimage-custom-color/copy.svg/" + palette.buttonText
             icon.width: Style.smallIconSize
             icon.height: Style.smallIconSize
 
@@ -244,10 +243,10 @@ GridLayout {
 
             toolTipText: qsTr("Share options")
 
-            bgColor: Style.lightHover
+            bgColor: palette.highlight
             bgNormalOpacity: 0
 
-            icon.source: "image://svgimage-custom-color/more.svg/" + Style.ncTextColor
+            icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
             icon.width: Style.smallIconSize
             icon.height: Style.smallIconSize
 
index 1fbc2d58267bba8e0e4abc124c01356478e3b3b9..bcea3148d84b8678d558db40f2b91c7c567118d1 100644 (file)
@@ -161,7 +161,7 @@ Page {
     padding: Style.standardSpacing * 2
 
     background: Rectangle {
-        color: Style.backgroundColor
+        color: palette.window
         visible: root.backgroundsVisible
     }
 
@@ -202,7 +202,6 @@ Page {
                 Layout.fillWidth: true
 
                 text: qsTr("Edit share")
-                color: Style.ncTextColor
                 font.bold: true
                 elide: Text.ElideRight
             }
@@ -215,8 +214,8 @@ Page {
                 Layout.preferredHeight: width
                 Layout.rightMargin: root.padding
 
-                icon.source: "image://svgimage-custom-color/clear.svg" + "/" + Style.ncTextColor
-                bgColor: Style.lightHover
+                icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
+                bgColor: palette.highlight
                 bgNormalOpacity: 0
                 toolTipText: qsTr("Dismiss")
 
@@ -230,7 +229,7 @@ Page {
                 Layout.rightMargin: root.padding
 
                 text: root.fileDetails.name
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 wrapMode: Text.Wrap
             }
         }
@@ -265,7 +264,7 @@ Page {
                     horizontalAlignment: Image.AlignHCenter
                     fillMode: Image.Pad
 
-                    source: "image://svgimage-custom-color/edit.svg/" + Style.menuBorder
+                    source: "image://svgimage-custom-color/edit.svg/" + palette.dark
                     sourceSize.width: moreMenu.rowIconWidth
                     sourceSize.height: moreMenu.rowIconWidth
                 }
@@ -303,7 +302,7 @@ Page {
                 sourceComponent: CheckBox {
                     // TODO: Rather than setting all these palette colours manually,
                     // create a custom style and do it for all components globally
-                    palette.window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                    palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
                     spacing: moreMenu.indicatorSpacing
                     padding: moreMenu.itemPadding
                     indicator.width: moreMenu.indicatorItemWidth
@@ -403,7 +402,7 @@ Page {
 
                         // TODO: Rather than setting all these palette colours manually,
                         // create a custom style and do it for all components globally
-                        palette.window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                        palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
 
                         spacing: moreMenu.indicatorSpacing
                         padding: moreMenu.itemPadding
@@ -431,7 +430,7 @@ Page {
 
                 // TODO: Rather than setting all these palette colours manually,
                 // create a custom style and do it for all components globally
-                palette.window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
 
                 spacing: moreMenu.indicatorSpacing
                 padding: moreMenu.itemPadding
@@ -472,7 +471,7 @@ Page {
                     horizontalAlignment: Image.AlignHCenter
                     fillMode: Image.Pad
 
-                    source: "image://svgimage-custom-color/lock-https.svg/" + Style.menuBorder
+                    source: "image://svgimage-custom-color/lock-https.svg/" + palette.dark
                     sourceSize.width: moreMenu.rowIconWidth
                     sourceSize.height: moreMenu.rowIconWidth
                 }
@@ -540,7 +539,7 @@ Page {
 
                 // TODO: Rather than setting all these palette colours manually,
                 // create a custom style and do it for all components globally
-                palette.window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
 
                 spacing: moreMenu.indicatorSpacing
                 padding: moreMenu.itemPadding
@@ -580,7 +579,7 @@ Page {
                     horizontalAlignment: Image.AlignHCenter
                     fillMode: Image.Pad
 
-                    source: "image://svgimage-custom-color/calendar.svg/" + Style.menuBorder
+                    source: "image://svgimage-custom-color/calendar.svg/" + palette.dark
                     sourceSize.width: moreMenu.rowIconWidth
                     sourceSize.height: moreMenu.rowIconWidth
                 }
@@ -735,7 +734,7 @@ Page {
 
                 // TODO: Rather than setting all these palette colours manually,
                 // create a custom style and do it for all components globally
-                palette.window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the checkbox
+                palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
 
                 spacing: moreMenu.indicatorSpacing
                 padding: moreMenu.itemPadding
@@ -775,7 +774,7 @@ Page {
                     horizontalAlignment: Image.AlignHCenter
                     fillMode: Image.Pad
 
-                    source: "image://svgimage-custom-color/edit.svg/" + Style.menuBorder
+                    source: "image://svgimage-custom-color/edit.svg/" + palette.dark
                     sourceSize.width: moreMenu.rowIconWidth
                     sourceSize.height: moreMenu.rowIconWidth
                 }
@@ -811,12 +810,12 @@ Page {
                 height: Style.standardPrimaryButtonHeight
 
                 icon.source: "image://svgimage-custom-color/close.svg/" + Style.errorBoxBackgroundColor
-                imageSourceHover: "image://svgimage-custom-color/close.svg/" + Style.ncHeaderTextColor
+                imageSourceHover: "image://svgimage-custom-color/close.svg/" + palette.brightText
                 text: qsTr("Unshare")
                 textColor: Style.errorBoxBackgroundColor
                 textColorHovered: "white"
                 contentsFont.bold: true
-                bgNormalColor: Style.buttonBackgroundColor
+                bgNormalColor: palette.button
                 bgHoverColor: Style.errorBoxBackgroundColor
                 bgNormalOpacity: 1.0
                 bgHoverOpacity: 1.0
@@ -828,12 +827,12 @@ Page {
                 height: Style.standardPrimaryButtonHeight
 
                 icon.source: "image://svgimage-custom-color/add.svg/" + Style.ncBlue
-                imageSourceHover: "image://svgimage-custom-color/add.svg/" + Style.ncHeaderTextColor
+                imageSourceHover: "image://svgimage-custom-color/add.svg/" + palette.brightText
                 text: qsTr("Add another link")
                 textColor: Style.ncBlue
-                textColorHovered: Style.ncHeaderTextColor
+                textColorHovered: palette.brightText
                 contentsFont.bold: true
-                bgNormalColor: Style.buttonBackgroundColor
+                bgNormalColor: palette.button
                 bgHoverColor: Style.ncBlue
                 bgNormalOpacity: 1.0
                 bgHoverOpacity: 1.0
@@ -872,9 +871,9 @@ Page {
 
             height: Style.standardPrimaryButtonHeight
 
-            icon.source: "image://svgimage-custom-color/copy.svg/" + Style.ncHeaderTextColor
+            icon.source: "image://svgimage-custom-color/copy.svg/" + palette.brightText
             text: shareLinkCopied ? qsTr("Share link copied!") : qsTr("Copy share link")
-            textColor: Style.ncHeaderTextColor
+            textColor: palette.brightText
             contentsFont.bold: true
             bgColor: shareLinkCopied ? Style.positiveColor : Style.ncBlue
             bgNormalOpacity: 1.0
index f0773d7a4077ea9ea39dc232a0c73c5516d29513..90ad8e899e844e56aec1160be1c48d9783699f7b 100644 (file)
@@ -245,12 +245,12 @@ ColumnLayout {
                     z: Infinity
 
                     sourceComponent: Rectangle {
-                        color: Style.backgroundColor
+                        color: palette.window
                         opacity: 0.5
 
                         NCBusyIndicator {
                             anchors.centerIn: parent
-                            color: Style.ncSecondaryTextColor
+                            color: palette.midlight
                         }
                     }
                 }
@@ -277,7 +277,7 @@ ColumnLayout {
                 id: sharingDisabledLabel
                 width: parent.width
                 text: qsTr("Sharing is disabled")
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 wrapMode: Text.Wrap
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
@@ -285,7 +285,7 @@ ColumnLayout {
             EnforcedPlainTextLabel {
                 width: parent.width
                 text: qsTr("This item cannot be shared.")
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 wrapMode: Text.Wrap
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
@@ -294,7 +294,7 @@ ColumnLayout {
             EnforcedPlainTextLabel {
                 width: parent.width
                 text: qsTr("Sharing is disabled.")
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 wrapMode: Text.Wrap
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
index 221b14b6967a077ebe9d9733fdf6ef08757ddfd2..40b169d87be1e977a3a0b11659e2e65bd3b6f845 100644 (file)
@@ -67,7 +67,6 @@ ItemDelegate {
             horizontalAlignment: Text.AlignLeft
             verticalAlignment: Text.AlignVCenter
             text: model.display
-            color: Style.ncTextColor
         }
     }
 }
index 0f24c2c414cd92c74682db13db25e6c491f1ab5d..9fbb144820ba0ea153aed88e395068fca98bf8d3 100644 (file)
@@ -37,7 +37,7 @@ TextField {
     }
 
     readonly property int horizontalPaddingOffset: Style.trayHorizontalMargin
-    readonly property color placeholderColor: Style.menuBorder
+    readonly property color placeholderColor: palette.dark
     readonly property double iconsScaleFactor: 0.6
 
     function triggerSuggestionsVisibility() {
@@ -46,7 +46,6 @@ TextField {
 
     placeholderText: qsTr("Search for users or groups…")
     placeholderTextColor: placeholderColor
-    color: Style.ncTextColor
     enabled: !shareeModel.fetchOngoing
 
     onActiveFocusChanged: triggerSuggestionsVisibility()
@@ -93,9 +92,9 @@ TextField {
 
     background: Rectangle {
         radius: 5
-        border.color: parent.activeFocus ? UserModel.currentUser.accentColor : Style.menuBorder
+        border.color: parent.activeFocus ? UserModel.currentUser.accentColor : palette.dark
         border.width: 1
-        color: Style.backgroundColor
+        color: palette.base
     }
 
     Image {
@@ -172,26 +171,6 @@ TextField {
         height: 100
         y: root.height
 
-        // 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
-        }
-
         contentItem: ScrollView {
             id: suggestionsScrollView
 
@@ -208,7 +187,7 @@ TextField {
                 highlight: Rectangle {
                     width: shareeListView.currentItem.width
                     height: shareeListView.currentItem.height
-                    color: Style.lightHover
+                    color: palette.highlight
                 }
                 highlightFollowsCurrentItem: true
                 highlightMoveDuration: 0
index 65f5f87d4363af4a681188db82083145eda4c4ae..f648716b6abe06ac91fc93ef60a3ca66b4f89379 100644 (file)
@@ -12,9 +12,9 @@ AbstractButton {
 
     property string imageSourceHover: ""
 
-    property color adjustedHeaderColor: Style.adjustedCurrentUserHeaderColor
-    property color textColor: primaryButton ? adjustedHeaderColor : Style.ncTextColor
-    property color textColorHovered: primaryButton ? Style.currentUserHeaderTextColor : Style.ncTextColor
+    readonly property color adjustedHeaderColor: Style.adjustedCurrentUserHeaderColor
+    readonly property color textColor: primaryButton ? adjustedHeaderColor : palette.buttonText
+    readonly property color textColorHovered: primaryButton ? Style.currentUserHeaderTextColor : palette.buttonText
 
     property string verb: ""
     property bool isTalkReplyButton: false
@@ -39,13 +39,10 @@ AbstractButton {
         text: root.toolTipText
         delay: Qt.styleHints.mousePressAndHoldInterval
         visible: root.toolTipText !== "" && root.hovered
-        contentItem: EnforcedPlainTextLabel {
-            text: customTextButtonTooltip.text
-            color: Style.ncTextColor
-        }
+        contentItem: EnforcedPlainTextLabel { text: customTextButtonTooltip.text }
         background: Rectangle {
-            border.color: Style.menuBorder
-            color: Style.backgroundColor
+            border.color: palette.dark
+            color: palette.toolTipBase
         }
     }
 
index e13c724029d0581c8db2707b75be4d5a66a6ed72..a969eb395d108aaa012d9dfd926acb5febff4b60 100644 (file)
@@ -13,8 +13,6 @@ RowLayout {
 
     property variant activity: {{}}
 
-    property color activityTextTitleColor: Style.ncTextColor
-
     property bool showDismissButton: false
 
     property bool childHovered: fileDetailsButton.hovered || dismissActionButton.hovered
@@ -139,7 +137,6 @@ RowLayout {
                 wrapMode: Text.Wrap
                 maximumLineCount: 2
                 font.pixelSize: Style.topLinePixelSize
-                color: Style.ncTextColor
                 visible: text !== ""
             }
 
@@ -156,7 +153,7 @@ RowLayout {
 
                 text: root.activityData.dateTime
                 font.pixelSize: Style.subLinePixelSize
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 visible: text !== ""
             }
 
@@ -167,7 +164,7 @@ RowLayout {
                 Layout.preferredHeight: Style.dismissButtonSize
                 Layout.alignment: Qt.AlignTop | Qt.AlignRight
 
-                icon.source: "image://svgimage-custom-color/more.svg/" + Style.ncTextColor
+                icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
 
                 NCToolTip {
                     text: qsTr("Open file details")
@@ -177,7 +174,7 @@ RowLayout {
                 display: Button.IconOnly
                 leftPadding: 0
                 rightPadding: 0
-                bgColor: Style.darkerHover
+                bgColor: palette.mid
                 bgNormalOpacity:  0
 
                 visible: model.showFileDetails
@@ -194,12 +191,12 @@ RowLayout {
 
                 visible: root.showDismissButton && !fileDetailsButton.visible
 
-                icon.source: "image://svgimage-custom-color/clear.svg/" + Style.ncTextColor
+                icon.source: "image://svgimage-custom-color/clear.svg/" + palette.buttonText
 
                 display: Button.IconOnly
                 leftPadding: 0
                 rightPadding: 0
-                bgColor: Style.darkerHover
+                bgColor: palette.mid
                 bgNormalOpacity: 0
 
                 NCToolTip {
@@ -233,7 +230,6 @@ RowLayout {
                 wrapMode: Text.Wrap
                 maximumLineCount: 2
                 font.pixelSize: Style.subLinePixelSize
-                color: Style.ncTextColor
                 visible: text !== ""
             }
 
@@ -253,7 +249,7 @@ RowLayout {
                 wrapMode: Text.Wrap
                 maximumLineCount: 2
                 font.pixelSize: Style.topLinePixelSize
-                color: Style.ncSecondaryTextColor
+                color: palette.midlight
                 visible: text !== ""
             }
 
index acbe7ee8214629c0ebdfbafd385b89bc74c6d626..7dd000090ce1f95b6ac381653dd522ebbf9c3513 100644 (file)
@@ -20,7 +20,6 @@ AutoSizingMenu {
         delegate: MenuItem {
             id: moreActionsButtonContextMenuEntry
             text: model.modelData.label
-            palette.windowText: Style.ncTextColor
             onTriggered: menuEntryTriggered(model.modelData.actionIndex)
         }
     }
index 436a79e5bd6c6dc1adc5dc3809f426f66d54b0d5..aca70962ecc1222cdfccf175b3d95437a66fc0f9 100644 (file)
@@ -39,12 +39,11 @@ ScrollView {
             id: activityHover
 
             anchors.fill: activityList.currentItem
-
-            color: Style.lightHover
+            color: palette.highlight
             visible: activityList.activeFocus
-
             radius: Style.mediumRoundedButtonRadius
         }
+
         highlightFollowsCurrentItem: true
         highlightMoveDuration: 0
         highlightResizeDuration: 0
@@ -100,13 +99,13 @@ ScrollView {
                 verticalAlignment: Image.AlignVCenter
                 horizontalAlignment: Image.AlignHCenter
                 fillMode: Image.PreserveAspectFit
-                source: "image://svgimage-custom-color/activity.svg/" + Style.ncSecondaryTextColor
+                source: "image://svgimage-custom-color/activity.svg/" + palette.midlight
             }
 
             EnforcedPlainTextLabel {
                width: parent.width
                text: qsTr("No activities yet")
-               color: Style.ncSecondaryTextColor
+               color: palette.midlight
                font.bold: true
                wrapMode: Text.Wrap
                horizontalAlignment: Text.AlignHCenter
index efc23d1bf5da5c7e53f155f63e4a4f6209bfab70..d9e6c4b6ac08819b4866fb6c0f471dc1edc78196 100644 (file)
@@ -4,8 +4,8 @@ import Style 1.0
 
 Menu {
     background: Rectangle {
-        border.color: Style.menuBorder
-        color: Style.backgroundColor
+        border.color: palette.dark
+        color: palette.base
     }
 
     width: {
index d8cc49bead3a5b9107fa09d165d69ac17f1a80be..dd3d2a9f0b0a83c13fa55db993c677d4bde6b84a 100644 (file)
@@ -109,7 +109,7 @@ ApplicationWindow {
         radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
         color: Style.backgroundColor
         border.width: Style.trayWindowBorderWidth
-        border.color: Style.menuBorder
+        border.color: palette.dark
         clip: true
 
         Loader {
@@ -184,7 +184,7 @@ ApplicationWindow {
                     cache: true
 
                     source: root.usingUserAvatar ? root.talkNotificationData.userAvatar :
-                                                   Theme.darkMode ? root.talkIcon + Style.ncTextColor : root.talkIcon + Style.ncBlue
+                                                   Theme.darkMode ? root.talkIcon + palette.windowText : root.talkIcon + Style.ncBlue
                     sourceSize.width: Style.accountAvatarSize
                     sourceSize.height: Style.accountAvatarSize
 
@@ -215,7 +215,7 @@ ApplicationWindow {
             EnforcedPlainTextLabel {
                 id: message
                 text: root.subject
-                color: root.usingUserAvatar ? "white" : Style.ncTextColor
+                color: root.usingUserAvatar ? palette.brightText : palette.windowText
                 font.pixelSize: Style.topLinePixelSize
                 wrapMode: Text.WordWrap
                 horizontalAlignment: Text.AlignHCenter
@@ -243,10 +243,10 @@ ApplicationWindow {
                         bgColor: Style.ncBlue
                         bgNormalOpacity: 0.8
 
-                        textColor: Style.ncHeaderTextColor
+                        textColor: palette.brightText
 
-                        icon.source: root.talkIcon + Style.ncHeaderTextColor
-                        imageSourceHover: root.talkIcon + Style.ncHeaderTextColor
+                        icon.source: root.talkIcon + palette.brightText
+                        imageSourceHover: root.talkIcon + palette.brightText
 
                         Layout.fillWidth: true
                         Layout.preferredHeight: Style.callNotificationPrimaryButtonMinHeight
@@ -270,7 +270,7 @@ ApplicationWindow {
                     bgColor: Style.errorBoxBackgroundColor
                     bgNormalOpacity: 0.8
 
-                    textColor: Style.ncHeaderTextColor
+                    textColor: palette.brightText
 
                     icon.source: root.deleteIcon + "white"
                     imageSourceHover: root.deleteIcon + "white"
index e7a4fd6c75cc5ec3b2cb9f3076fcac32863dbdff..39d0552c0d9061c5e54082ee3cb2e1b4448c72d5 100644 (file)
@@ -25,7 +25,7 @@ Button {
 
     property string toolTipText: ""
 
-    property color textColor: Style.ncTextColor
+    property color textColor: palette.buttonText
     property color textColorHovered: textColor
 
     property alias contentsFont: contents.font
index 5c47163b5465c9c6efec449428c9cace3b7e09d1..c453279f2650eee2d8dfc188697fa65e32d3b942 100644 (file)
@@ -52,7 +52,7 @@ ApplicationWindow {
         id: windowBackground
         color: Style.backgroundColor
         radius: Style.trayWindowRadius
-        border.color: Style.ncTextColor
+        border.color: palette.dark
         anchors.fill: parent
     }
 
@@ -63,6 +63,7 @@ ApplicationWindow {
         anchors.leftMargin: Style.standardSpacing
         anchors.rightMargin: Style.standardSpacing
         spacing: Style.standardSpacing
+
         NCBusyIndicator {
             id: busyIndicator
             Layout.topMargin: Style.standardSpacing
@@ -72,7 +73,7 @@ ApplicationWindow {
             imageSourceSizeHeight: root.iconWidth
             imageSourceSizeWidth: root.iconWidth
             padding: 0
-            color: Style.ncTextColor
+            color: palette.windowText
             running: true
         }
         EnforcedPlainTextLabel {
@@ -83,7 +84,6 @@ ApplicationWindow {
             elide: Text.ElideMiddle
             font.bold: true
             font.pixelSize: root.fontPixelSize
-            color: Style.ncTextColor
             horizontalAlignment: Text.AlignHCenter
             visible: root.fileName !== ""
         }
@@ -95,7 +95,6 @@ ApplicationWindow {
             text: qsTr("Opening file for local editing")
             elide: Text.ElideRight
             font.pixelSize: root.fontPixelSize
-            color: Style.ncTextColor
             horizontalAlignment: Text.AlignHCenter
         }
     }
index 43ac7e14d346c181cebf3fa6eb2d82b3a1230a3d..add4b487d5968deebb16d1e4714ccfc5dbd23cc5 100644 (file)
@@ -33,7 +33,7 @@ Button {
 
     icon.width: Style.headerButtonIconSize
     icon.height: Style.headerButtonIconSize
-    icon.color: Style.ncHeaderTextColor
+    icon.color: palette.brightText
 
     Layout.alignment: Qt.AlignRight
     Layout.preferredWidth:  Style.trayWindowHeaderHeight
index a226d8b8ebc486c834c4108a176e4d7c35df31fc..ce1a76f10d4beea3978c53d524ae0767c64c9f3b 100644 (file)
@@ -29,8 +29,8 @@ ColumnLayout {
     property int titleFontSize: Style.unifiedSearchResultTitleFontSize
     property int sublineFontSize: Style.unifiedSearchResultSublineFontSize
 
-    property color titleColor: Style.ncTextColor
-    property color sublineColor: Style.ncSecondaryTextColor
+    property color titleColor: palette.windowText
+    property color sublineColor: palette.midlight
 
     EnforcedPlainTextLabel {
         id: title
index 400e274a4828b4fcfe56c0a8a7fcdd2239b45b23..973d3dee1ed628b93e928b1adc42202fb341fdb5 100644 (file)
@@ -19,7 +19,7 @@ import Style 1.0
 BusyIndicator {
     id: root
 
-    property color color: Style.ncSecondaryTextColor
+    property color color: palette.midlight
     property string imageSource: "image://svgimage-custom-color/change.svg/"
 
     property int imageSourceSizeWidth: 64
index 3e960a61142b427f79fc7e123fed5e3bf0b70a31..d7a8e01e3773f0ffb5d085da19bc178e7b5a9df5 100644 (file)
@@ -20,8 +20,8 @@ Rectangle {
     property bool hovered: false
     property real normalOpacity: 0.3
     property real hoverOpacity: 1.0
-    property color normalColor: Style.buttonBackgroundColor
-    property color hoverColor: Style.buttonBackgroundColor
+    property color normalColor: palette.button
+    property color hoverColor: palette.button
 
     color: hovered ? hoverColor : normalColor
     opacity: hovered ? hoverOpacity : normalOpacity
index 1cffdf728f8c7738922b8955e429bc36203e84b5..f469f168ec344009f6318ad9ad69d7c02f0c262e 100644 (file)
@@ -29,7 +29,7 @@ RowLayout {
     property string text: ""
     property var display
 
-    property color textColor: Style.ncTextColor
+    property color textColor: palette.buttonText
     property color textColorHovered: textColor
     property alias font: buttonLabel.font
 
index efe51419667cd30a8fd657da6e3309d978f03a73..c32aa0c462828e84c6de6aa5d26d9cdfc95d70c0 100644 (file)
@@ -24,11 +24,11 @@ ToolTip {
     delay: Qt.styleHints.mousePressAndHoldInterval
     contentItem: EnforcedPlainTextLabel {
         text: toolTip.text
-        color: Style.ncTextColor
         wrapMode: Text.Wrap
+        color: palette.toolTipText
     }
     background: Rectangle {
-        border.color: Style.menuBorder
-        color: Style.backgroundColor
+        border.color: palette.dark
+        color: palette.toolTipBase
     }
 }
index 6345bf79d0fc1fb7d82dc25096ada3dd384c74a3..b26452572bec11b1749b163305ff26701cc37cf6 100644 (file)
@@ -56,7 +56,6 @@ RowLayout {
             verticalAlignment: Text.AlignVCenter
             font.pixelSize: Style.topLinePixelSize
             font.bold: true
-            color: Style.ncTextColor
             wrapMode: Text.Wrap
         }
 
@@ -71,7 +70,7 @@ RowLayout {
 
                 // TODO: Rather than setting all these palette colours manually,
                 // create a custom style and do it for all components globally
-                palette.window: Style.ncTextColor // NOTE: Fusion theme uses darker window colour for the border of the progress bar
+                palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the progress bar
                 value: syncStatus.syncProgress
             }
         }
@@ -83,7 +82,7 @@ RowLayout {
 
             text: syncStatus.syncStatusDetailString
             visible: syncStatus.syncStatusDetailString !== ""
-            color: Style.ncSecondaryTextColor
+            color: palette.midlight
             font.pixelSize: Style.subLinePixelSize
             wrapMode: Text.Wrap
         }
index 79070590ed053b37fab6619add0a9e190971f643..3cc1f867af097956335ba1f6bada3e81cc2a1ace 100644 (file)
@@ -13,7 +13,6 @@ TextField {
 
     height: Style.talkReplyTextFieldPreferredHeight
     visible: model.messageSent === ""
-    color: Style.ncTextColor
     placeholderText: qsTr("Reply to â€¦")
 
     onAccepted: sendReplyMessage()
@@ -22,8 +21,8 @@ TextField {
         id: replyMessageTextFieldBorder
         radius: width / 2
         border.width: Style.normalBorderWidth
-        border.color: replyMessageTextField.activeFocus ? UserModel.currentUser.accentColor : Style.menuBorder
-        color: Style.backgroundColor
+        border.color: replyMessageTextField.activeFocus ? UserModel.currentUser.accentColor : palette.dark
+        color: palette.window
     }
 
     Button {
@@ -39,8 +38,8 @@ TextField {
         background: null
 
         icon {
-            source: "image://svgimage-custom-color/send.svg" + "/" + Style.menuBorder
-            color: hovered || !sendReplyMessageButton.enabled ? Style.menuBorder : UserModel.currentUser.accentColor
+            source: "image://svgimage-custom-color/send.svg" + "/" + palette.dark
+            color: hovered || !sendReplyMessageButton.enabled ? palette.dark : UserModel.currentUser.accentColor
         }
 
         anchors {
index 031da73c078ed46e3df2904de7797146f4a98384..9bd3b8a987c6091b16e56eff714f363f868fc1b5 100644 (file)
@@ -20,8 +20,8 @@ import Style 1.0
 
 EnforcedPlainTextLabel {
     property bool hovered: false
-    property color textColor: Style.ncTextColor
-    property color textColorHovered: Style.ncSecondaryTextColor
+    property color textColor: palette.windowText
+    property color textColorHovered: palette.midlight
     property bool bold: false
 
     font.underline: true
index f9325aea015c9a5b24e6d103153d27a7fda4af31..60fd21570ecb82bed65a6a8573385f43b906353c 100644 (file)
@@ -21,7 +21,7 @@ MenuItem {
     id: root
 
     property string subline: ""
-    property string iconSource: "image://svgimage-custom-color/folder-group.svg/" + Style.ncTextColor
+    property string iconSource: "image://svgimage-custom-color/folder-group.svg/" + palette.buttonText
     property string toolTipText: root.text
 
     NCToolTip {
@@ -35,7 +35,7 @@ MenuItem {
         Rectangle {
             anchors.fill: parent
             anchors.margins: Style.normalBorderWidth
-            color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"
+            color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
         }
     }
 
index 79cf4a1cd24565353b67e93940eb338d203fca25..2953ae12ab3cab72b91ddcf74de312248b41c3b5 100644 (file)
@@ -185,7 +185,9 @@ HeaderButton {
                         subline: model.modelData.parentPath
                         width: foldersMenuListView.width
                         height: Style.standardPrimaryButtonHeight
-                        iconSource: !isGroupFolder ? "image://svgimage-custom-color/folder.svg/" + Style.ncTextColor : "image://svgimage-custom-color/folder-group.svg/" + Style.ncTextColor
+                        iconSource: !isGroupFolder ?
+                                        "image://svgimage-custom-color/folder.svg/" + palette.buttonText :
+                                        "image://svgimage-custom-color/folder-group.svg/" + palette.buttonText
 
                         onTriggered: {
                             foldersMenu.close();
index 6fd92ecad47545e438e3c69ff135349b6f78e796..7890a01d2b7d5397667d6ef1885a1a28a87a9505 100644 (file)
@@ -25,7 +25,7 @@ TextField {
 
     property bool isSearchInProgress: false
 
-    readonly property color textFieldIconsColor: Style.menuBorder
+    readonly property color textFieldIconsColor: palette.dark
 
     readonly property int textFieldIconsOffset: Style.trayHorizontalMargin
 
@@ -42,13 +42,13 @@ TextField {
 
     selectByMouse: true
 
-    palette.text: Style.ncSecondaryTextColor
+    palette.text: palette.midlight
 
     background: Rectangle {
         radius: 5
-        border.color: parent.activeFocus ? UserModel.currentUser.accentColor : Style.menuBorder
+        border.color: parent.activeFocus ? UserModel.currentUser.accentColor : palette.dark
         border.width: 1
-        color: Style.backgroundColor
+        color: palette.window
     }
 
     Image {
index 642129ccc36f6f77ab72d387e7f77ba59b32ba6a..cf894a12f8514dfac0f4b92863529b63d9b4ea16 100644 (file)
@@ -26,7 +26,7 @@ ColumnLayout {
 
     property int fontSize: Style.unifiedSearchResultTitleFontSize
 
-    property string textColor: Style.ncSecondaryTextColor
+    property string textColor: palette.midlight
 
     Accessible.role: Accessible.ListItem
     Accessible.name: unifiedSearchResultItemFetchMoreText.text
index eed8bf22dece17be1ba9553538b7cad919ea76b2..b0d0151a85e6ec4b70acc6054e0079a4762f38ae 100644 (file)
@@ -35,8 +35,8 @@ RowLayout {
     property int titleFontSize: Style.unifiedSearchResultTitleFontSize
     property int sublineFontSize: Style.unifiedSearchResultSublineFontSize
 
-    property color titleColor: Style.ncTextColor
-    property color sublineColor: Style.ncSecondaryTextColor
+    property color titleColor: palette.buttonText
+    property color sublineColor: palette.midlight
 
 
     Accessible.role: Accessible.ListItem
index b956df9d8bed2c85557c0f18f384296c894eaa1b..e8ebf63da8abcc25b1db0edf09be523142340280 100644 (file)
@@ -51,7 +51,7 @@ RowLayout {
     * one single gradient sweeping over the base color components
     */
 
-    property color baseGradientColor: Style.lightHover
+    property color baseGradientColor: palette.light
     property int animationRectangleWidth: Style.trayWindowWidth
 
     Item {
index 03e6613646153739e8c4923ecae8efeb41bf2b18..0f4fdaa3266e7df82675b6fe844465f7141f814f 100644 (file)
@@ -45,7 +45,7 @@ ColumnLayout {
             id: placeholderSectionHeaderRectangle
             anchors.fill: parent
             radius: Style.veryRoundedButtonRadius
-            color: Style.lightHover
+            color: palette.light
             clip: true
             visible: false
 
index 1450eaf045304902b9f07cd597d5756308dfa41d..8faa0b56c37f24861e21f53baee70979364a58c2 100644 (file)
@@ -22,7 +22,7 @@ import Style 1.0
 Rectangle {
     id: root
 
-    property color progressGradientColor: Style.darkMode ? Qt.lighter(Style.lightHover, 1.2) : Qt.darker(Style.lightHover, 1.1)
+    property color progressGradientColor: Style.darkMode ? Qt.lighter(palette.light, 1.2) : Qt.darker(palette.light, 1.1)
     property int animationStartX: -width
     property int animationEndX: width
 
index 2c27c0fb92d424eb41351dfec3f24a5b2bcbc752..f8a025572d5ed96ce5f6648067a9469d7c98e64f 100644 (file)
@@ -46,7 +46,7 @@ MouseArea {
     Rectangle {
         id: unifiedSearchResultHoverBackground
         anchors.fill: parent
-        color: (parent.containsMouse ? Style.lightHover : "transparent")
+        color: (parent.containsMouse ? palette.highlight : "transparent")
     }
 
     Loader {
index d1ff10bdfdd5be448cb60c469914cf9e65e49ce2..f66b1fdafe4dec4fe0b06b79c5a51cc267c23427 100644 (file)
@@ -38,7 +38,7 @@ ColumnLayout {
     EnforcedPlainTextLabel {
         id: unifiedSearchResultsNoResultsLabel
         text: qsTr("No results for")
-        color: Style.menuBorder
+        color: palette.dark
         font.pixelSize: Style.subLinePixelSize * 1.25
         wrapMode: Text.Wrap
         Layout.fillWidth: true
@@ -49,7 +49,6 @@ ColumnLayout {
     EnforcedPlainTextLabel {
         id: unifiedSearchResultsNoResultsLabelDetails
         text: unifiedSearchResultNothingFoundContainer.text
-        color: Style.ncTextColor
         font.pixelSize: Style.topLinePixelSize * 1.25
         wrapMode: Text.Wrap
         maximumLineCount: 2
index 8000bfe81d3d8f132e17f440178aa7a34f291f94..79dccedafd1e70f08afece55e3678585a9b0744f 100644 (file)
@@ -37,7 +37,9 @@ AbstractButton {
     background: Rectangle {\r
         anchors.fill: parent\r
         anchors.margins: 1\r
-        color: (userLine.hovered || userLine.visualFocus) && !(userMoreButton.hovered || userMoreButton.visualFocus) ? Style.lightHover : Style.backgroundColor\r
+        color: (userLine.hovered || userLine.visualFocus) &&\r
+               !(userMoreButton.hovered || userMoreButton.visualFocus) ?\r
+                   palette.highlight : palette.base\r
     }\r
 \r
     contentItem: RowLayout {\r
@@ -92,7 +94,6 @@ AbstractButton {
                 verticalAlignment: Text.AlignBottom\r
                 text: name\r
                 elide: Text.ElideRight\r
-                color: Style.ncTextColor\r
                 font.pixelSize: Style.topLinePixelSize\r
                 font.bold: true\r
             }\r
@@ -118,7 +119,6 @@ AbstractButton {
                     visible: model.statusMessage !== ""\r
                     text: statusMessage\r
                     elide: Text.ElideRight\r
-                    color: Style.ncTextColor\r
                     font.pixelSize: Style.subLinePixelSize\r
                     leftPadding: Style.accountLabelsSpacing\r
                 }\r
@@ -131,7 +131,6 @@ AbstractButton {
                 verticalAlignment: Text.AlignTop\r
                 text: server\r
                 elide: Text.ElideRight\r
-                color: Style.ncTextColor\r
                 font.pixelSize: Style.subLinePixelSize\r
             }\r
         }\r
@@ -143,7 +142,7 @@ AbstractButton {
             flat: true\r
 \r
             icon.source: "qrc:///client/theme/more.svg"\r
-            icon.color: Style.ncTextColor\r
+            icon.color: palette.buttonText\r
 \r
             Accessible.role: Accessible.ButtonMenu\r
             Accessible.name: qsTr("Account actions")\r
@@ -153,7 +152,7 @@ AbstractButton {
             background: Rectangle {\r
                 anchors.fill: parent\r
                 anchors.margins: 1\r
-                color: userMoreButton.hovered || userMoreButton.visualFocus ? Style.lightHover : "transparent"\r
+                color: userMoreButton.hovered || userMoreButton.visualFocus ? palette.highlight : "transparent"\r
             }\r
 \r
             AutoSizingMenu {\r
@@ -161,8 +160,8 @@ AbstractButton {
                 closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape\r
 \r
                 background: Rectangle {\r
-                    border.color: Style.menuBorder\r
-                    color: Style.backgroundColor\r
+                    border.color: palette.dark\r
+                    color: palette.base\r
                     radius: 2\r
                 }\r
 \r
@@ -181,7 +180,7 @@ AbstractButton {
                         Rectangle {\r
                             anchors.fill: parent\r
                             anchors.margins: 1\r
-                            color: parent.parent.hovered ? Style.lightHover : "transparent"\r
+                            color: parent.parent.hovered ? palette.highlight : "transparent"\r
                         }\r
                     }\r
                 }\r
@@ -202,7 +201,7 @@ AbstractButton {
                         Rectangle {\r
                             anchors.fill: parent\r
                             anchors.margins: 1\r
-                            color: parent.parent.hovered ? Style.lightHover : "transparent"\r
+                            color: parent.parent.hovered ? palette.highlight : "transparent"\r
                         }\r
                     }\r
 \r
@@ -236,7 +235,7 @@ AbstractButton {
                         Rectangle {\r
                             anchors.fill: parent\r
                             anchors.margins: 1\r
-                            color: parent.parent.hovered ? Style.lightHover : "transparent"\r
+                            color: parent.parent.hovered ? palette.highlight : "transparent"\r
                         }\r
                     }\r
 \r
index b7b100dfdae21d625fd6801a620d2c5f7d27a6f8..7af3659701e356c0981a0c0ccb178daf32b39d5e 100644 (file)
@@ -82,8 +82,8 @@ ApplicationWindow {
     background: Rectangle {\r
         radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius\r
         border.width: Style.trayWindowBorderWidth\r
-        border.color: Style.menuBorder\r
-        color: Style.backgroundColor\r
+        border.color: palette.dark\r
+        color: palette.window\r
     }\r
 \r
     Connections {\r
@@ -158,8 +158,8 @@ ApplicationWindow {
         background: Rectangle {\r
             radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius\r
             border.width: Style.trayWindowBorderWidth\r
-            border.color: Style.menuBorder\r
-            color: Style.backgroundColor\r
+            border.color: palette.dark\r
+            color: palette.window\r
         }\r
 \r
         property int userIndex: 0\r
@@ -195,8 +195,8 @@ ApplicationWindow {
         background: Rectangle {\r
             radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius\r
             border.width: Style.trayWindowBorderWidth\r
-            border.color: Style.menuBorder\r
-            color: Style.backgroundColor\r
+            border.color: palette.dark\r
+            color: palette.window\r
         }\r
 \r
         property var folderAccountState: ({})\r
@@ -306,8 +306,8 @@ ApplicationWindow {
                         closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape\r
 \r
                         background: Rectangle {\r
-                            border.color: Style.menuBorder\r
-                            color: Style.backgroundColor\r
+                            border.color: palette.dark\r
+                            color: palette.base\r
                             radius: Style.currentAccountButtonRadius\r
                         }\r
 \r
@@ -359,7 +359,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
                                 }\r
                             }\r
 \r
@@ -377,7 +377,6 @@ ApplicationWindow {
                                 EnforcedPlainTextLabel {\r
                                     Layout.leftMargin: 14\r
                                     text: qsTr("Add account")\r
-                                    color: Style.ncTextColor\r
                                     font.pixelSize: Style.topLinePixelSize\r
                                 }\r
                                 // Filler on the right\r
@@ -397,7 +396,7 @@ ApplicationWindow {
                             anchors.left: parent.left\r
                             anchors.right: parent.right\r
                             implicitHeight: 1\r
-                            color: Style.menuBorder\r
+                            color: palette.dark\r
                         }\r
 \r
                         MenuItem {\r
@@ -412,7 +411,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
                                 }\r
                             }\r
 \r
@@ -434,7 +433,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
                                 }\r
                             }\r
 \r
@@ -456,7 +455,7 @@ ApplicationWindow {
                                 Rectangle {\r
                                     anchors.fill: parent\r
                                     anchors.margins: 1\r
-                                    color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"\r
+                                    color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
                                 }\r
                             }\r
 \r
@@ -670,8 +669,8 @@ ApplicationWindow {
                         closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape\r
 \r
                         background: Rectangle {\r
-                            border.color: Style.menuBorder\r
-                            color: Style.backgroundColor\r
+                            border.color: palette.dark\r
+                            color: palette.base\r
                             radius: 2\r
                         }\r
 \r
@@ -697,7 +696,7 @@ ApplicationWindow {
                                     text: model.appName\r
                                     font.pixelSize: Style.topLinePixelSize\r
                                     icon.source: model.appIconUrl\r
-                                    icon.color: Style.ncTextColor\r
+                                    icon.color: palette.buttonText\r
                                     onTriggered: UserAppsModel.openAppUrl(appUrl)\r
                                     hoverEnabled: true\r
 \r
@@ -707,7 +706,7 @@ ApplicationWindow {
                                         Rectangle {\r
                                             anchors.fill: parent\r
                                             anchors.margins: 1\r
-                                            color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"\r
+                                            color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"\r
                                         }\r
                                     }\r
 \r
index 6c9de574267cef3de99995fd9cd78636bd2ec48a..a67cb3044714364e1f69d4b4343ec70d1c4d4574 100644 (file)
@@ -13,7 +13,6 @@ QtObject {
     readonly property color ncTextColor: Theme.systemPalette.windowText\r
     readonly property color ncTextBrightColor: "white"\r
     readonly property color ncSecondaryTextColor: "#808080"\r
-    readonly property color ncHeaderTextColor: "white"\r
     readonly property color lightHover: Theme.darkMode ? Qt.lighter(backgroundColor, 2) : Qt.darker(backgroundColor, 1.05)\r
     readonly property color darkerHover: Theme.darkMode ? Qt.lighter(backgroundColor, 2.35) : Qt.darker(backgroundColor, 1.25)\r
     readonly property color menuBorder: Theme.darkMode ? Qt.lighter(backgroundColor, 2.5) : Qt.darker(backgroundColor, 1.5)\r