Skip to content

Commit e13747c

Browse files
committed
[qml] Shape/Editor: Disable expand button for shapes in itemHeader
1 parent 2805144 commit e13747c

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

meshroom/ui/qml/Shapes/Editor/Items/Utils/ItemHeader.qml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -171,22 +171,26 @@ Pane {
171171
}
172172

173173
// Shape attributes dropdown
174-
MaterialToolButton {
175-
font.pointSize: 11
176-
padding: 2
177-
text: {
178-
if(isExpanded) {
179-
return (isShape) ? MaterialIcons.arrow_drop_down : MaterialIcons.keyboard_arrow_down
180-
}
181-
else {
182-
return (isShape) ? MaterialIcons.arrow_right : MaterialIcons.keyboard_arrow_right
174+
// For now, only for ShapeFile and ShapeListAttribute
175+
Loader {
176+
active: !isShape
177+
sourceComponent: MaterialToolButton {
178+
font.pointSize: 11
179+
padding: 2
180+
text: {
181+
if(isExpanded) {
182+
return (isShape) ? MaterialIcons.arrow_drop_down : MaterialIcons.keyboard_arrow_down
183+
}
184+
else {
185+
return (isShape) ? MaterialIcons.arrow_right : MaterialIcons.keyboard_arrow_right
186+
}
183187
}
188+
onClicked: { isExpanded = !isExpanded }
189+
enabled: true
190+
ToolTip.text: isExpanded ? "Collapse" : "Expand"
191+
ToolTip.visible: hovered
192+
ToolTip.delay: 800
184193
}
185-
onClicked: { isExpanded = !isExpanded }
186-
enabled: true
187-
ToolTip.text: isExpanded ? "Collapse" : "Expand"
188-
ToolTip.visible: hovered
189-
ToolTip.delay: 800
190194
}
191195

192196
// Shape color

0 commit comments

Comments
 (0)