mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
8c9883cfcf
commit
98dfc5c770
3 changed files with 7 additions and 27 deletions
|
@ -14,18 +14,6 @@ MobileComponents.Page {
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
||||||
objectName: "gpsList"
|
objectName: "gpsList"
|
||||||
|
|
||||||
contextualActions: [
|
|
||||||
Action {
|
|
||||||
id: closeLog
|
|
||||||
text: "Close GPS list"
|
|
||||||
iconName: "view-readermode"
|
|
||||||
onTriggered: {
|
|
||||||
stackView.pop()
|
|
||||||
contextDrawer.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: gpsDelegate
|
id: gpsDelegate
|
||||||
MobileComponents.ListItemWithActions {
|
MobileComponents.ListItemWithActions {
|
||||||
|
|
|
@ -37,16 +37,4 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contextualActions: [
|
|
||||||
Action {
|
|
||||||
id: closeLog
|
|
||||||
text: "Close log"
|
|
||||||
iconName: "view-readermode"
|
|
||||||
onTriggered: {
|
|
||||||
stackView.pop()
|
|
||||||
contextDrawer.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ Rectangle {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
Layout.preferredHeight: editButtonIcon.height
|
Layout.preferredHeight: editButtonIcon.height
|
||||||
width: editButtonIcon.width
|
width: editButtonIcon.width
|
||||||
visible: (detailsWindow.state === "view" && detailsWindow.visible)
|
visible: !backButton.visible && detailsWindow.state === "view" && detailsWindow.visible
|
||||||
Image {
|
Image {
|
||||||
id: editButtonIcon
|
id: editButtonIcon
|
||||||
source: "qrc:/qml/menu-edit.png"
|
source: "qrc:/qml/menu-edit.png"
|
||||||
|
@ -121,7 +121,8 @@ Rectangle {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
Layout.preferredHeight: backButtonIcon.height
|
Layout.preferredHeight: backButtonIcon.height
|
||||||
width: backButtonIcon.width
|
width: backButtonIcon.width
|
||||||
visible: (detailsWindow.state === "edit" && detailsWindow.visible)
|
visible: logWindow.visible || themetest.visible ||
|
||||||
|
(detailsWindow.state === "edit" && detailsWindow.visible)
|
||||||
Image {
|
Image {
|
||||||
id: backButtonIcon
|
id: backButtonIcon
|
||||||
source: "qrc:/qml/menu-back.png"
|
source: "qrc:/qml/menu-back.png"
|
||||||
|
@ -138,7 +139,10 @@ Rectangle {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
onClicked: {
|
onClicked: {
|
||||||
detailsWindow.endEditMode()
|
if (logWindow.visible || themetest.visible)
|
||||||
|
stackView.pop()
|
||||||
|
else
|
||||||
|
detailsWindow.endEditMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue