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,58 +195,118 @@ Rectangle {
} }
} }
} }
GroupBox {
title: "Edge"
ConfigSlider {
height: 36
label: "Edge Width"
integral: false
config: root.config
property: "edgeWidth"
max: 1.0
min: 0.0
}
RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Column { GroupBox {
spacing: 8 title: "Edge Inner color"
anchors.left: parent.left Layout.fillWidth: true
anchors.right: parent.right
ConfigSlider { Column {
height: 38
label: "Width"
integral: false
config: root.config
property: "edgeWidth"
max: 1.0
min: 0.0
}
Row {
spacing: 8
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
GroupBox { Color {
title: "Inner color" height: 30
Layout.fillWidth: true anchors.left: parent.left
anchors.right: parent.right
Column { _color: Qt.rgba(root.config.edgeInnerColorR, root.config.edgeInnerColorG, root.config.edgeInnerColorB, 1.0)
anchors.left: parent.left onNewColor: {
anchors.right: parent.right root.config.edgeInnerColorR = _color.red
root.config.edgeInnerColorG = _color.green
Repeater { root.config.edgeInnerColorB = _color.blue
model: [
"Color R:edgeInnerColorR",
"Color G:edgeInnerColorG",
"Color B:edgeInnerColorB",
"Color intensity:edgeInnerIntensity" ]
ConfigSlider {
height: 38
label: modelData.split(":")[0]
integral: false
config: root.config
property: modelData.split(":")[1]
max: 1.0
min: 0.0
}
}
} }
} }
ConfigSlider {
height: 36
label: "Intensity"
integral: false
config: root.config
property: "edgeInnerIntensity"
max: 1.0
min: 0.0
}
}
}
GroupBox {
title: "Edge Outer color"
Layout.fillWidth: true
Column {
anchors.left: parent.left
anchors.right: parent.right
Color {
height: 30
anchors.left: parent.left
anchors.right: parent.right
_color: Qt.rgba(root.config.edgeOuterColorR, root.config.edgeOuterColorG, root.config.edgeOuterColorB, 1.0)
onNewColor: {
root.config.edgeOuterColorR = _color.red
root.config.edgeOuterColorG = _color.green
root.config.edgeOuterColorB = _color.blue
}
}
ConfigSlider {
height: 36
label: "Intensity"
integral: false
config: root.config
property: "edgeOuterIntensity"
max: 1.0
min: 0.0
}
}
}
}
GroupBox {
title: "Timing"
Layout.fillWidth: true
ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
RowLayout {
Layout.fillWidth: true
ConfigSlider {
anchors.left: undefined
anchors.right: undefined
Layout.fillWidth: true
height: 36
label: "Duration"
integral: false
config: root.config
property: "duration"
max: 10.0
min: 0.1
}
HifiControls.ComboBox {
Layout.fillWidth: true
model: ["Linear", "Ease In", "Ease Out", "Ease In / Out"]
currentIndex: root.config["timing"]
onCurrentIndexChanged: {
root.config["timing"] = currentIndex;
}
}
}
RowLayout {
Layout.fillWidth: true
GroupBox { GroupBox {
title: "Outer color" title: "Noise Animation"
Layout.fillWidth: true Layout.fillWidth: true
Column { Column {
@ -254,99 +315,40 @@ Rectangle {
Repeater { Repeater {
model: [ model: [
"Color R:edgeOuterColorR", "Speed X:noiseSpeedX",
"Color G:edgeOuterColorG", "Speed Y:noiseSpeedY",
"Color B:edgeOuterColorB", "Speed Z:noiseSpeedZ" ]
"Color intensity:edgeOuterIntensity" ]
ConfigSlider { ConfigSlider {
height: 38 height: 36
label: modelData.split(":")[0] label: modelData.split(":")[0]
integral: false integral: false
config: root.config config: root.config
property: modelData.split(":")[1] property: modelData.split(":")[1]
max: 1.0 max: 1.0
min: 0.0 min: -1.0
} }
} }
} }
} }
}
}
}
GroupBox { PlotPerf {
title: "Timing" title: "Threshold"
Layout.fillWidth: true
Column { height: parent.evalEvenHeight()
anchors.left: parent.left object: config
anchors.right: parent.right valueUnit: "%"
valueScale: 0.01
ConfigSlider { valueNumDigits: "1"
label: "Duration" plots: [
integral: false {
config: root.config prop: "threshold",
property: "duration" label: "Threshold",
max: 10.0 color: "#FFBB77"
min: 0.1 }
} ]
HifiControls.ComboBox {
width: 200
model: ["Linear", "Ease In", "Ease Out", "Ease In / Out"]
currentIndex: root.config["timing"]
onCurrentIndexChanged: {
root.config["timing"] = currentIndex;
} }
} }
GroupBox {
title: "Noise Animation"
Column {
anchors.left: parent.left
anchors.right: parent.right
ConfigSlider {
label: "Speed X"
integral: false
config: root.config
property: "noiseSpeedX"
max: 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 {
title: "Threshold"
height: parent.evalEvenHeight()
object: config
valueUnit: "%"
valueScale: 0.01
valueNumDigits: "1"
plots: [
{
prop: "threshold",
label: "Threshold",
color: "#FFBB77"
}
]
}
} }
} }