File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
meshroom/ui/qml/GraphEditor Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,19 @@ RowLayout {
235235 MaterialToolLabel {
236236 id: nameLabel
237237
238+ width: hovered ? contentWidth : parent .width
238239 anchors .rightMargin : 0
239240 anchors .right : root .attribute && root .attribute .isOutput ? parent .right : undefined
240241 labelIconRow .layoutDirection : root .attribute .isOutput ? Qt .RightToLeft : Qt .LeftToRight
241242 labelIconRow .spacing : 0
242243
243244 enabled: ! root .readOnly
244245 visible: true
245- property bool hovered: (inputConnectMA .containsMouse || inputConnectMA .drag .active ||
246- inputDropArea .containsDrag || outputConnectMA .containsMouse ||
247- outputConnectMA .drag .active || outputDropArea .containsDrag )
246+ property bool hovered: parent .width == 0 || // Dirty trick to trigger the width change AFTER the parent size has been set
247+ ((inputConnectMA .hoverEnabled || outputConnectMA .hoverEnabled ) &&
248+ ((inputConnectMA .containsMouse || inputConnectMA .drag .active ||
249+ inputDropArea .containsDrag || outputConnectMA .containsMouse ||
250+ outputConnectMA .drag .active || outputDropArea .containsDrag )))
248251
249252 labelIconColor: {
250253 if ((root .attribute .hasOutputConnections || root .attribute .isLink ) && ! root .attribute .enabled ) {
@@ -260,6 +263,7 @@ RowLayout {
260263 label .text : root .attribute .label
261264 label .font .pointSize : 7
262265 label .elide : hovered ? Text .ElideNone : Text .ElideMiddle
266+ label .width : hovered ? contentWidth : parent .width
263267 label .horizontalAlignment : root .attribute && root .attribute .isOutput ? Text .AlignRight : Text .AlignLeft
264268
265269 // Icon
You can’t perform that action at this time.
0 commit comments