fix(StatusListItem): don't set width on title item
There was an explicit `width` introduced on `statusListItemTitle`, most likely to make room for it when `titleAsideText` is supplied. This unfortunately causes the title get a very small width, resulting in broken UI. Since we can assume that there should be enough space for the titleAsideText when it's used, we probably don't have to calculate a fixed width for the title in the first place. This commit therefore removes that explicit setting.
This commit is contained in:
parent
a4178bd6dc
commit
ee5ec7b3db
|
@ -289,6 +289,11 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||||
icon.background.color: "orange"
|
icon.background.color: "orange"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatusListItem {
|
||||||
|
title: "Title"
|
||||||
|
titleAsideText: "test"
|
||||||
|
}
|
||||||
|
|
||||||
StatusListItem {
|
StatusListItem {
|
||||||
title: "Title"
|
title: "Title"
|
||||||
icon.name: "delete"
|
icon.name: "delete"
|
||||||
|
|
|
@ -179,8 +179,6 @@ Rectangle {
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
id: statusListItemTitle
|
id: statusListItemTitle
|
||||||
text: statusListItem.title
|
text: statusListItem.title
|
||||||
width: contentWidth < (parent.width - statusListItemTitleAsideText.contentWidth) ?
|
|
||||||
contentWidth : (parent.width - statusListItemTitleAsideText.contentWidth)
|
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
height: visible ? contentHeight : 0
|
height: visible ? contentHeight : 0
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
|
Loading…
Reference in New Issue