summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsView.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-09 21:12:39 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-10 10:22:02 -0700
commitf99aedc6265122444a847b7585ed12ec9e779868 (patch)
tree70e7c802ec3b447fca0dc7872670527787dd7d54 /mobile-widgets/qml/DiveDetailsView.qml
parent35e48a490bde96f8b8ae474afb4457fc5046d638 (diff)
downloadsubsurface-f99aedc6265122444a847b7585ed12ec9e779868.tar.gz
QML UI: correctly set grid column widths
Spending more time reading the documentation, we need to set the Layout.maximumWidth, not the width. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsView.qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml55
1 files changed, 30 insertions, 25 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index e0069b04a..a7d466c0b 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -140,108 +140,114 @@ Item {
Kirigami.Label {
text: qsTr("Suit:")
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6
- width: detailsView.col1Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col1Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtSuit
text: dive.suit
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- Layout.fillWidth: true
+ Layout.maximumWidth: detailsView.col2Width
}
Kirigami.Label {
text: qsTr("Air Temp:")
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6
- width: detailsView.col3Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col3Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtAirTemp
text: dive.airTemp
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- width: detailsView.col4Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col4Width
}
Kirigami.Label {
text: qsTr("Cylinder:")
opacity: 0.6
- width: detailsView.col1Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col1Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtCylinder
text: dive.getCylinder
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- Layout.fillWidth: true
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col2Width
}
Kirigami.Label {
text: qsTr("Water Temp:")
opacity: 0.6
- width: detailsView.col3Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col3Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtWaterTemp
text: dive.waterTemp
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- width: detailsView.col4Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col4Width
}
Kirigami.Label {
text: qsTr("Divemaster:")
opacity: 0.6
- width: detailsView.col1Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col1Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtDiveMaster
text: dive.divemaster
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- Layout.fillWidth: true
+ Layout.maximumWidth: detailsView.col2Width
}
Kirigami.Label {
text: qsTr("Weight:")
opacity: 0.6
- width: detailsView.col3Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col3Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtWeight
text: dive.sumWeight
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- width: detailsView.col4Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col4Width
}
Kirigami.Label {
text: qsTr("Buddy:")
opacity: 0.6
- width: detailsView.col1Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col1Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtBuddy
text: dive.buddy
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- Layout.fillWidth: true
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col2Width
}
Kirigami.Label {
text: qsTr("SAC:")
opacity: 0.6
- width: detailsView.col3Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col3Width
Layout.alignment: Qt.AlignRight
}
Kirigami.Label {
id: txtSAC
text: dive.sac
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
- width: detailsView.col4Width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ Layout.maximumWidth: detailsView.col4Width
}
Kirigami.Heading {
@@ -258,7 +264,6 @@ Item {
focus: true
Layout.columnSpan: 4
Layout.fillWidth: true
- //selectByMouse: true
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
}
Item {