mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
QML UI: DiveList: playing with different colors
Make the accent color much lighter, don't have a solid bar on the left for dives that are part of a trip. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7a6f87405a
commit
fd5cd5ebf0
3 changed files with 12 additions and 19 deletions
|
@ -70,7 +70,7 @@ Item {
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: buttonText
|
id: buttonText
|
||||||
text: qsTr("Map it")
|
text: qsTr("Map it")
|
||||||
color: subsurfaceTheme.darkBackgroundColor
|
color: subsurfaceTheme.accentTextColor
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
|
|
|
@ -52,12 +52,17 @@ Kirigami.ScrollablePage {
|
||||||
Item {
|
Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: leftBarDive
|
id: leftBarDive
|
||||||
height: diveListEntry.height + Kirigami.Units.smallSpacing
|
width: dive.tripMeta == "" ? 0 : Kirigami.Units.gridUnit
|
||||||
width: dive.tripMeta == "" ? 0 : Kirigami.Units.gridUnit * 1
|
height: Kirigami.Units.gridUnit
|
||||||
color: subsurfaceTheme.accentColor
|
color: subsurfaceTheme.accentColor
|
||||||
|
antialiasing: true
|
||||||
|
radius: Kirigami.Units.smallSpacing * 2
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
top: parent.top
|
top: parent.top
|
||||||
|
topMargin: Kirigami.Units.gridUnit
|
||||||
|
bottomMargin: Kirigami.Units.gridUnit
|
||||||
|
leftMargin: Kirigami.Units.smallSpacing * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -157,26 +162,15 @@ Kirigami.ScrollablePage {
|
||||||
Item {
|
Item {
|
||||||
width: page.width - Kirigami.Units.gridUnit
|
width: page.width - Kirigami.Units.gridUnit
|
||||||
height: childrenRect.height - Kirigami.Units.smallSpacing
|
height: childrenRect.height - Kirigami.Units.smallSpacing
|
||||||
Rectangle {
|
|
||||||
id: leftBar
|
|
||||||
width: Kirigami.Units.gridUnit * 1
|
|
||||||
color: subsurfaceTheme.accentColor
|
|
||||||
visible: section != ""
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
top: headingBackground.top
|
|
||||||
bottom: headingBackground.bottom
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: headingBackground
|
id: headingBackground
|
||||||
height: section == "" ? 0 : Kirigami.Units.gridUnit * 2.5
|
height: section == "" ? 0 : Kirigami.Units.gridUnit * 2.5
|
||||||
anchors {
|
anchors {
|
||||||
left: leftBar.right
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: Kirigami.Units.gridUnit * -2
|
rightMargin: Kirigami.Units.gridUnit * -2
|
||||||
}
|
}
|
||||||
color: subsurfaceTheme.darkBackgroundColor
|
color: subsurfaceTheme.accentColor
|
||||||
visible: section != ""
|
visible: section != ""
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: sectionText
|
id: sectionText
|
||||||
|
@ -199,7 +193,7 @@ Kirigami.ScrollablePage {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
topMargin: Math.max(2, Kirigami.Units.gridUnit / 2)
|
topMargin: Math.max(2, Kirigami.Units.gridUnit / 2)
|
||||||
leftMargin: horizontalPadding
|
leftMargin: horizontalPadding * 2
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
color: textColor
|
color: textColor
|
||||||
|
|
|
@ -311,11 +311,10 @@ Kirigami.ApplicationWindow {
|
||||||
id: subsurfaceTheme
|
id: subsurfaceTheme
|
||||||
property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5)
|
property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5)
|
||||||
property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.8)
|
property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.8)
|
||||||
property color accentColor: "#2d5b9a"
|
property color accentColor: "#40C0FF" // "#2d5b9a"
|
||||||
property color shadedColor: "#132744"
|
property color shadedColor: "#132744"
|
||||||
property color accentTextColor: "#ececec"
|
property color accentTextColor: "#ececec"
|
||||||
property color diveListTextColor: "#000000" // the Kirigami theme text color is too light
|
property color diveListTextColor: "#000000" // the Kirigami theme text color is too light
|
||||||
property color darkBackgroundColor: "#eeeeee"
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue