mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: DiveList: don't show empty trip heading for dives without trip
We need to hide the left bar and background rectangle as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a93e3b26d6
commit
edd0d2f2bb
1 changed files with 4 additions and 2 deletions
|
@ -159,22 +159,24 @@ Kirigami.ScrollablePage {
|
||||||
height: childrenRect.height + Kirigami.Units.smallSpacing * 2 + Math.max(2, Kirigami.Units.gridUnit / 2)
|
height: childrenRect.height + Kirigami.Units.smallSpacing * 2 + Math.max(2, Kirigami.Units.gridUnit / 2)
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: leftBar
|
id: leftBar
|
||||||
height: headingBackground.height
|
height: section == "" ? 0 : headingBackground.height
|
||||||
width: Kirigami.Units.gridUnit * 1
|
width: Kirigami.Units.gridUnit * 1
|
||||||
color: subsurfaceTheme.accentColor
|
color: subsurfaceTheme.accentColor
|
||||||
|
visible: section != ""
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: headingBackground
|
id: headingBackground
|
||||||
height: Kirigami.Units.gridUnit * 3
|
height: section == "" ? 0 : Kirigami.Units.gridUnit * 3
|
||||||
anchors {
|
anchors {
|
||||||
left: leftBar.right
|
left: leftBar.right
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: Kirigami.Units.gridUnit * -2
|
rightMargin: Kirigami.Units.gridUnit * -2
|
||||||
}
|
}
|
||||||
color: subsurfaceTheme.darkBackgroundColor
|
color: subsurfaceTheme.darkBackgroundColor
|
||||||
|
visible: section != ""
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: sectionText
|
id: sectionText
|
||||||
text: {
|
text: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue