Commit 45a82d5a authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

color_mix, fixed a long lasting bug in colorization

On Android the colorization effect ended up miss rendered. In fact we where
not using the Colorize effect as it should be. Per the documentation it is not
allowed to colorize its parent.
parent 07ef3d6a
...@@ -40,36 +40,38 @@ Image { ...@@ -40,36 +40,38 @@ Image {
source: Activity.url + "flashlight2.svg" source: Activity.url + "flashlight2.svg"
sourceSize.height: parent.sourceSize.height sourceSize.height: parent.sourceSize.height
z: 2 z: 2
visible: activity.modeRGB ? true : false visible: false
}
Colorize { Colorize {
anchors.fill: parent anchors.fill: intensityScreen
source: parent source: intensityScreen
hue: chooser.hue hue: chooser.hue
lightness: -(maxSteps - currentStep) / maxSteps lightness: -(maxSteps - currentStep) / maxSteps
saturation: 1 saturation: 1
} visible: activity.modeRGB ? true : false
} }
Image { Image {
id: intensityLight id: intensityLight
source: Activity.url + "light.svg" source: Activity.url + "light.svg"
sourceSize.height: intensityScreen.sourceSize.height / 2 sourceSize.height: intensityScreen.sourceSize.height / 2
visible: intensityScreen.visible visible: false
anchors { anchors {
left: intensityScreen.right left: intensityScreen.right
leftMargin: -20 * ApplicationInfo.ratio leftMargin: -20 * ApplicationInfo.ratio
verticalCenter: intensityScreen.verticalCenter verticalCenter: intensityScreen.verticalCenter
} }
opacity: currentStep / maxSteps opacity: currentStep / maxSteps
}
Colorize { Colorize {
anchors.fill: parent anchors.fill: intensityLight
source: parent source: intensityLight
hue: chooser.hue hue: chooser.hue
lightness: -(maxSteps - currentStep) / maxSteps lightness: -(maxSteps - currentStep) / maxSteps
saturation: 1 saturation: 1
} visible: intensityScreen.visible
} }
Image { Image {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment