diff options
Diffstat (limited to 'examples/quick/shadereffects')
-rw-r--r-- | examples/quick/shadereffects/shadereffects.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/quick/shadereffects/shadereffects.qml b/examples/quick/shadereffects/shadereffects.qml index b76c960a8f..25efa5f4ed 100644 --- a/examples/quick/shadereffects/shadereffects.qml +++ b/examples/quick/shadereffects/shadereffects.qml @@ -43,6 +43,7 @@ import QtQuick 2.0 import "content" Rectangle { + id: root width: 320 height: 480 /*! @@ -56,10 +57,10 @@ Rectangle { */ property color col: "lightsteelblue" gradient: Gradient { - GradientStop { position: 0.0; color: Qt.tint(col, "#20FFFFFF") } - GradientStop { position: 0.1; color: Qt.tint(col, "#20AAAAAA") } - GradientStop { position: 0.9; color: Qt.tint(col, "#20666666") } - GradientStop { position: 1.0; color: Qt.tint(col, "#20000000") } + GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") } + GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") } + GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") } + GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") } } ShaderEffectSource { @@ -241,7 +242,7 @@ Rectangle { width: 160 height: 160 property variant source: theSource - property color tint: sliderToColor(colorizeSlider.value) + property color tint: root.sliderToColor(colorizeSlider.value) fragmentShader: " uniform sampler2D source; uniform lowp vec4 tint; |