Skip to content

Commit 11f2576

Browse files
committed
[MaterialIcons] MaterialToolLabel: Handle label's size correctly
1 parent d5a7e25 commit 11f2576

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

meshroom/ui/qml/MaterialIcons/MaterialToolLabel.qml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ Item {
1616
property alias labelIconRow: contentRow
1717
property var labelIconColor: palette.text
1818
property alias labelIconMouseArea: mouseArea
19+
property var labelWidth: undefined
1920
implicitWidth: childrenRect.width
2021
implicitHeight: childrenRect.height
2122
anchors.rightMargin: 5
2223

24+
onLabelWidthChanged: {
25+
labelItem.width = labelWidth
26+
}
27+
2328
RowLayout {
2429
id: contentRow
2530
Label {
@@ -34,6 +39,12 @@ Item {
3439
id: labelItem
3540
text: ""
3641
color: labelIconColor
42+
width: labelWidth
43+
44+
onWidthChanged: {
45+
if (labelWidth != undefined && width != labelWidth)
46+
width = labelWidth
47+
}
3748
}
3849
}
3950

0 commit comments

Comments
 (0)