QML UI: use primaryColor instead of darkerPrimaryColor

In most places we wrongly used the darker primary color instead of the primary color.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
Joakim Bygdell 2017-07-25 19:46:59 +02:00 committed by Dirk Hohndel
parent efc5f4d9ab
commit e9503cfa3d
2 changed files with 10 additions and 9 deletions

View file

@ -122,7 +122,7 @@ Item {
color: "transparent" color: "transparent"
opacity: 0.6 opacity: 0.6
border.width: 1 border.width: 1
border.color: subsurfaceTheme.darkerPrimaryColor border.color: subsurfaceTheme.primaryColor
anchors.fill: parent anchors.fill: parent
} }
} }
@ -179,7 +179,7 @@ Item {
} }
Rectangle { Rectangle {
color: subsurfaceTheme.darkerPrimaryColor color: subsurfaceTheme.primaryColor
height: 1 height: 1
opacity: 0.5 opacity: 0.5
Layout.columnSpan: 3 Layout.columnSpan: 3
@ -232,7 +232,7 @@ Item {
} }
Rectangle { Rectangle {
color: subsurfaceTheme.darkerPrimaryColor color: subsurfaceTheme.primaryColor
height: 1 height: 1
opacity: 0.5 opacity: 0.5
Layout.columnSpan: 3 Layout.columnSpan: 3
@ -274,7 +274,7 @@ Item {
} }
Rectangle { Rectangle {
color: subsurfaceTheme.darkerPrimaryColor color: subsurfaceTheme.primaryColor
height: 1 height: 1
opacity: 0.5 opacity: 0.5
Layout.columnSpan: 3 Layout.columnSpan: 3

View file

@ -291,7 +291,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
function blueTheme() { function blueTheme() {
Material.theme = Material.Light Material.theme = Material.Light
Material.accent = subsurfaceTheme.blueDarkerPrimaryColor Material.accent = subsurfaceTheme.bluePrimaryColor
subsurfaceTheme.currentTheme = "Blue" subsurfaceTheme.currentTheme = "Blue"
subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.blueDarkerPrimaryColor subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.blueDarkerPrimaryColor
subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.blueDarkerPrimaryTextColor subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.blueDarkerPrimaryTextColor
@ -308,7 +308,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
function pinkTheme() { function pinkTheme() {
Material.theme = Material.Light Material.theme = Material.Light
Material.accent = subsurfaceTheme.pinkDarkerPrimaryColor Material.accent = subsurfaceTheme.pinkPrimaryColor
subsurfaceTheme.currentTheme = "Pink" subsurfaceTheme.currentTheme = "Pink"
subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.pinkDarkerPrimaryColor subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.pinkDarkerPrimaryColor
subsurfaceTheme.darkerPrimaryTextColor = subsurfaceTheme.pinkDarkerPrimaryTextColor subsurfaceTheme.darkerPrimaryTextColor = subsurfaceTheme.pinkDarkerPrimaryTextColor
@ -325,7 +325,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
function darkTheme() { function darkTheme() {
Material.theme = Material.Dark Material.theme = Material.Dark
Material.accent = subsurfaceTheme.darkDarkerPrimaryColor Material.accent = subsurfaceTheme.darkerPrimaryColor
subsurfaceTheme.currentTheme = "Dark" subsurfaceTheme.currentTheme = "Dark"
subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.darkDarkerPrimaryColor subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.darkDarkerPrimaryColor
subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.darkDarkerPrimaryTextColor subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.darkDarkerPrimaryTextColor
@ -398,15 +398,16 @@ if you have network connectivity and want to sync your data to cloud storage."),
property int columnWidth: Math.round(rootItem.width/(Kirigami.Units.gridUnit*28)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(Kirigami.Units.gridUnit*28))) : rootItem.width property int columnWidth: Math.round(rootItem.width/(Kirigami.Units.gridUnit*28)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(Kirigami.Units.gridUnit*28))) : rootItem.width
Component.onCompleted: { Component.onCompleted: {
Kirigami.Theme.highlightColor = Qt.binding(function() { return darkerPrimaryColor }) Kirigami.Theme.highlightColor = Qt.binding(function() { return primaryColor })
Kirigami.Theme.highlightedTextColor = Qt.binding(function() { return darkerPrimaryTextColor }) Kirigami.Theme.highlightedTextColor = Qt.binding(function() { return darkerPrimaryTextColor })
Kirigami.Theme.backgroundColor = Qt.binding(function() { return backgroundColor }) Kirigami.Theme.backgroundColor = Qt.binding(function() { return backgroundColor })
Kirigami.Theme.textColor = Qt.binding(function() { return textColor }) Kirigami.Theme.textColor = Qt.binding(function() { return textColor })
Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return darkerPrimaryColor }) Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return primaryColor })
Kirigami.Theme.viewBackgroundColor = Qt.binding(function() { return drawerColor }) Kirigami.Theme.viewBackgroundColor = Qt.binding(function() { return drawerColor })
Kirigami.Theme.viewTextColor = Qt.binding(function() { return textColor }) Kirigami.Theme.viewTextColor = Qt.binding(function() { return textColor })
Kirigami.Theme.buttonBackgroundColor = Qt.binding(function() { return drawerColor }) Kirigami.Theme.buttonBackgroundColor = Qt.binding(function() { return drawerColor })
Kirigami.Theme.buttonTextColor = Qt.binding(function() { return textColor }) Kirigami.Theme.buttonTextColor = Qt.binding(function() { return textColor })
Kirigami.Theme.buttonFocusColor = Qt.binding(function() { return "red" })
// this needs to pick the theme from persistent preference settings // this needs to pick the theme from persistent preference settings
var theme = manager.theme var theme = manager.theme