Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Moved Auto-Layout Depth Settings under Graph Editor Menu #2646

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions meshroom/ui/qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
35 changes: 0 additions & 35 deletions meshroom/ui/qml/GraphEditor/GraphEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1057,41 +1057,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
Expand Down
Loading