[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [gcompris] src/activities/color_mix: color_mix, fixed a long lasting bug in colorization
From:       Bruno Coudoin <bruno.coudoin () gcompris ! net>
Date:       2015-11-30 19:37:30
Message-ID: E1a3UGQ-0004pk-9x () scm ! kde ! org
[Download RAW message or body]

Git commit 45a82d5a9e74eec4bc651a1a44730d455f03e44d by Bruno Coudoin.
Committed on 30/11/2015 at 19:35.
Pushed by bcoudoin into branch 'master'.

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.

M  +18   -16   src/activities/color_mix/ColorChooser.qml

http://commits.kde.org/gcompris/45a82d5a9e74eec4bc651a1a44730d455f03e44d

diff --git a/src/activities/color_mix/ColorChooser.qml b/src/activities/col=
or_mix/ColorChooser.qml
index b6e0191..0f41696 100644
--- a/src/activities/color_mix/ColorChooser.qml
+++ b/src/activities/color_mix/ColorChooser.qml
@@ -40,36 +40,38 @@ Image {
         source: Activity.url + "flashlight2.svg"
         sourceSize.height: parent.sourceSize.height
         z: 2
-        visible: activity.modeRGB ? true : false
+        visible: false
+    }
 =

-        Colorize {
-            anchors.fill: parent
-            source: parent
-            hue: chooser.hue
-            lightness: -(maxSteps - currentStep) / maxSteps
-            saturation: 1
-        }
+    Colorize {
+        anchors.fill: intensityScreen
+        source: intensityScreen
+        hue: chooser.hue
+        lightness: -(maxSteps - currentStep) / maxSteps
+        saturation: 1
+        visible: activity.modeRGB ? true : false
     }
 =

     Image {
         id: intensityLight
         source: Activity.url + "light.svg"
         sourceSize.height: intensityScreen.sourceSize.height / 2
-        visible: intensityScreen.visible
+        visible: false
         anchors {
             left: intensityScreen.right
             leftMargin: -20 * ApplicationInfo.ratio
             verticalCenter: intensityScreen.verticalCenter
         }
         opacity: currentStep / maxSteps
+    }
 =

-        Colorize {
-            anchors.fill: parent
-            source: parent
-            hue: chooser.hue
-            lightness: -(maxSteps - currentStep) / maxSteps
-            saturation: 1
-        }
+    Colorize {
+        anchors.fill: intensityLight
+        source: intensityLight
+        hue: chooser.hue
+        lightness: -(maxSteps - currentStep) / maxSteps
+        saturation: 1
+        visible: intensityScreen.visible
     }
 =

     Image {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic