mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +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 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4 as Original
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
|
||||||
import "../hifi-qml/styles-uit"
|
import "../hifi-qml/styles-uit"
|
||||||
import "../hifi-qml/controls-uit" as HifiControls
|
import "../hifi-qml/controls-uit" as HifiControls
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
HifiConstants { id: luci }
|
||||||
id: root
|
id: root
|
||||||
width: 400
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
height: 24
|
height: 24
|
||||||
property bool integral: false
|
property bool integral: false
|
||||||
property var config
|
property var config
|
||||||
|
@ -36,19 +39,19 @@ Item {
|
||||||
HifiControls.Label {
|
HifiControls.Label {
|
||||||
id: labelControl
|
id: labelControl
|
||||||
text: root.label
|
text: root.label
|
||||||
|
enabled: true
|
||||||
anchors.left: root.left
|
anchors.left: root.left
|
||||||
anchors.leftMargin: 8
|
anchors.right: root.horizontalCenter
|
||||||
anchors.top: root.top
|
anchors.verticalCenter: root.verticalCenter
|
||||||
anchors.topMargin: 7
|
//anchors.topMargin: 7
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
HifiControls.Label {
|
||||||
id: labelValue
|
id: labelValue
|
||||||
text: sliderControl.value.toFixed(root.integral ? 0 : 2)
|
text: sliderControl.value.toFixed(root.integral ? 0 : 2)
|
||||||
anchors.right: root.right
|
anchors.right: root.right
|
||||||
anchors.rightMargin: 8
|
anchors.bottom: root.bottom
|
||||||
anchors.top: root.top
|
anchors.bottomMargin: 0
|
||||||
anchors.topMargin: 15
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
|
@ -62,11 +65,11 @@ Item {
|
||||||
HifiControls.Slider {
|
HifiControls.Slider {
|
||||||
id: sliderControl
|
id: sliderControl
|
||||||
stepSize: root.integral ? 1.0 : 0.0
|
stepSize: root.integral ? 1.0 : 0.0
|
||||||
width: root.width-130
|
//height: 20
|
||||||
height: 20
|
anchors.left: root.horizontalCenter
|
||||||
anchors.right: root.right
|
anchors.right: root.right
|
||||||
anchors.rightMargin: 8
|
anchors.rightMargin: 0
|
||||||
anchors.top: root.top
|
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"
|
import "../lib/configprop"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: render;
|
|
||||||
HifiConstants { id: hifi;}
|
HifiConstants { id: hifi;}
|
||||||
|
id: render;
|
||||||
|
anchors.margins: hifi.dimensions.contentMargin.x
|
||||||
|
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
property var mainViewTask: Render.getConfig("RenderMainView")
|
property var mainViewTask: Render.getConfig("RenderMainView")
|
||||||
|
|
||||||
|
Row {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.margins: 10
|
||||||
Column {
|
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 {
|
Row {
|
||||||
|
|
||||||
spacing: 20
|
spacing: 20
|
||||||
padding: 10
|
padding: 10
|
||||||
Column {
|
Column {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
Repeater {
|
Repeater {
|
||||||
model: [
|
model: [
|
||||||
|
@ -249,4 +273,5 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue