mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
694e833f90
commit
8ba581a088
4 changed files with 17 additions and 14 deletions
|
|
@ -96,21 +96,21 @@ Item {
|
||||||
text: dive.date + " " + dive.time
|
text: dive.date + " " + dive.time
|
||||||
width: Math.max(locationText.width * 0.45, paintedWidth)
|
width: Math.max(locationText.width * 0.45, paintedWidth)
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: subsurfaceTheme.diveListTextColor
|
color: subsurfaceTheme.textColor
|
||||||
}
|
}
|
||||||
// let's try to show the depth / duration very compact
|
// let's try to show the depth / duration very compact
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: dive.depth + ' / ' + dive.duration
|
text: dive.depth + ' / ' + dive.duration
|
||||||
width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth)
|
width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth)
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: subsurfaceTheme.diveListTextColor
|
color: subsurfaceTheme.textColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: numberText
|
id: numberText
|
||||||
text: "#" + dive.number
|
text: "#" + dive.number
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: subsurfaceTheme.diveListTextColor
|
color: subsurfaceTheme.textColor
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: locationText.bottom
|
top: locationText.bottom
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Kirigami.ScrollablePage {
|
||||||
width: subsurfaceTheme.columnWidth
|
width: subsurfaceTheme.columnWidth
|
||||||
property int credentialStatus: manager.credentialStatus
|
property int credentialStatus: manager.credentialStatus
|
||||||
property int numDives: diveListView.count
|
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
|
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
|
||||||
|
|
||||||
supportsRefreshing: true
|
supportsRefreshing: true
|
||||||
|
|
@ -49,7 +49,7 @@ Kirigami.ScrollablePage {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: diveListEntry.height + Kirigami.Units.smallSpacing
|
height: diveListEntry.height + Kirigami.Units.smallSpacing
|
||||||
backgroundColor: checked ? subsurfaceTheme.primaryColor : subsurfaceTheme.backgroundColor
|
backgroundColor: checked ? subsurfaceTheme.primaryColor : subsurfaceTheme.backgroundColor
|
||||||
textColor: checked ? subsurfaceTheme.primaryTextColor : subsurfaceTheme.diveListTextColor
|
textColor: checked ? subsurfaceTheme.primaryTextColor : subsurfaceTheme.textColor
|
||||||
|
|
||||||
property real detailsOpacity : 0
|
property real detailsOpacity : 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Kirigami.AbstractListItem {
|
||||||
|
|
||||||
property real detailsOpacity : 0
|
property real detailsOpacity : 0
|
||||||
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
|
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
|
||||||
property color textColor: subsurfaceTheme.diveListTextColor
|
property color textColor: subsurfaceTheme.textColor
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@ Kirigami.ApplicationWindow {
|
||||||
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.blueLightPrimaryColor
|
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.blueLightPrimaryColor
|
||||||
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.blueLightPrimaryTextColor
|
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.blueLightPrimaryTextColor
|
||||||
subsurfaceTheme.backgroundColor = subsurfaceTheme.blueBackgroundColor
|
subsurfaceTheme.backgroundColor = subsurfaceTheme.blueBackgroundColor
|
||||||
subsurfaceTheme.diveListTextColor = subsurfaceTheme.lightPrimaryTextColor
|
subsurfaceTheme.textColor = subsurfaceTheme.blueTextColor
|
||||||
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
|
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ Kirigami.ApplicationWindow {
|
||||||
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.pinkLightPrimaryColor
|
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.pinkLightPrimaryColor
|
||||||
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.pinkLightPrimaryTextColor
|
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.pinkLightPrimaryTextColor
|
||||||
subsurfaceTheme.backgroundColor = subsurfaceTheme.pinkBackgroundColor
|
subsurfaceTheme.backgroundColor = subsurfaceTheme.pinkBackgroundColor
|
||||||
subsurfaceTheme.diveListTextColor = subsurfaceTheme.lightPrimaryTextColor
|
subsurfaceTheme.textColor = subsurfaceTheme.pinkTextColor
|
||||||
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
|
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -343,7 +343,7 @@ Kirigami.ApplicationWindow {
|
||||||
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.darkLightPrimaryColor
|
subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.darkLightPrimaryColor
|
||||||
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.darkLightPrimaryTextColor
|
subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.darkLightPrimaryTextColor
|
||||||
subsurfaceTheme.backgroundColor = subsurfaceTheme.darkBackgroundColor
|
subsurfaceTheme.backgroundColor = subsurfaceTheme.darkBackgroundColor
|
||||||
subsurfaceTheme.diveListTextColor = subsurfaceTheme.primaryTextColor
|
subsurfaceTheme.textColor = subsurfaceTheme.darkTextColor
|
||||||
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
|
manager.setStatusbarColor(subsurfaceTheme.darkPrimaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -361,7 +361,7 @@ Kirigami.ApplicationWindow {
|
||||||
property color lightPrimaryColor
|
property color lightPrimaryColor
|
||||||
property color lightPrimaryTextColor
|
property color lightPrimaryTextColor
|
||||||
property color backgroundColor
|
property color backgroundColor
|
||||||
property color diveListTextColor
|
property color textColor
|
||||||
|
|
||||||
// colors for the blue theme
|
// colors for the blue theme
|
||||||
property color blueDarkerPrimaryColor: "#303F9f"
|
property color blueDarkerPrimaryColor: "#303F9f"
|
||||||
|
|
@ -371,6 +371,7 @@ Kirigami.ApplicationWindow {
|
||||||
property color blueLightPrimaryColor: "#C5CAE9"
|
property color blueLightPrimaryColor: "#C5CAE9"
|
||||||
property color blueLightPrimaryTextColor: "#212121"
|
property color blueLightPrimaryTextColor: "#212121"
|
||||||
property color blueBackgroundColor: "#eff0f1"
|
property color blueBackgroundColor: "#eff0f1"
|
||||||
|
property color blueTextColor: blueLightPrimaryTextColor
|
||||||
|
|
||||||
// colors for the pink theme
|
// colors for the pink theme
|
||||||
property color pinkDarkerPrimaryColor: "#FF1493"
|
property color pinkDarkerPrimaryColor: "#FF1493"
|
||||||
|
|
@ -380,6 +381,7 @@ Kirigami.ApplicationWindow {
|
||||||
property color pinkLightPrimaryColor: "#FFDDF4"
|
property color pinkLightPrimaryColor: "#FFDDF4"
|
||||||
property color pinkLightPrimaryTextColor: "#212121"
|
property color pinkLightPrimaryTextColor: "#212121"
|
||||||
property color pinkBackgroundColor: "#eff0f1"
|
property color pinkBackgroundColor: "#eff0f1"
|
||||||
|
property color pinkTextColor: pinkLightPrimaryTextColor
|
||||||
|
|
||||||
// colors for the dark theme
|
// colors for the dark theme
|
||||||
property color darkDarkerPrimaryColor: "#303F9f"
|
property color darkDarkerPrimaryColor: "#303F9f"
|
||||||
|
|
@ -389,16 +391,17 @@ Kirigami.ApplicationWindow {
|
||||||
property color darkLightPrimaryColor: "#C5CAE9"
|
property color darkLightPrimaryColor: "#C5CAE9"
|
||||||
property color darkLightPrimaryTextColor: "#212121"
|
property color darkLightPrimaryTextColor: "#212121"
|
||||||
property color darkBackgroundColor: "#000000"
|
property color darkBackgroundColor: "#000000"
|
||||||
|
property color darkTextColor: darkPrimaryTextColor
|
||||||
|
|
||||||
property color contrastAccentColor: "#FF9800" // used for delete button
|
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
|
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 darkPrimaryColor })
|
Kirigami.Theme.highlightColor = Qt.binding(function() { return darkerPrimaryColor })
|
||||||
Kirigami.Theme.highlighedTextColor = Qt.binding(function() { return darkPrimaryTextColor })
|
Kirigami.Theme.highlighedTextColor = 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 diveListTextColor })
|
Kirigami.Theme.textColor = Qt.binding(function() { return textColor })
|
||||||
Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return lightPrimaryColor })
|
Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return darkerPrimaryColor })
|
||||||
|
|
||||||
// this needs to pick the theme from persistent preference settings
|
// this needs to pick the theme from persistent preference settings
|
||||||
blueTheme()
|
blueTheme()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue