internal: dont use childrenrect

This commit is contained in:
2 * r + 2 * t 2025-05-24 15:58:40 +08:00
parent 054567de9d
commit 006189949c
2 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,7 @@ Item {
anchors.verticalCenter: icon.verticalCenter
implicitWidth: parent.width - icon.width
implicitHeight: childrenRect.height
implicitHeight: name.implicitHeight + desc.implicitHeight
StyledText {
id: name
@ -53,6 +53,8 @@ Item {
}
StyledText {
id: desc
text: root.modelData?.desc ?? ""
font.pointSize: Appearance.font.size.small
color: Colours.alpha(Colours.palette.m3outline, true)

View file

@ -46,7 +46,7 @@ Item {
anchors.verticalCenter: icon.verticalCenter
implicitWidth: parent.width - icon.width
implicitHeight: childrenRect.height
implicitHeight: name.implicitHeight + comment.implicitHeight
StyledText {
id: name
@ -56,6 +56,8 @@ Item {
}
StyledText {
id: comment
text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? ""
font.pointSize: Appearance.font.size.small
color: Colours.alpha(Colours.palette.m3outline, true)