diff --git a/meshroom/ui/qml/Application.qml b/meshroom/ui/qml/Application.qml index 8c4b696f..a27c1a5c 100644 --- a/meshroom/ui/qml/Application.qml +++ b/meshroom/ui/qml/Application.qml @@ -1159,6 +1159,45 @@ Page { onTriggered: _reconstruction.graph.forceUnlockNodes() } + Menu { + title: "Auto Layout Depth" + + MenuItem { + id: autoLayoutMinimum + text: "Minimum" + checkable: true + checked: _reconstruction.layout.depthMode === 0 + ToolTip.text: "Sets the Auto Layout Depth Mode to use Node's Minimum depth" + ToolTip.visible: hovered + ToolTip.delay: 200 + onToggled: { + if (checked) { + _reconstruction.layout.depthMode = 0; + autoLayoutMaximum.checked = false; + } + // Prevents cases where the user unchecks the currently checked option + autoLayoutMinimum.checked = true; + } + } + MenuItem { + id: autoLayoutMaximum + text: "Maximum" + checkable: true + checked: _reconstruction.layout.depthMode === 1 + ToolTip.text: "Sets the Auto Layout Depth Mode to use Node's Maximum depth" + ToolTip.visible: hovered + ToolTip.delay: 200 + onToggled: { + if (checked) { + _reconstruction.layout.depthMode = 1; + autoLayoutMinimum.checked = false; + } + // Prevents cases where the user unchecks the currently checked option + autoLayoutMaximum.checked = true; + } + } + } + Menu { title: "Refresh Nodes Method" diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index abbf97da..8101bb48 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -1058,41 +1058,6 @@ Item { onClicked: uigraph.layout.reset() } - // Separator - Rectangle { - Layout.fillHeight: true - Layout.margins: 2 - implicitWidth: 1 - color: activePalette.window - } - // Settings - MaterialToolButton { - text: MaterialIcons.settings - font.pointSize: 11 - onClicked: menu.open() - Menu { - id: menu - y: -height - padding: 4 - RowLayout { - spacing: 2 - Label { - padding: 2 - text: "Auto-Layout Depth:" - } - ComboBox { - flat: true - model: ['Minimum', 'Maximum'] - implicitWidth: 85 - currentIndex: uigraph ? uigraph.layout.depthMode : -1 - onActivated: { - uigraph.layout.depthMode = currentIndex - } - } - } - } - } - // Separator Rectangle { Layout.fillHeight: true