mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
QML UI: tap on the very top / title bar of dive list goes to top
This requires changes to Kirigami that aren't upstream, yet. So there's a chance that this commit will have to be changed or reverted / redone. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
09856b4546
commit
d95805e90b
1 changed files with 14 additions and 0 deletions
|
@ -263,6 +263,20 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: header
|
||||||
|
onTitleBarClicked: {
|
||||||
|
// if we can see the dive list and it's not at the top already, go to the top,
|
||||||
|
// otherwise have the title bar handle the click (for bread-crumb navigation)
|
||||||
|
if (stackView.currentItem.objectName === "DiveList" && diveListView.contentY > Kirigami.Units.gridUnit) {
|
||||||
|
diveListView.positionViewAtBeginning()
|
||||||
|
event.accepted = true
|
||||||
|
} else {
|
||||||
|
event.accepted = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject addDiveAction: Action {
|
property QtObject addDiveAction: Action {
|
||||||
|
|
Loading…
Reference in a new issue