Timeline: Don't set detail width to 0 if content is undefined

This doesn't do anything useful but messes up the layout.

Change-Id: I4d59f828bced62c873a6eb96f7e0e2a023b8233e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-04-12 16:10:07 +02:00
parent a7e2c4595a
commit d9fb7b2cf1
2 changed files with 2 additions and 2 deletions

View File

@@ -31,5 +31,5 @@ TimelineText {
property int labelWidth: implicitWidth
font.bold: isLabel
elide: Text.ElideRight
width: text === "" ? 0 : (isLabel ? labelWidth : valueWidth)
width: isLabel ? labelWidth : valueWidth
}

View File

@@ -204,7 +204,7 @@ Item {
labelWidth: col.labelWidth
valueWidth: col.valueWidth
isLabel: index % 2 === 0
text: (modelData === undefined) ? "" : (isLabel ? (modelData + ":") : modelData)
text: isLabel ? (modelData + ":") : modelData
}
}
}