@@ -37,6 +37,7 @@ Item {
38 property bool dragging:false
38 property bool dragging:false
40+// property real brightness: 0
40 property alias brightness: brightnessEffect.brightness
41 property alias brightness: brightnessEffect.brightness
42 signal clicked()
43 signal clicked()
@@ -90,12 +91,68 @@ Item {
90 height: width
91 height: width
93− BrightnessContrast {
94+/* BrightnessContrast {
94 id: brightnessEffect
95 id: brightnessEffect
95 anchors.fill: parent
96 anchors.fill: parent
96 source: parent
97 source: parent
97 brightness: 0
98 brightness: 0
104+ anchors.fill: parent
111+ id: brightnessEffect
112+ anchors.centerIn: parent
114+ height: parent.height
115+ property real itemOpacity: root.opacity
116+ property real brightness: 0
117+ property real angle: root.angle
119+ anchors.verticalCenterOffset: root.offset + (height - root.effectiveHeight)/2 * (angle < 0 ? 1 : -1)
121+ property variant source: ShaderEffectSource {
122+ sourceItem: iconItem
126+ uniform highp mat4 qt_Matrix;
127+ attribute highp vec4 qt_Vertex;
128+ varying highp vec2 qt_MultiTexCoord0;
129+ varying highp vec2 coord;
130+ uniform lowp float angle;
131+ varying highp vec2 centerPoint;
133+ coord = qt_MultiTexCoord0;
134+ highp vec4 rotatedVertex = qt_Vertex * angle;
135+ gl_Position = qt_Matrix * rotatedVertex;
139+ varying highp vec2 qt_TexCoord0;
140+ uniform sampler2D source;
141+ uniform lowp float brightness;
142+ uniform lowp float itemOpacity;
145+ highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
146+ sourceColor.rgb = mix(sourceColor.rgb, vec3(step(0.0, brightness)), abs(brightness));
147+ sourceColor *= itemOpacity;
148+ gl_FragColor = sourceColor;
151+ transform: Rotation {
152+ axis { x: 1; y: 0; z: 0 }
153+ origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
101 QtObject {
158 QtObject {