mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 18:36:32 +02:00
Banging my head against qml...
This commit is contained in:
parent
8994200d01
commit
18287ed45b
7 changed files with 46 additions and 18 deletions
|
@ -9,16 +9,19 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls 1.4 as Original
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import "../hifi-qml/styles-uit"
|
||||
import "../hifi-qml/controls-uit" as HifiControls
|
||||
|
||||
|
||||
Item {
|
||||
HifiConstants { id: luci }
|
||||
id: root
|
||||
width: 400
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 24
|
||||
property bool integral: false
|
||||
property var config
|
||||
|
@ -36,19 +39,19 @@ Item {
|
|||
HifiControls.Label {
|
||||
id: labelControl
|
||||
text: root.label
|
||||
enabled: true
|
||||
anchors.left: root.left
|
||||
anchors.leftMargin: 8
|
||||
anchors.top: root.top
|
||||
anchors.topMargin: 7
|
||||
anchors.right: root.horizontalCenter
|
||||
anchors.verticalCenter: root.verticalCenter
|
||||
//anchors.topMargin: 7
|
||||
}
|
||||
|
||||
HifiControls.Label {
|
||||
id: labelValue
|
||||
text: sliderControl.value.toFixed(root.integral ? 0 : 2)
|
||||
anchors.right: root.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.top: root.top
|
||||
anchors.topMargin: 15
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottomMargin: 0
|
||||
}
|
||||
|
||||
Binding {
|
||||
|
@ -62,11 +65,11 @@ Item {
|
|||
HifiControls.Slider {
|
||||
id: sliderControl
|
||||
stepSize: root.integral ? 1.0 : 0.0
|
||||
width: root.width-130
|
||||
height: 20
|
||||
//height: 20
|
||||
anchors.left: root.horizontalCenter
|
||||
anchors.right: root.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.rightMargin: 0
|
||||
anchors.top: root.top
|
||||
anchors.topMargin: 3
|
||||
anchors.topMargin: 0
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -16,19 +16,43 @@ import "../lib/hifi-qml/controls-uit" as HifiControls
|
|||
import "../lib/configprop"
|
||||
|
||||
Rectangle {
|
||||
id: render;
|
||||
HifiConstants { id: hifi;}
|
||||
id: render;
|
||||
anchors.margins: hifi.dimensions.contentMargin.x
|
||||
|
||||
color: hifi.colors.baseGray;
|
||||
property var mainViewTask: Render.getConfig("RenderMainView")
|
||||
|
||||
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 10
|
||||
Column {
|
||||
spacing: 10
|
||||
|
||||
padding: 10
|
||||
spacing: 5
|
||||
|
||||
// width: parent.width
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
// padding: hifi.dimensions.contentMargin.x
|
||||
|
||||
ConfigSlider {
|
||||
label: qsTr("ToneMapping")
|
||||
integral: false
|
||||
config: render.mainViewTask.getConfig("ToneMapping")
|
||||
property: "exposure"
|
||||
max: 2
|
||||
min: 0
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
|
||||
Row {
|
||||
|
||||
spacing: 20
|
||||
padding: 10
|
||||
Column {
|
||||
Column {
|
||||
spacing: 10
|
||||
Repeater {
|
||||
model: [
|
||||
|
@ -249,4 +273,5 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue