summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetails.qml
diff options
context:
space:
mode:
authorGravatar Sebastian Kügler <sebas@kde.org>2015-12-07 18:10:55 +0100
committerGravatar Sebastian Kügler <sebas@kde.org>2015-12-07 18:46:57 +0100
commit04b6446e72496139b9f8bde8d7d680edf270422d (patch)
treeb526c5a4773e2a2efeea01e0c6b46a7a21c23701 /qt-mobile/qml/DiveDetails.qml
parent936c9cee1f00c8fd2d981f030a4862248739176c (diff)
downloadsubsurface-04b6446e72496139b9f8bde8d7d680edf270422d.tar.gz
redesign dive details view
This change cleans up the layout optimized for viewing dive details. The top part contains brief and essential dive info (location, depth, duration, dive no.), then the profile, then a table with more details, and finally the notes. The goal here is to present the dive's data more efficiently and attractively now that the edit part is factored out. Signed-off-by: Sebastian Kügler <sebas@kde.org>
Diffstat (limited to 'qt-mobile/qml/DiveDetails.qml')
-rw-r--r--qt-mobile/qml/DiveDetails.qml14
1 files changed, 10 insertions, 4 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml
index d46777e41..452b29974 100644
--- a/qt-mobile/qml/DiveDetails.qml
+++ b/qt-mobile/qml/DiveDetails.qml
@@ -45,11 +45,12 @@ MobileComponents.Page {
contextualActions: [
Action {
- text: "Save Changes"
+ text: "Save"
enabled: diveDetailsWindow.state == "edit"
iconName: "document-save"
onTriggered: {
manager.saveChanges();
+ contextDrawer.close();
}
},
Action {
@@ -57,7 +58,9 @@ MobileComponents.Page {
checkable: true
iconName: checked ? "view-readermode" : "document-edit"
onTriggered: {
- diveDetailsWindow.state = checked ? "edit" : "view"
+ diveDetailsWindow.state = checked ? "edit" : "view";
+ contextDrawer.close();
+ // close drawer?
}
}
@@ -69,6 +72,7 @@ MobileComponents.Page {
id: flick
anchors.fill: parent
contentHeight: content.height
+ interactive: contentHeight > height
clip: true
Item {
id: content
@@ -81,8 +85,9 @@ MobileComponents.Page {
left: parent.left
right: parent.right
top: parent.top
- margins: MobileComponents.Units.smallSpacing
+ margins: MobileComponents.Units.gridUnit / 2
}
+ visible: opacity > 0
Behavior on opacity {
NumberAnimation { duration: MobileComponents.Units.shortDuration }
@@ -94,8 +99,9 @@ MobileComponents.Page {
left: parent.left
right: parent.right
top: parent.top
- margins: MobileComponents.Units.smallSpacing
+ margins: MobileComponents.Units.gridUnit / 2
}
+ visible: opacity > 0
Behavior on opacity {
NumberAnimation { duration: MobileComponents.Units.shortDuration }