mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +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 {
|
||||
id: buttonText
|
||||
text: qsTr("Map it")
|
||||
color: subsurfaceTheme.darkBackgroundColor
|
||||
color: subsurfaceTheme.accentTextColor
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
verticalCenter: parent.verticalCenter
|
||||
|
|
|
@ -52,12 +52,17 @@ Kirigami.ScrollablePage {
|
|||
Item {
|
||||
Rectangle {
|
||||
id: leftBarDive
|
||||
height: diveListEntry.height + Kirigami.Units.smallSpacing
|
||||
width: dive.tripMeta == "" ? 0 : Kirigami.Units.gridUnit * 1
|
||||
width: dive.tripMeta == "" ? 0 : Kirigami.Units.gridUnit
|
||||
height: Kirigami.Units.gridUnit
|
||||
color: subsurfaceTheme.accentColor
|
||||
antialiasing: true
|
||||
radius: Kirigami.Units.smallSpacing * 2
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
topMargin: Kirigami.Units.gridUnit
|
||||
bottomMargin: Kirigami.Units.gridUnit
|
||||
leftMargin: Kirigami.Units.smallSpacing * 2
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -157,26 +162,15 @@ Kirigami.ScrollablePage {
|
|||
Item {
|
||||
width: page.width - Kirigami.Units.gridUnit
|
||||
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 {
|
||||
id: headingBackground
|
||||
height: section == "" ? 0 : Kirigami.Units.gridUnit * 2.5
|
||||
anchors {
|
||||
left: leftBar.right
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
rightMargin: Kirigami.Units.gridUnit * -2
|
||||
}
|
||||
color: subsurfaceTheme.darkBackgroundColor
|
||||
color: subsurfaceTheme.accentColor
|
||||
visible: section != ""
|
||||
Kirigami.Label {
|
||||
id: sectionText
|
||||
|
@ -199,7 +193,7 @@ Kirigami.ScrollablePage {
|
|||
top: parent.top
|
||||
left: parent.left
|
||||
topMargin: Math.max(2, Kirigami.Units.gridUnit / 2)
|
||||
leftMargin: horizontalPadding
|
||||
leftMargin: horizontalPadding * 2
|
||||
right: parent.right
|
||||
}
|
||||
color: textColor
|
||||
|
|
|
@ -311,11 +311,10 @@ Kirigami.ApplicationWindow {
|
|||
id: subsurfaceTheme
|
||||
property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5)
|
||||
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 accentTextColor: "#ececec"
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue