QML UI: use textColor instead of diveListTextColor

This color is used for more than just the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-23 18:07:48 -07:00
parent 694e833f90
commit 8ba581a088
4 changed files with 17 additions and 14 deletions

View file

@ -96,21 +96,21 @@ Item {
text: dive.date + " " + dive.time
width: Math.max(locationText.width * 0.45, paintedWidth)
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.diveListTextColor
color: subsurfaceTheme.textColor
}
// let's try to show the depth / duration very compact
Kirigami.Label {
text: dive.depth + ' / ' + dive.duration
width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth)
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.diveListTextColor
color: subsurfaceTheme.textColor
}
}
Kirigami.Label {
id: numberText
text: "#" + dive.number
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.diveListTextColor
color: subsurfaceTheme.textColor
anchors {
right: parent.right
top: locationText.bottom

View file

@ -17,7 +17,7 @@ Kirigami.ScrollablePage {
width: subsurfaceTheme.columnWidth
property int credentialStatus: manager.credentialStatus
property int numDives: diveListView.count
property color textColor: subsurfaceTheme.diveListTextColor
property color textColor: subsurfaceTheme.textColor
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
supportsRefreshing: true
@ -49,7 +49,7 @@ Kirigami.ScrollablePage {
width: parent.width
height: diveListEntry.height + Kirigami.Units.smallSpacing
backgroundColor: checked ? subsurfaceTheme.primaryColor : subsurfaceTheme.backgroundColor
textColor: checked ? subsurfaceTheme.primaryTextColor : subsurfaceTheme.diveListTextColor
textColor: checked ? subsurfaceTheme.primaryTextColor : subsurfaceTheme.textColor
property real detailsOpacity : 0

View file

@ -20,7 +20,7 @@ Kirigami.AbstractListItem {
property real detailsOpacity : 0
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
property color textColor: subsurfaceTheme.diveListTextColor
property color textColor: subsurfaceTheme.textColor
Row {
width: parent.width

View file

@ -317,7 +317,7 @@ Kirigami.ApplicationWindow {
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.blueLightPrimaryColor
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.blueLightPrimaryTextColor
subsurfaceTheme.backgroundColor = subsurfaceTheme.blueBackgroundColor
subsurfaceTheme.diveListTextColor = subsurfaceTheme.lightPrimaryTextColor
subsurfaceTheme.textColor = subsurfaceTheme.blueTextColor
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
}
@ -330,7 +330,7 @@ Kirigami.ApplicationWindow {
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.pinkLightPrimaryColor
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.pinkLightPrimaryTextColor
subsurfaceTheme.backgroundColor = subsurfaceTheme.pinkBackgroundColor
subsurfaceTheme.diveListTextColor = subsurfaceTheme.lightPrimaryTextColor
subsurfaceTheme.textColor = subsurfaceTheme.pinkTextColor
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
}
@ -343,7 +343,7 @@ Kirigami.ApplicationWindow {
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.darkLightPrimaryColor
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.darkLightPrimaryTextColor
subsurfaceTheme.backgroundColor = subsurfaceTheme.darkBackgroundColor
subsurfaceTheme.diveListTextColor = subsurfaceTheme.primaryTextColor
subsurfaceTheme.textColor = subsurfaceTheme.darkTextColor
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
}
@ -361,7 +361,7 @@ Kirigami.ApplicationWindow {
property color lightPrimaryColor
property color lightPrimaryTextColor
property color backgroundColor
property color diveListTextColor
property color textColor
// colors for the blue theme
property color blueDarkerPrimaryColor: "#303F9f"
@ -371,6 +371,7 @@ Kirigami.ApplicationWindow {
property color blueLightPrimaryColor: "#C5CAE9"
property color blueLightPrimaryTextColor: "#212121"
property color blueBackgroundColor: "#eff0f1"
property color blueTextColor: blueLightPrimaryTextColor
// colors for the pink theme
property color pinkDarkerPrimaryColor: "#FF1493"
@ -380,6 +381,7 @@ Kirigami.ApplicationWindow {
property color pinkLightPrimaryColor: "#FFDDF4"
property color pinkLightPrimaryTextColor: "#212121"
property color pinkBackgroundColor: "#eff0f1"
property color pinkTextColor: pinkLightPrimaryTextColor
// colors for the dark theme
property color darkDarkerPrimaryColor: "#303F9f"
@ -389,16 +391,17 @@ Kirigami.ApplicationWindow {
property color darkLightPrimaryColor: "#C5CAE9"
property color darkLightPrimaryTextColor: "#212121"
property color darkBackgroundColor: "#000000"
property color darkTextColor: darkPrimaryTextColor
property color contrastAccentColor: "#FF9800" // used for delete button
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: {
Kirigami.Theme.highlightColor = Qt.binding(function() { return darkPrimaryColor })
Kirigami.Theme.highlighedTextColor = Qt.binding(function() { return darkPrimaryTextColor })
Kirigami.Theme.highlightColor = Qt.binding(function() { return darkerPrimaryColor })
Kirigami.Theme.highlighedTextColor = Qt.binding(function() { return darkerPrimaryTextColor })
Kirigami.Theme.backgroundColor = Qt.binding(function() { return backgroundColor })
Kirigami.Theme.textColor = Qt.binding(function() { return diveListTextColor })
Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return lightPrimaryColor })
Kirigami.Theme.textColor = Qt.binding(function() { return textColor })
Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return darkerPrimaryColor })
// this needs to pick the theme from persistent preference settings
blueTheme()