aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetailsView.qml
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2016-01-25 18:44:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-25 11:14:28 -0800
commit1c3a1433e42dd69f823cea78ea2862ea14620f9b (patch)
tree1386591d061404d31b63ad001a6c99c6ede923dd /qt-mobile/qml/DiveDetailsView.qml
parent37d841966f136ee8235b2b23b1d559371baf0294 (diff)
downloadsubsurface-1c3a1433e42dd69f823cea78ea2862ea14620f9b.tar.gz
QML-UI: Rearrange the DiveDetails page
After adding "Cylinder" to the DiveDetails page the objects had to be rearranged in order to better utilise the space. To get a cleaner look on smaller screens the left side is left aligned and the right side is right aligend. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/DiveDetailsView.qml')
-rw-r--r--qt-mobile/qml/DiveDetailsView.qml46
1 files changed, 31 insertions, 15 deletions
diff --git a/qt-mobile/qml/DiveDetailsView.qml b/qt-mobile/qml/DiveDetailsView.qml
index 8265a621a..60ae8dfaf 100644
--- a/qt-mobile/qml/DiveDetailsView.qml
+++ b/qt-mobile/qml/DiveDetailsView.qml
@@ -65,14 +65,16 @@ Item {
}
*/
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
+ Layout.alignment: Qt.AlignLeft
id: dateLabel
text: "Date: "
opacity: 0.6
}
MobileComponents.Label {
+ Layout.alignment: Qt.AlignLeft
text: dive.date + " " + dive.time
Layout.columnSpan: 2
+ Layout.fillWidth: true
}
MobileComponents.Label {
id: numberText
@@ -82,12 +84,13 @@ Item {
}
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
+ Layout.alignment: Qt.AlignLeft
id: depthLabel
text: "Depth: "
opacity: 0.6
}
MobileComponents.Label {
+ Layout.alignment: Qt.AlignLeft
text: dive.depth
}
MobileComponents.Label {
@@ -97,6 +100,7 @@ Item {
}
MobileComponents.Label {
text: dive.duration
+ Layout.alignment: Qt.AlignRight
}
QMLProfile {
@@ -113,7 +117,6 @@ Item {
border.width: 1
border.color: MobileComponents.Theme.textColor;
anchors.fill: parent
-
}
}
@@ -125,7 +128,7 @@ Item {
}
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
+ Layout.alignment: Qt.AlignLeft
text: "Air Temp:"
opacity: 0.6
}
@@ -137,26 +140,25 @@ Item {
}
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
+ Layout.alignment: Qt.AlignLeft
text: "Water Temp:"
opacity: 0.6
}
MobileComponents.Label {
id: txtWaterTemp
text: dive.waterTemp
- Layout.fillWidth: true
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ Layout.alignment: Qt.AlignRight
}
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
+ Layout.alignment: Qt.AlignLeft
text: "Suit:"
opacity: 0.6
}
MobileComponents.Label {
id: txtSuit
text: dive.suit
- Layout.fillWidth: true
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
}
@@ -170,30 +172,44 @@ Item {
//text: dive.weights
Layout.fillWidth: true
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ Layout.alignment: Qt.AlignRight
}
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
- text: "Buddy:"
+ Layout.alignment: Qt.AlignLeft
+ text: "Cylinder:"
opacity: 0.6
}
MobileComponents.Label {
- id: txtBuddy
- text: dive.buddy
+ id: txtCylinder
+ text: cylinder
Layout.fillWidth: true
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ wrapMode: TextEdit.WordWrap
}
MobileComponents.Label {
- Layout.alignment: Qt.AlignRight
+ Layout.alignment: Qt.AlignLeft
text: "Dive Master:"
opacity: 0.6
}
MobileComponents.Label {
id: txtDiveMaster
text: dive.divemaster
- Layout.fillWidth: true
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ Layout.alignment: Qt.AlignRight
+ }
+
+ MobileComponents.Label {
+ Layout.alignment: Qt.AlignLeft
+ text: "Buddy:"
+ opacity: 0.6
+ }
+ MobileComponents.Label {
+ id: txtBuddy
+ text: dive.buddy
+ Layout.fillWidth: true
+ wrapMode: TextEdit.WordWrap
+ Layout.columnSpan: 3
}
MobileComponents.Heading {