mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
35e48a490b
commit
f99aedc626
1 changed files with 30 additions and 25 deletions
|
@ -140,108 +140,114 @@ Item {
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Suit:")
|
text: qsTr("Suit:")
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col1Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtSuit
|
id: txtSuit
|
||||||
text: dive.suit
|
text: dive.suit
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
Layout.fillWidth: true
|
Layout.maximumWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Air Temp:")
|
text: qsTr("Air Temp:")
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col3Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtAirTemp
|
id: txtAirTemp
|
||||||
text: dive.airTemp
|
text: dive.airTemp
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
width: detailsView.col4Width
|
Layout.maximumWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Cylinder:")
|
text: qsTr("Cylinder:")
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col1Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtCylinder
|
id: txtCylinder
|
||||||
text: dive.getCylinder
|
text: dive.getCylinder
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
Layout.fillWidth: true
|
Layout.maximumWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Water Temp:")
|
text: qsTr("Water Temp:")
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col3Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtWaterTemp
|
id: txtWaterTemp
|
||||||
text: dive.waterTemp
|
text: dive.waterTemp
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
width: detailsView.col4Width
|
Layout.maximumWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Divemaster:")
|
text: qsTr("Divemaster:")
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col1Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtDiveMaster
|
id: txtDiveMaster
|
||||||
text: dive.divemaster
|
text: dive.divemaster
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
Layout.fillWidth: true
|
Layout.maximumWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Weight:")
|
text: qsTr("Weight:")
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col3Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtWeight
|
id: txtWeight
|
||||||
text: dive.sumWeight
|
text: dive.sumWeight
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
width: detailsView.col4Width
|
Layout.maximumWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Buddy:")
|
text: qsTr("Buddy:")
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col1Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtBuddy
|
id: txtBuddy
|
||||||
text: dive.buddy
|
text: dive.buddy
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
Layout.fillWidth: true
|
Layout.maximumWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("SAC:")
|
text: qsTr("SAC:")
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
width: detailsView.col3Width
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
Layout.maximumWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
id: txtSAC
|
id: txtSAC
|
||||||
text: dive.sac
|
text: dive.sac
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
width: detailsView.col4Width
|
Layout.maximumWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Heading {
|
Kirigami.Heading {
|
||||||
|
@ -258,7 +264,6 @@ Item {
|
||||||
focus: true
|
focus: true
|
||||||
Layout.columnSpan: 4
|
Layout.columnSpan: 4
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
//selectByMouse: true
|
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
Loading…
Add table
Reference in a new issue