diff options
author | Henrik Brautaset Aronsen <subsurface@henrik.synth.no> | 2016-02-09 20:39:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-09 12:11:38 -0800 |
commit | 98dfc5c770a27081a9fc1d065281aaa31b67d52a (patch) | |
tree | 646982394806a68ab3e4de2e1d39ab27e66299b6 /qt-mobile | |
parent | 8c9883cfcf66de99f6a563161918927ae0fb2f00 (diff) | |
download | subsurface-98dfc5c770a27081a9fc1d065281aaa31b67d52a.tar.gz |
QML UI: Back buttons for app log and theme info
The app log and theme info had context menus
with a single close item. No need for that.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qml/GpsList.qml | 12 | ||||
-rw-r--r-- | qt-mobile/qml/Log.qml | 12 | ||||
-rw-r--r-- | qt-mobile/qml/TopBar.qml | 10 |
3 files changed, 7 insertions, 27 deletions
diff --git a/qt-mobile/qml/GpsList.qml b/qt-mobile/qml/GpsList.qml index 07dc4a5de..2c30ae171 100644 --- a/qt-mobile/qml/GpsList.qml +++ b/qt-mobile/qml/GpsList.qml @@ -14,18 +14,6 @@ MobileComponents.Page { anchors.margins: MobileComponents.Units.gridUnit / 2 objectName: "gpsList" - contextualActions: [ - Action { - id: closeLog - text: "Close GPS list" - iconName: "view-readermode" - onTriggered: { - stackView.pop() - contextDrawer.close() - } - } - ] - Component { id: gpsDelegate MobileComponents.ListItemWithActions { diff --git a/qt-mobile/qml/Log.qml b/qt-mobile/qml/Log.qml index bf3dcbdb0..6e6ca0418 100644 --- a/qt-mobile/qml/Log.qml +++ b/qt-mobile/qml/Log.qml @@ -37,16 +37,4 @@ MobileComponents.Page { } } } - contextualActions: [ - Action { - id: closeLog - text: "Close log" - iconName: "view-readermode" - onTriggered: { - stackView.pop() - contextDrawer.close() - } - } - ] - } diff --git a/qt-mobile/qml/TopBar.qml b/qt-mobile/qml/TopBar.qml index a2bab331e..7c6beb44b 100644 --- a/qt-mobile/qml/TopBar.qml +++ b/qt-mobile/qml/TopBar.qml @@ -87,7 +87,7 @@ Rectangle { anchors.top: parent.top Layout.preferredHeight: editButtonIcon.height width: editButtonIcon.width - visible: (detailsWindow.state === "view" && detailsWindow.visible) + visible: !backButton.visible && detailsWindow.state === "view" && detailsWindow.visible Image { id: editButtonIcon source: "qrc:/qml/menu-edit.png" @@ -121,7 +121,8 @@ Rectangle { anchors.top: parent.top Layout.preferredHeight: backButtonIcon.height width: backButtonIcon.width - visible: (detailsWindow.state === "edit" && detailsWindow.visible) + visible: logWindow.visible || themetest.visible || + (detailsWindow.state === "edit" && detailsWindow.visible) Image { id: backButtonIcon source: "qrc:/qml/menu-back.png" @@ -138,7 +139,10 @@ Rectangle { height: parent.height width: parent.width onClicked: { - detailsWindow.endEditMode() + if (logWindow.visible || themetest.visible) + stackView.pop() + else + detailsWindow.endEditMode() } } } |