mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
remove any use of custom palette: use the style palette
should get us native colors as much as possible Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
8f942240c6
commit
65dd912dd6
9 changed files with 0 additions and 321 deletions
|
@ -31,24 +31,6 @@ Item {
|
|||
CheckBox {
|
||||
id: selectItem
|
||||
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
|
|
|
@ -36,26 +36,6 @@ ApplicationWindow {
|
|||
minimumHeight: Style.minimumHeightResolveConflictsDialog
|
||||
title: qsTr('Solve sync conflicts')
|
||||
|
||||
// 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.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
onClosing: function(close) {
|
||||
Systray.destroyDialog(self);
|
||||
close.accepted = true
|
||||
|
@ -94,24 +74,6 @@ ApplicationWindow {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: palette.dark // 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
|
||||
|
@ -130,24 +92,6 @@ ApplicationWindow {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: palette.dark // 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
|
||||
|
|
|
@ -33,26 +33,6 @@ ApplicationWindow {
|
|||
|
||||
title: qsTr("File details of %1 · %2").arg(fileDetailsPage.fileDetails.name).arg(Systray.windowTitle)
|
||||
|
||||
// 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.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
FileDetailsView {
|
||||
id: fileDetailsPage
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -314,30 +314,6 @@ Page {
|
|||
active: !root.isFolderItem && !root.isEncryptedItem
|
||||
visible: active
|
||||
sourceComponent: CheckBox {
|
||||
// TODO: Rather than setting all these palette colours manually,
|
||||
// create a custom style and do it for all components globally.
|
||||
//
|
||||
// Additionally, we need to override the entire palette when we
|
||||
// set one palette property, as otherwise we default back to the
|
||||
// theme palette -- not the parent palette
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.menuBorder
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
spacing: scrollContentsColumn.indicatorSpacing
|
||||
padding: scrollContentsColumn.itemPadding
|
||||
indicator.width: scrollContentsColumn.indicatorItemWidth
|
||||
|
@ -419,30 +395,6 @@ Page {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
// TODO: Rather than setting all these palette colours manually,
|
||||
// create a custom style and do it for all components globally.
|
||||
//
|
||||
// Additionally, we need to override the entire palette when we
|
||||
// set one palette property, as otherwise we default back to the
|
||||
// theme palette -- not the parent palette
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
spacing: scrollContentsColumn.indicatorSpacing
|
||||
padding: scrollContentsColumn.itemPadding
|
||||
indicator.width: scrollContentsColumn.indicatorItemWidth
|
||||
|
@ -482,30 +434,6 @@ Page {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
// TODO: Rather than setting all these palette colours manually,
|
||||
// create a custom style and do it for all components globally.
|
||||
//
|
||||
// Additionally, we need to override the entire palette when we
|
||||
// set one palette property, as otherwise we default back to the
|
||||
// theme palette -- not the parent palette
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
spacing: scrollContentsColumn.indicatorSpacing
|
||||
padding: scrollContentsColumn.itemPadding
|
||||
indicator.width: scrollContentsColumn.indicatorItemWidth
|
||||
|
@ -531,30 +459,6 @@ Page {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
// TODO: Rather than setting all these palette colours manually,
|
||||
// create a custom style and do it for all components globally.
|
||||
//
|
||||
// Additionally, we need to override the entire palette when we
|
||||
// set one palette property, as otherwise we default back to the
|
||||
// theme palette -- not the parent palette
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.menuBorder
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
spacing: scrollContentsColumn.indicatorSpacing
|
||||
padding: scrollContentsColumn.itemPadding
|
||||
indicator.width: scrollContentsColumn.indicatorItemWidth
|
||||
|
@ -664,30 +568,6 @@ Page {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
// TODO: Rather than setting all these palette colours manually,
|
||||
// create a custom style and do it for all components globally.
|
||||
//
|
||||
// Additionally, we need to override the entire palette when we
|
||||
// set one palette property, as otherwise we default back to the
|
||||
// theme palette -- not the parent palette
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.menuBorder
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
spacing: scrollContentsColumn.indicatorSpacing
|
||||
padding: scrollContentsColumn.itemPadding
|
||||
indicator.width: scrollContentsColumn.indicatorItemWidth
|
||||
|
@ -772,30 +652,6 @@ Page {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
// TODO: Rather than setting all these palette colours manually,
|
||||
// create a custom style and do it for all components globally.
|
||||
//
|
||||
// Additionally, we need to override the entire palette when we
|
||||
// set one palette property, as otherwise we default back to the
|
||||
// theme palette -- not the parent palette
|
||||
palette {
|
||||
text: Style.ncTextColor
|
||||
windowText: Style.ncTextColor
|
||||
buttonText: Style.ncTextColor
|
||||
brightText: Style.ncTextBrightColor
|
||||
highlight: Style.lightHover
|
||||
highlightedText: Style.ncTextColor
|
||||
light: Style.lightHover
|
||||
midlight: Style.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.menuBorder
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
spacing: scrollContentsColumn.indicatorSpacing
|
||||
padding: scrollContentsColumn.itemPadding
|
||||
indicator.width: scrollContentsColumn.indicatorItemWidth
|
||||
|
|
|
@ -31,26 +31,6 @@ Page {
|
|||
|
||||
title: qsTr("Virtual files settings")
|
||||
|
||||
// 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.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: palette.window
|
||||
border.width: root.showBorder ? Style.normalBorderWidth : 0
|
||||
|
|
|
@ -55,26 +55,6 @@ ApplicationWindow {
|
|||
width: root.windowWidth
|
||||
height: rootBackground.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.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Systray.forceWindowInit(root);
|
||||
Systray.positionNotificationWindow(root);
|
||||
|
|
|
@ -19,26 +19,6 @@ ApplicationWindow {
|
|||
readonly property real fontPixelSize: Style.topLinePixelSize * 1.5
|
||||
readonly property real iconWidth: fontPixelSize * 2
|
||||
|
||||
// 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.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Systray.forceWindowInit(root);
|
||||
x = Screen.width / 2 - width / 2
|
||||
|
|
|
@ -167,7 +167,6 @@ AbstractButton {
|
|||
height: visible ? implicitHeight : 0
|
||||
text: qsTr("Set status")
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
hoverEnabled: true
|
||||
onClicked: showUserStatusSelector(index)
|
||||
}
|
||||
|
@ -175,7 +174,6 @@ AbstractButton {
|
|||
MenuItem {
|
||||
text: model.isConnected ? qsTr("Log out") : qsTr("Log in")
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
model.isConnected ? UserModel.logout(index) : UserModel.login(index)
|
||||
|
@ -209,7 +207,6 @@ AbstractButton {
|
|||
id: removeAccountButton
|
||||
text: qsTr("Remove account")
|
||||
font.pixelSize: Style.topLinePixelSize
|
||||
palette.windowText: Style.ncTextColor
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
UserModel.removeAccount(index)
|
||||
|
|
|
@ -36,26 +36,6 @@ ApplicationWindow {
|
|||
height: Style.trayWindowHeight
|
||||
flags: Systray.useNormalWindow ? Qt.Window : Qt.Dialog | Qt.FramelessWindowHint
|
||||
|
||||
// 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.ncSecondaryTextColor
|
||||
mid: Style.darkerHover
|
||||
dark: Style.menuBorder
|
||||
button: Style.buttonBackgroundColor
|
||||
window: Style.backgroundColor
|
||||
base: Style.backgroundColor
|
||||
toolTipBase: Style.backgroundColor
|
||||
toolTipText: Style.ncTextColor
|
||||
}
|
||||
|
||||
readonly property int maxMenuHeight: Style.trayWindowHeight - Style.trayWindowHeaderHeight - 2 * Style.trayWindowBorderWidth
|
||||
|
||||
Component.onCompleted: Systray.forceWindowInit(trayWindow)
|
||||
|
|
Loading…
Reference in a new issue