mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: correctly render dive list when showing delete button
This fixes the visual artifact that Willem reported. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ee75812b5a
commit
525cd4c9e3
1 changed files with 4 additions and 3 deletions
|
@ -21,6 +21,7 @@ Kirigami.ScrollablePage {
|
||||||
Component {
|
Component {
|
||||||
id: diveDelegate
|
id: diveDelegate
|
||||||
Kirigami.AbstractListItem {
|
Kirigami.AbstractListItem {
|
||||||
|
id: innerListItem
|
||||||
enabled: true
|
enabled: true
|
||||||
supportsMouseEvents: true
|
supportsMouseEvents: true
|
||||||
checked: diveListView.currentIndex === model.index
|
checked: diveListView.currentIndex === model.index
|
||||||
|
@ -47,15 +48,16 @@ Kirigami.ScrollablePage {
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height - Kirigami.Units.smallSpacing
|
height: childrenRect.height + Kirigami.Units.smallSpacing
|
||||||
spacing: horizontalPadding
|
spacing: horizontalPadding
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
|
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
|
||||||
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
|
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: diveListEntry
|
id: diveListEntry
|
||||||
width: parent.width - Kirigami.Units.gridUnit
|
width: parent.width - Kirigami.Units.gridUnit * (innerListItem.deleteButtonVisible ? 3 : 1)
|
||||||
height: childrenRect.height - Kirigami.Units.smallSpacing
|
height: childrenRect.height - Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -129,7 +131,6 @@ Kirigami.ScrollablePage {
|
||||||
visible: deleteButtonVisible
|
visible: deleteButtonVisible
|
||||||
height: diveListEntry.height - Kirigami.Units.smallSpacing
|
height: diveListEntry.height - Kirigami.Units.smallSpacing
|
||||||
width: height - 3 * Kirigami.Units.smallSpacing
|
width: height - 3 * Kirigami.Units.smallSpacing
|
||||||
anchors.right: diveListEntry.right
|
|
||||||
color: "#FF3030"
|
color: "#FF3030"
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
radius: Kirigami.Units.smallSpacing
|
radius: Kirigami.Units.smallSpacing
|
||||||
|
|
Loading…
Add table
Reference in a new issue