diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2016-02-01 21:29:50 +1100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-01 17:52:20 -0800 |
commit | fdd5ee507c31a700ac8547efedd3b89eb9a74f85 (patch) | |
tree | 89208fe5f0e954adb635d79ef6108ddf003c1ed7 /qt-mobile | |
parent | 448abec769daa1b9d7eebc6b52e780225aa7b98a (diff) | |
download | subsurface-fdd5ee507c31a700ac8547efedd3b89eb9a74f85.tar.gz |
QML UI: Another attempt to shift dive number to top row
Commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa 'QML UI DiveDetailsView: shift
dive number to right of top row' was reverted because it caused mysterious
crashes for some testers, inferred to be related to sizing items in a
gridLayout.
This patch brings the dive number back up to the right of the top row, so the
page width doesn't exceed the screen width. Using text wrapping should prevent
the date text and dive number items from increasing in width, and hopefully
avoids the mysterious crashes.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qml/DiveDetailsView.qml | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/qt-mobile/qml/DiveDetailsView.qml b/qt-mobile/qml/DiveDetailsView.qml index 97d910862..e3fe59416 100644 --- a/qt-mobile/qml/DiveDetailsView.qml +++ b/qt-mobile/qml/DiveDetailsView.qml @@ -72,8 +72,14 @@ Item { } MobileComponents.Label { text: dive.date + " " + dive.time - Layout.minimumWidth: Math.max(MobileComponents.Units.gridUnit * 4, paintedWidth) // helps vertical alignment throughout listview - Layout.columnSpan: 3 + wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere + Layout.columnSpan: 2 + } + MobileComponents.Label { + id: numberText + text: "#" + dive.number + color: MobileComponents.Theme.textColor + wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere } MobileComponents.Label { @@ -84,26 +90,16 @@ Item { } MobileComponents.Label { text: dive.depth - Layout.minimumWidth: Math.max(MobileComponents.Units.gridUnit * 4, paintedWidth) // helps vertical alignment throughout listview } MobileComponents.Label { Layout.alignment: Qt.AlignRight text: "Duration: " opacity: 0.6 } - RowLayout { - MobileComponents.Label { - text: dive.duration - } - Item { - Layout.fillWidth: true - height: parent.height - } - MobileComponents.Label { - id: numberText - text: "#" + dive.number - color: MobileComponents.Theme.textColor - } + MobileComponents.Label { + text: dive.duration + wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere + Layout.fillWidth: true } QMLProfile { |