Used color selectors in transition.qml

This commit is contained in:
Olivier Prat 2018-02-06 16:19:15 +01:00
parent 51ea89ffea
commit 8c12ab9b76

View file

@ -28,8 +28,9 @@ Rectangle {
property var configEdit: Render.getConfig("RenderMainView.FadeEdit"); property var configEdit: Render.getConfig("RenderMainView.FadeEdit");
ColumnLayout { ColumnLayout {
spacing: 5 spacing: 3
anchors.fill: parent anchors.left: parent.left
anchors.right: parent.right
anchors.margins: hifi.dimensions.contentMargin.x anchors.margins: hifi.dimensions.contentMargin.x
HifiControls.Label { HifiControls.Label {
text: "Transition" text: "Transition"
@ -75,7 +76,7 @@ Rectangle {
RowLayout { RowLayout {
spacing: 20 spacing: 20
height: 38 height: 36
HifiControls.CheckBox { HifiControls.CheckBox {
boxSize: 20 boxSize: 20
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -88,7 +89,7 @@ Rectangle {
ConfigSlider { ConfigSlider {
anchors.left: undefined anchors.left: undefined
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 38 height: 36
width: 320 width: 320
label: "Threshold" label: "Threshold"
integral: false integral: false
@ -125,7 +126,7 @@ Rectangle {
id: paramWidgets id: paramWidgets
ColumnLayout { ColumnLayout {
spacing: 10 spacing: 3
width: root_col.width width: root_col.width
HifiControls.CheckBox { HifiControls.CheckBox {
@ -142,7 +143,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Column { Column {
spacing: 8 spacing: 3
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -154,7 +155,7 @@ Rectangle {
"Level:baseLevel" ] "Level:baseLevel" ]
ConfigSlider { ConfigSlider {
height: 38 height: 36
label: modelData.split(":")[0] label: modelData.split(":")[0]
integral: false integral: false
config: root.config config: root.config
@ -170,7 +171,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Column { Column {
spacing: 8 spacing: 3
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -182,7 +183,7 @@ Rectangle {
"Level:noiseLevel" ] "Level:noiseLevel" ]
ConfigSlider { ConfigSlider {
height: 38 height: 36
label: modelData.split(":")[0] label: modelData.split(":")[0]
integral: false integral: false
config: root.config config: root.config
@ -194,95 +195,97 @@ Rectangle {
} }
} }
} }
GroupBox {
title: "Edge"
Layout.fillWidth: true
Column {
spacing: 8
anchors.left: parent.left
anchors.right: parent.right
ConfigSlider { ConfigSlider {
height: 38 height: 36
label: "Width" label: "Edge Width"
integral: false integral: false
config: root.config config: root.config
property: "edgeWidth" property: "edgeWidth"
max: 1.0 max: 1.0
min: 0.0 min: 0.0
} }
Row { RowLayout {
spacing: 8 Layout.fillWidth: true
anchors.left: parent.left
anchors.right: parent.right
GroupBox { GroupBox {
title: "Inner color" title: "Edge Inner color"
Layout.fillWidth: true Layout.fillWidth: true
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
Repeater { Color {
model: [ height: 30
"Color R:edgeInnerColorR", anchors.left: parent.left
"Color G:edgeInnerColorG", anchors.right: parent.right
"Color B:edgeInnerColorB", _color: Qt.rgba(root.config.edgeInnerColorR, root.config.edgeInnerColorG, root.config.edgeInnerColorB, 1.0)
"Color intensity:edgeInnerIntensity" ] onNewColor: {
root.config.edgeInnerColorR = _color.red
root.config.edgeInnerColorG = _color.green
root.config.edgeInnerColorB = _color.blue
}
}
ConfigSlider { ConfigSlider {
height: 38 height: 36
label: modelData.split(":")[0] label: "Intensity"
integral: false integral: false
config: root.config config: root.config
property: modelData.split(":")[1] property: "edgeInnerIntensity"
max: 1.0 max: 1.0
min: 0.0 min: 0.0
} }
} }
} }
}
GroupBox { GroupBox {
title: "Outer color" title: "Edge Outer color"
Layout.fillWidth: true Layout.fillWidth: true
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
Repeater { Color {
model: [ height: 30
"Color R:edgeOuterColorR", anchors.left: parent.left
"Color G:edgeOuterColorG", anchors.right: parent.right
"Color B:edgeOuterColorB", _color: Qt.rgba(root.config.edgeOuterColorR, root.config.edgeOuterColorG, root.config.edgeOuterColorB, 1.0)
"Color intensity:edgeOuterIntensity" ] onNewColor: {
root.config.edgeOuterColorR = _color.red
root.config.edgeOuterColorG = _color.green
root.config.edgeOuterColorB = _color.blue
}
}
ConfigSlider { ConfigSlider {
height: 38 height: 36
label: modelData.split(":")[0] label: "Intensity"
integral: false integral: false
config: root.config config: root.config
property: modelData.split(":")[1] property: "edgeOuterIntensity"
max: 1.0 max: 1.0
min: 0.0 min: 0.0
} }
} }
} }
} }
}
}
}
GroupBox { GroupBox {
title: "Timing" title: "Timing"
Layout.fillWidth: true
Column { ColumnLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
RowLayout {
Layout.fillWidth: true
ConfigSlider { ConfigSlider {
anchors.left: undefined
anchors.right: undefined
Layout.fillWidth: true
height: 36
label: "Duration" label: "Duration"
integral: false integral: false
config: root.config config: root.config
@ -291,48 +294,47 @@ Rectangle {
min: 0.1 min: 0.1
} }
HifiControls.ComboBox { HifiControls.ComboBox {
width: 200 Layout.fillWidth: true
model: ["Linear", "Ease In", "Ease Out", "Ease In / Out"] model: ["Linear", "Ease In", "Ease Out", "Ease In / Out"]
currentIndex: root.config["timing"] currentIndex: root.config["timing"]
onCurrentIndexChanged: { onCurrentIndexChanged: {
root.config["timing"] = currentIndex; root.config["timing"] = currentIndex;
} }
} }
}
RowLayout {
Layout.fillWidth: true
GroupBox { GroupBox {
title: "Noise Animation" title: "Noise Animation"
Layout.fillWidth: true
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
Repeater {
model: [
"Speed X:noiseSpeedX",
"Speed Y:noiseSpeedY",
"Speed Z:noiseSpeedZ" ]
ConfigSlider { ConfigSlider {
label: "Speed X" height: 36
label: modelData.split(":")[0]
integral: false integral: false
config: root.config config: root.config
property: "noiseSpeedX" property: modelData.split(":")[1]
max: 1.0 max: 1.0
min: -1.0 min: -1.0
} }
ConfigSlider {
label: "Speed Y"
integral: false
config: root.config
property: "noiseSpeedY"
max: 1.0
min: -1.0
}
ConfigSlider {
label: "Speed Z"
integral: false
config: root.config
property: "noiseSpeedZ"
max: 1.0
min: -1.0
} }
} }
} }
PlotPerf { PlotPerf {
title: "Threshold" title: "Threshold"
Layout.fillWidth: true
height: parent.evalEvenHeight() height: parent.evalEvenHeight()
object: config object: config
valueUnit: "%" valueUnit: "%"
@ -346,7 +348,7 @@ Rectangle {
} }
] ]
} }
}
} }
} }