diff options
Diffstat (limited to 'src/Authoring/Studio/Palettes')
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml index 4ccff8ee..ab0b8db3 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml @@ -1148,19 +1148,37 @@ Rectangle { } Repeater { - id: tagsReeater + id: tagsRepeater model: _variantsGroupModel + property int maxGroupLabelWidth; + + onItemAdded: { + // make all group labels have equal width as the widest one + if (index == 0) + maxGroupLabelWidth = 20; // min group label width + + if (item.groupLabelWidth > maxGroupLabelWidth) { + maxGroupLabelWidth = item.groupLabelWidth; + + if (maxGroupLabelWidth > 150) // max group label width + maxGroupLabelWidth = 150; + } + } Row { id: variantTagsRow + spacing: 5 readonly property var tagsModel: model.tags readonly property var groupModel: model + readonly property int groupLabelWidth: tLabel.implicitWidth Text { + id: tLabel text: model.group color: model.color - width: 50 + width: tagsRepeater.maxGroupLabelWidth; + elide: Text.ElideRight anchors.top: parent.top anchors.topMargin: 5 |