mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
Fix dark mode switching issues with main tray window
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
cde52f03fa
commit
fef9f3b643
9 changed files with 101 additions and 8 deletions
|
@ -166,6 +166,9 @@ Page {
|
|||
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
|
||||
|
@ -173,6 +176,8 @@ Page {
|
|||
button: Style.menuBorder
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
|
@ -99,6 +99,9 @@ ColumnLayout {
|
|||
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
|
||||
|
@ -106,6 +109,8 @@ ColumnLayout {
|
|||
button: Style.menuBorder
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
visible: false
|
||||
|
|
|
@ -178,6 +178,9 @@ TextField {
|
|||
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
|
||||
|
@ -185,6 +188,8 @@ TextField {
|
|||
button: Style.menuBorder
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
contentItem: ScrollView {
|
||||
|
|
|
@ -18,6 +18,26 @@ ItemDelegate {
|
|||
readonly property bool isTalkReplyPossible: model.conversationToken !== ""
|
||||
property bool isTalkReplyOptionVisible: model.messageSent !== ""
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
padding: Style.standardSpacing
|
||||
|
||||
Accessible.role: Accessible.ListItem
|
||||
|
|
|
@ -14,6 +14,26 @@ ScrollView {
|
|||
signal openFile(string filePath)
|
||||
signal activityItemClicked(int index)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
contentWidth: availableWidth
|
||||
padding: 0
|
||||
focus: false
|
||||
|
|
|
@ -75,6 +75,9 @@ RowLayout {
|
|||
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
|
||||
|
@ -82,6 +85,8 @@ RowLayout {
|
|||
button: Style.menuBorder
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
value: syncStatus.syncProgress
|
||||
|
|
|
@ -44,7 +44,6 @@ HeaderButton {
|
|||
visible: currentUser.hasLocalFolder
|
||||
display: AbstractButton.IconOnly
|
||||
flat: true
|
||||
palette: Style.systemPalette
|
||||
|
||||
Accessible.role: root.userHasGroupFolders ? Accessible.ButtonMenu : Accessible.Button
|
||||
Accessible.name: tooltip.text
|
||||
|
|
|
@ -257,7 +257,6 @@ ApplicationWindow {
|
|||
Layout.preferredHeight: Style.trayWindowHeaderHeight
|
||||
display: AbstractButton.IconOnly
|
||||
flat: true
|
||||
palette: Style.systemPalette
|
||||
|
||||
Accessible.role: Accessible.ButtonMenu
|
||||
Accessible.name: qsTr("Current account")
|
||||
|
@ -285,7 +284,26 @@ ApplicationWindow {
|
|||
width: (Style.currentAccountButtonWidth - 2)
|
||||
height: Math.min(implicitHeight, maxMenuHeight)
|
||||
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape
|
||||
palette: Style.palette
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
border.color: Style.menuBorder
|
||||
|
@ -334,7 +352,6 @@ ApplicationWindow {
|
|||
id: addAccountButton
|
||||
height: Style.addAccountButtonHeight
|
||||
hoverEnabled: true
|
||||
palette: Theme.systemPalette
|
||||
|
||||
background: Item {
|
||||
height: parent.height
|
||||
|
@ -386,7 +403,6 @@ ApplicationWindow {
|
|||
MenuItem {
|
||||
id: syncPauseButton
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
hoverEnabled: true
|
||||
onClicked: Systray.syncIsPaused = !Systray.syncIsPaused
|
||||
|
||||
|
@ -409,7 +425,6 @@ ApplicationWindow {
|
|||
id: settingsButton
|
||||
text: qsTr("Settings")
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
hoverEnabled: true
|
||||
onClicked: Systray.openSettings()
|
||||
|
||||
|
@ -432,7 +447,6 @@ ApplicationWindow {
|
|||
id: exitButton
|
||||
text: qsTr("Exit");
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
hoverEnabled: true
|
||||
onClicked: Systray.shutdown()
|
||||
|
||||
|
@ -655,6 +669,26 @@ ApplicationWindow {
|
|||
height: implicitHeight + y > Style.trayWindowHeight ? Style.trayWindowHeight - y : implicitHeight
|
||||
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
border.color: Style.menuBorder
|
||||
color: Style.backgroundColor
|
||||
|
@ -682,7 +716,6 @@ ApplicationWindow {
|
|||
|
||||
text: model.appName
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
icon.source: model.appIconUrl
|
||||
icon.color: Style.ncTextColor
|
||||
onTriggered: UserAppsModel.openAppUrl(appUrl)
|
||||
|
|
|
@ -11,6 +11,7 @@ QtObject {
|
|||
// Colors
|
||||
readonly property color ncBlue: Theme.wizardHeaderBackgroundColor
|
||||
readonly property color ncTextColor: Theme.systemPalette.windowText
|
||||
readonly property color ncTextBrightColor: "white"
|
||||
readonly property color ncSecondaryTextColor: "#808080"
|
||||
readonly property color ncHeaderTextColor: "white"
|
||||
readonly property color lightHover: Theme.darkMode ? Qt.lighter(backgroundColor, 2) : Qt.darker(backgroundColor, 1.05)
|
||||
|
|
Loading…
Reference in a new issue