[ui] Viewer2D: refactoring to simplify layouts

* fix mousearea order
* add alpha backgroud
* move HDR as a tool button

Conflicts:
	meshroom/ui/qml/Viewer/CircleGizmo.qml
	meshroom/ui/qml/Viewer/Viewer2D.qml
This commit is contained in:
Fabien Castan 2020-03-04 17:24:51 +01:00
parent c9c24b7ff0
commit d70c625fac
4 changed files with 323 additions and 290 deletions

View file

@ -46,8 +46,8 @@ FloatingPane {
id: displayModeCB
flat: true
Layout.fillWidth: true
model: featuresViewer.displayModes
onActivated: featuresViewer.displayMode = currentIndex
model: root.featuresViewer.displayModes
onActivated: root.featuresViewer.displayMode = currentIndex
}
}
}
@ -67,12 +67,12 @@ FloatingPane {
implicitHeight: contentHeight
implicitWidth: contentItem.childrenRect.width
model: featuresViewer !== null ? featuresViewer.model : 0
model: root.featuresViewer !== null ? root.featuresViewer.model : 0
delegate: RowLayout {
id: featureType
property var viewer: featuresViewer.itemAt(index)
property var viewer: root.featuresViewer.itemAt(index)
spacing: 4
// Visibility toogle
@ -86,10 +86,10 @@ FloatingPane {
ColorChart {
implicitWidth: 12
implicitHeight: implicitWidth
colors: featuresViewer.colors
colors: root.featuresViewer.colors
currentIndex: featureType.viewer.colorIndex
// offset FeaturesViewer color set when changing the color of one feature type
onColorPicked: featuresViewer.colorOffset = colorIndex - index
// offset featuresViewer color set when changing the color of one feature type
onColorPicked: root.featuresViewer.colorOffset = colorIndex - index
}
// Feature type name
Label {