mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
QML UI: when on the dive list, action button now offers add dive
This seems like a useful default action when people are looking at the dive list (and it's a request from a user to have this as a button instead of just via the menu). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7d62ce5295
commit
48362ae11a
1 changed files with 7 additions and 1 deletions
|
@ -171,7 +171,7 @@ Kirigami.ScrollablePage {
|
|||
if (visible) {
|
||||
page.mainAction = page.saveAction
|
||||
} else {
|
||||
page.mainAction = null
|
||||
page.mainAction = page.addDiveAction
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,6 +215,12 @@ Kirigami.ScrollablePage {
|
|||
}
|
||||
}
|
||||
|
||||
property QtObject addDiveAction: Action {
|
||||
iconName: "list-add"
|
||||
onTriggered: {
|
||||
startAddDive()
|
||||
}
|
||||
}
|
||||
|
||||
property QtObject saveAction: Action {
|
||||
iconName: "document-save"
|
||||
|
|
Loading…
Reference in a new issue