diff --git a/meshroom/ui/qml/Viewer/PanoramaToolbar.qml b/meshroom/ui/qml/Viewer/PanoramaToolbar.qml index 5ac5b682..db2fcb57 100644 --- a/meshroom/ui/qml/Viewer/PanoramaToolbar.qml +++ b/meshroom/ui/qml/Viewer/PanoramaToolbar.qml @@ -21,6 +21,8 @@ FloatingPane { property int subdivisionsDefaultValue: 12 property int subdivisionsValue: subdivisionsCtrl.value + property int mouseSpeed: speedSpinBox.value + background: Rectangle { color: root.palette.window } DoubleValidator { @@ -100,11 +102,43 @@ FloatingPane { stepSize: 2 } } - //Fill rectangle to have a better UI - Rectangle { + Rectangle{ color: root.palette.window Layout.fillWidth: true } + RowLayout{ + ToolButton { + text: "Edit Speed" + + ToolTip.visible: ToolTip.text && hovered + ToolTip.delay: 100 + ToolTip.text: "Reset the mouse multiplier" + + onClicked: { + speedSpinBox.value = 1; + } + } + SpinBox { + id: speedSpinBox + from: 1 + value: 1 + to: 10 + stepSize: 1 + Layout.fillWidth: false + Layout.maximumWidth: 50 + + + validator: DoubleValidator { + bottom: Math.min(speedSpinBox.from, speedSpinBox.to) + top: Math.max(speedSpinBox.from, speedSpinBox.to) + } + + textFromValue: function(value, locale) { + return "x" + value.toString() + + } + } + } RowLayout{ ToolButton { text: "Downscale" @@ -124,6 +158,7 @@ FloatingPane { to: 3 stepSize: 1 Layout.fillWidth: false + Layout.maximumWidth: 50 validator: DoubleValidator { diff --git a/meshroom/ui/qml/Viewer/PanoramaViewer.qml b/meshroom/ui/qml/Viewer/PanoramaViewer.qml index 1fc08c7f..3703ad62 100644 --- a/meshroom/ui/qml/Viewer/PanoramaViewer.qml +++ b/meshroom/ui/qml/Viewer/PanoramaViewer.qml @@ -29,6 +29,8 @@ AliceVision.PanoramaViewer { property bool displayGridPano: true + property int mouseMultiplier: 1 + onIsHighlightableChanged:{ for (var i = 0; i < repeater.model; i++) { repeater.itemAt(i).item.onChangedHighlightState(isHighlightable); @@ -82,7 +84,7 @@ AliceVision.PanoramaViewer { lastX = mouse.x; lastY = mouse.y; for (var i = 0; i < repeater.model; i++) { - repeater.itemAt(i).item.rotatePanorama(xoffset * 0.001, yoffset*0.001) + repeater.itemAt(i).item.rotatePanorama(xoffset * 0.001 * mouseMultiplier, -yoffset * 0.001 * mouseMultiplier) } } } @@ -213,6 +215,7 @@ AliceVision.PanoramaViewer { root.status = Image.Ready; } } + function updateRepeater() { if(repeater.model !== root.pathList.length){ repeater.model = 0; diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index add131c8..737f4bdf 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -266,7 +266,8 @@ FocusScope { 'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}), 'downscaleValue': Qt.binding(function(){return panoramaViewerToolbar.downscaleValue;}), 'subdivisionsPano': Qt.binding(function(){ return panoramaViewerToolbar.subdivisionsValue;}), - 'displayGridPano': Qt.binding(function(){ return panoramaViewerToolbar.displayGrid;}) + 'displayGridPano': Qt.binding(function(){ return panoramaViewerToolbar.displayGrid;}), + 'mouseMultiplier': Qt.binding(function(){ return panoramaViewerToolbar.mouseSpeed;}) }) } else { // Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 diff --git a/meshroom/ui/qml/WorkspaceView.qml b/meshroom/ui/qml/WorkspaceView.qml index db93e57d..5ce08bae 100644 --- a/meshroom/ui/qml/WorkspaceView.qml +++ b/meshroom/ui/qml/WorkspaceView.qml @@ -123,7 +123,7 @@ Item { id: displayImagePathAction text: "Display Image Path" checkable: true - checked: true + checked: true && !viewer2D.usePanoramaViewer } } }