mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: remove the redundant context menus that just close the page
Android users are well used to using the back key for this. I kept the code in place as things may end up completely different on IOS or other mobile platforms. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
692719f230
commit
a91d4164b4
7 changed files with 14 additions and 7 deletions
|
@ -8,6 +8,7 @@ MobileComponents.Page {
|
||||||
id: aboutPage
|
id: aboutPage
|
||||||
property int pageWidth: subsurfaceTheme.columnWidth - MobileComponents.Units.gridUnit
|
property int pageWidth: subsurfaceTheme.columnWidth - MobileComponents.Units.gridUnit
|
||||||
|
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: "Close About"
|
text: "Close About"
|
||||||
|
@ -18,7 +19,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
ScrollView {
|
ScrollView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ MobileComponents.Page {
|
||||||
state = "view"
|
state = "view"
|
||||||
Qt.inputMethod.hide()
|
Qt.inputMethod.hide()
|
||||||
}
|
}
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: state === "view" ? "Back to dive list" : "Cancel"
|
text: state === "view" ? "Back to dive list" : "Cancel"
|
||||||
|
@ -71,7 +71,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
mainAction: Action {
|
mainAction: Action {
|
||||||
iconName: state !== "view" ? "dialog-cancel" : "document-edit"
|
iconName: state !== "view" ? "dialog-cancel" : "document-edit"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
|
|
@ -14,6 +14,7 @@ MobileComponents.Page {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: "Close Preferences"
|
text: "Close Preferences"
|
||||||
|
@ -24,7 +25,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
|
@ -14,6 +14,7 @@ MobileComponents.Page {
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
||||||
objectName: "gpsList"
|
objectName: "gpsList"
|
||||||
|
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: "Close GPS list"
|
text: "Close GPS list"
|
||||||
|
@ -24,6 +25,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
Component {
|
Component {
|
||||||
id: gpsDelegate
|
id: gpsDelegate
|
||||||
MobileComponents.ListItemWithActions {
|
MobileComponents.ListItemWithActions {
|
||||||
|
|
|
@ -14,6 +14,7 @@ MobileComponents.Page {
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
||||||
objectName: "Log"
|
objectName: "Log"
|
||||||
|
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: "Close Log"
|
text: "Close Log"
|
||||||
|
@ -24,7 +25,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
ScrollView {
|
ScrollView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Flickable {
|
Flickable {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
MobileComponents.Page {
|
MobileComponents.Page {
|
||||||
|
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: "Close Preferences"
|
text: "Close Preferences"
|
||||||
|
@ -18,7 +19,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
GridLayout {
|
GridLayout {
|
||||||
|
|
||||||
signal accept
|
signal accept
|
||||||
|
|
|
@ -5,6 +5,7 @@ import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
||||||
|
|
||||||
MobileComponents.Page {
|
MobileComponents.Page {
|
||||||
|
|
||||||
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
text: "Close Theme info"
|
text: "Close Theme info"
|
||||||
|
@ -15,7 +16,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: themetest
|
id: themetest
|
||||||
columns: 2
|
columns: 2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue