Don't wrap labels

if the text in every column can wrap anywhre,
we don't have a stable way to know how large the columns
themselves may be. This can cause an infinite recursion
while trying to figure out the width of the items, as
the sizeHint(Qt::ImplicitSize) of those labels
(Buddy, Cylinder etc) will not be stable as it will once
return the size of the text wrapped and once the size of
the text not wrapped.

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Marco Martin 2016-05-02 14:17:08 +02:00 committed by Dirk Hohndel
parent 8f35b7324e
commit 7dde9b25d8

View file

@ -174,7 +174,6 @@ Item {
Kirigami.Label {
text: "Cylinder:"
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6
Layout.maximumWidth: detailsView.col1Width
Layout.preferredWidth: detailsView.col1Width
@ -222,7 +221,6 @@ Item {
Kirigami.Label {
text: "Weight:"
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6
Layout.maximumWidth: detailsView.col3Width
Layout.preferredWidth: detailsView.col3Width
@ -252,7 +250,6 @@ Item {
Kirigami.Label {
text: "Buddy:"
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6
Layout.maximumWidth: detailsView.col1Width
Layout.preferredWidth: detailsView.col1Width
@ -268,7 +265,6 @@ Item {
Kirigami.Label {
text: "SAC:"
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6
Layout.maximumWidth: detailsView.col3Width
Layout.preferredWidth: detailsView.col3Width