diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-06-23 18:07:48 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-23 19:49:57 -0700 |
commit | 8ba581a088b3723a7a111c5774c59da15df109ad (patch) | |
tree | cc9e8b9bfe272fde61cc9f878e16a3aaed8d82c6 /mobile-widgets/qml | |
parent | 694e833f906bb6ff3464525ac4ce0bf52c74dd6d (diff) | |
download | subsurface-8ba581a088b3723a7a111c5774c59da15df109ad.tar.gz |
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>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetailsView.qml | 6 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 4 | ||||
-rw-r--r-- | mobile-widgets/qml/DownloadedDiveDelegate.qml | 2 | ||||
-rw-r--r-- | mobile-widgets/qml/main.qml | 19 |
4 files changed, 17 insertions, 14 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index b060df733..95aed5a47 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -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 diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 3992ce2b3..6a511cec7 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -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 diff --git a/mobile-widgets/qml/DownloadedDiveDelegate.qml b/mobile-widgets/qml/DownloadedDiveDelegate.qml index 5bfc884b3..630382e34 100644 --- a/mobile-widgets/qml/DownloadedDiveDelegate.qml +++ b/mobile-widgets/qml/DownloadedDiveDelegate.qml @@ -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 diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index bf5354ef6..508e1edfe 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -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() |