mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
Merge pull request #2646 from alicevision/dev/AutoLayoutMenu
[ui] Moved Auto-Layout Depth Settings under Graph Editor Menu
This commit is contained in:
commit
6071a914bc
2 changed files with 39 additions and 35 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue