mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[Panorama Viewer] add subdivisions slider
This commit is contained in:
parent
e853453405
commit
fcdc6cc873
3 changed files with 59 additions and 4 deletions
|
@ -17,6 +17,9 @@ FloatingPane {
|
|||
property int downscaleValue: downscaleSpinBox.value
|
||||
property int downscaleDefaultValue: 2
|
||||
|
||||
property int subdivisionsDefaultValue: 12
|
||||
property int subdivisionsValue: subdivisionsCtrl.value
|
||||
|
||||
background: Rectangle { color: root.palette.window }
|
||||
|
||||
DoubleValidator {
|
||||
|
@ -58,6 +61,44 @@ FloatingPane {
|
|||
checkable: true
|
||||
checked: true
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 5
|
||||
|
||||
ToolButton {
|
||||
text: "Subdivisions"
|
||||
|
||||
ToolTip.visible: ToolTip.text && hovered
|
||||
ToolTip.delay: 100
|
||||
ToolTip.text: "Reset Subdivisions"
|
||||
|
||||
onClicked: {
|
||||
subdivisionsCtrl.value = subdivisionsDefaultValue;
|
||||
}
|
||||
}
|
||||
TextField {
|
||||
id: subdivisionsLabel
|
||||
|
||||
ToolTip.visible: ToolTip.text && hovered
|
||||
ToolTip.delay: 100
|
||||
ToolTip.text: "subdivisions"
|
||||
|
||||
text: subdivisionsValue.toFixed(1)
|
||||
Layout.preferredWidth: textMetrics_subdivisionsValue.width
|
||||
selectByMouse: true
|
||||
validator: doubleValidator
|
||||
onAccepted: {
|
||||
subdivisionsCtrl.value = Number(subdivisionsLabel.text)
|
||||
}
|
||||
}
|
||||
Slider {
|
||||
id: subdivisionsCtrl
|
||||
Layout.fillWidth: false
|
||||
from: 2
|
||||
to: 24
|
||||
value: subdivisionsDefaultValue
|
||||
stepSize: 2
|
||||
}
|
||||
}
|
||||
//Fill rectangle to have a better UI
|
||||
Rectangle {
|
||||
color: root.palette.window
|
||||
|
@ -102,5 +143,10 @@ FloatingPane {
|
|||
}
|
||||
|
||||
}
|
||||
TextMetrics {
|
||||
id: textMetrics_subdivisionsValue
|
||||
font: subdivisionsLabel.font
|
||||
text: "10.00"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue