File tree 1 file changed +13
-2
lines changed
meshroom/ui/qml/GraphEditor
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -236,13 +236,23 @@ RowLayout {
236
236
id: nameLabel
237
237
238
238
anchors .rightMargin : 0
239
- anchors .right : root .attribute && root .attribute .isOutput ? parent .right : undefined
240
239
labelIconRow .layoutDirection : root .attribute .isOutput ? Qt .RightToLeft : Qt .LeftToRight
240
+ anchors .right : root .attribute && root .attribute .isOutput ? parent .right : undefined
241
241
labelIconRow .spacing : 0
242
+ width: {
243
+ if (hovered) {
244
+ return icon .width + label .contentWidth
245
+ } else {
246
+ if (icon .width + label .contentWidth < nameContainer .width )
247
+ return icon .width + label .contentWidth
248
+ return nameContainer .width
249
+ }
250
+ }
242
251
243
252
enabled: ! root .readOnly
244
253
visible: true
245
- property bool hovered: (inputConnectMA .containsMouse || inputConnectMA .drag .active ||
254
+ property bool parentNotReady: nameContainer .width == 0
255
+ property bool hovered: parentNotReady || (inputConnectMA .containsMouse || inputConnectMA .drag .active ||
246
256
inputDropArea .containsDrag || outputConnectMA .containsMouse ||
247
257
outputConnectMA .drag .active || outputDropArea .containsDrag )
248
258
@@ -259,6 +269,7 @@ RowLayout {
259
269
// Text
260
270
label .text : root .attribute .label
261
271
label .font .pointSize : 7
272
+ labelWidth: hovered ? label .contentWidth : nameLabel .width - icon .width
262
273
label .elide : hovered ? Text .ElideNone : Text .ElideMiddle
263
274
label .horizontalAlignment : root .attribute && root .attribute .isOutput ? Text .AlignRight : Text .AlignLeft
264
275
You can’t perform that action at this time.
0 commit comments