adjusting the qml again ? i just hate the layout / anchor system

This commit is contained in:
Sam Gateau 2017-10-26 23:22:06 -07:00
parent 1dbeac7b88
commit a2765cffbd

View file

@ -21,39 +21,25 @@ Rectangle {
anchors.margins: hifi.dimensions.contentMargin.x 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 {
padding: 10
spacing: 5 spacing: 5
// width: parent.width
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
// padding: hifi.dimensions.contentMargin.x anchors.margins: hifi.dimensions.contentMargin.x
//padding: hifi.dimensions.contentMargin.x
ConfigSlider { HifiControls.Label {
label: qsTr("ToneMapping") text: "Shading"
integral: false
config: render.mainViewTask.getConfig("ToneMapping")
property: "exposure"
max: 2
min: 0
anchors.left: parent.left
anchors.right: parent.right
} }
Row { Row {
anchors.left: parent.left
anchors.right: parent.right
spacing: 20 spacing: 20
padding: 10
Column { Column {
spacing: 10 spacing: 10
// padding: 10
Repeater { Repeater {
model: [ model: [
"Unlit:LightingModel:enableUnlit", "Unlit:LightingModel:enableUnlit",
@ -116,6 +102,8 @@ Rectangle {
} }
Separator {} Separator {}
Column { Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: 10 spacing: 10
Repeater { Repeater {
model: [ "Tone Mapping Exposure:ToneMapping:exposure:5.0:-5.0" model: [ "Tone Mapping Exposure:ToneMapping:exposure:5.0:-5.0"
@ -127,17 +115,22 @@ Rectangle {
property: modelData.split(":")[2] property: modelData.split(":")[2]
max: modelData.split(":")[3] max: modelData.split(":")[3]
min: modelData.split(":")[4] min: modelData.split(":")[4]
anchors.left: parent.left
anchors.right: parent.right
} }
} }
Row { Row {
anchors.left: parent.left
anchors.right: parent.right
HifiControls.Label { HifiControls.Label {
text: "Tone Mapping Curve" text: "Tone Mapping Curve"
anchors.left: root.left // anchors.left: parent.left
} }
HifiControls.ComboBox { HifiControls.ComboBox {
anchors.right: root.right // anchors.right: parent.right
currentIndex: 1 currentIndex: 1
model: ListModel { model: ListModel {
id: cbItems id: cbItems
@ -151,7 +144,11 @@ Rectangle {
} }
} }
} }
Separator {}
Row { Row {
anchors.left: parent.left
anchors.right: parent.right
id: framebuffer id: framebuffer
spacing: 10 spacing: 10
height: 24 height: 24
@ -159,7 +156,7 @@ Rectangle {
HifiControls.Label { HifiControls.Label {
text: "Debug Framebuffer" text: "Debug Framebuffer"
height: 24 height: 24
anchors.left: root.left // anchors.left: parent.left
} }
property var config: render.mainViewTask.getConfig("DebugDeferredBuffer") property var config: render.mainViewTask.getConfig("DebugDeferredBuffer")
@ -171,7 +168,7 @@ Rectangle {
HifiControls.ComboBox { HifiControls.ComboBox {
height: 24 height: 24
anchors.right: root.right // anchors.right: parent.right
currentIndex: 0 currentIndex: 0
model: ListModel { model: ListModel {
id: cbItemsFramebuffer id: cbItemsFramebuffer
@ -273,5 +270,5 @@ Rectangle {
} }
} }
} }
} //}
} }