mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
QML UI: DiveList: show left bar on dives that are part of a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a6a9eaa998
commit
a93e3b26d6
1 changed files with 13 additions and 9 deletions
|
@ -22,6 +22,8 @@ Kirigami.ScrollablePage {
|
||||||
Component {
|
Component {
|
||||||
id: diveDelegate
|
id: diveDelegate
|
||||||
Kirigami.AbstractListItem {
|
Kirigami.AbstractListItem {
|
||||||
|
leftPadding: 0
|
||||||
|
topPadding: 0
|
||||||
id: innerListItem
|
id: innerListItem
|
||||||
enabled: true
|
enabled: true
|
||||||
supportsMouseEvents: true
|
supportsMouseEvents: true
|
||||||
|
@ -47,19 +49,22 @@ Kirigami.ScrollablePage {
|
||||||
deleteButtonVisible = true
|
deleteButtonVisible = true
|
||||||
timer.restart()
|
timer.restart()
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
Row {
|
Rectangle {
|
||||||
width: parent.width
|
id: leftBarDive
|
||||||
spacing: horizontalPadding
|
height: diveListEntry.height + Kirigami.Units.smallSpacing
|
||||||
add: Transition {
|
width: dive.tripMeta == "" ? 0 : Kirigami.Units.gridUnit * 1
|
||||||
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
|
color: subsurfaceTheme.accentColor
|
||||||
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
top: parent.top
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: diveListEntry
|
id: diveListEntry
|
||||||
width: parent.width - Kirigami.Units.gridUnit * (innerListItem.deleteButtonVisible ? 3 : 1)
|
width: parent.width - Kirigami.Units.gridUnit * (innerListItem.deleteButtonVisible ? 3 : 1)
|
||||||
height: childrenRect.height - Kirigami.Units.smallSpacing
|
height: childrenRect.height - Kirigami.Units.smallSpacing
|
||||||
|
anchors.left: leftBarDive.right
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: locationText
|
id: locationText
|
||||||
text: dive.location
|
text: dive.location
|
||||||
|
@ -71,7 +76,6 @@ Kirigami.ScrollablePage {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: horizontalPadding
|
leftMargin: horizontalPadding
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: - Kirigami.Units.smallSpacing * 2
|
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue