@@ -27,7 +27,7 @@ Item {
27 property bool itemFocused: false
27 property bool itemFocused: false
28 property real maxAngle: 0
28 property real maxAngle: 0
29 property bool inverted: false
29 property bool inverted: false
30− property bool clipCorner: false
30+ property alias pinned: pin.visible
32 readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
32 readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
33 readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
33 readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
@@ -71,6 +71,20 @@ Item {
71 height: root.itemHeight - units.gu(1)
71 height: root.itemHeight - units.gu(1)
79+ topMargin: -units.dp(2)
74 UbuntuShape {
88 UbuntuShape {
75 objectName: "countEmblem"
89 objectName: "countEmblem"
@@ -149,24 +163,6 @@ Item {
154− anchors.centerIn: parent
155− width: iconItem.width
156− height: iconItem.height
160− topMargin: -units.gu(2)
161− leftMargin: -units.gu(2)
162− rightMargin: -units.gu(2)
163− bottomMargin: units.gu(1.2)
166− rotation: root.rotation + 45
170 ShaderEffect {
166 ShaderEffect {
171 id: transformEffect
167 id: transformEffect
172 anchors.centerIn: parent
168 anchors.centerIn: parent
@@ -176,7 +172,6 @@ Item {
176 property real itemOpacity: root.itemOpacity
172 property real itemOpacity: root.itemOpacity
177 property real brightness: Math.max(-1, root.brightness)
173 property real brightness: Math.max(-1, root.brightness)
178 property real angle: root.angle
174 property real angle: root.angle
179− property bool clipCorner: root.clipCorner
180 rotation: root.inverted ? 180 : 0
175 rotation: root.inverted ? 180 : 0
182 property variant source: ShaderEffectSource {
177 property variant source: ShaderEffectSource {
@@ -185,11 +180,6 @@ Item {
185 hideSource: true
180 hideSource: true
188− property var mask: ShaderEffectSource {
193 transform: [
183 transform: [
194 // Rotating 3 times at top/bottom because that increases the perspective.
184 // Rotating 3 times at top/bottom because that increases the perspective.
195 // This is a hack, but as QML does not support real 3D coordinates
185 // This is a hack, but as QML does not support real 3D coordinates
@@ -224,19 +214,14 @@ Item {
224 fragmentShader: "
214 fragmentShader: "
225 varying highp vec2 qt_TexCoord0;
215 varying highp vec2 qt_TexCoord0;
226 uniform sampler2D source;
216 uniform sampler2D source;
227− uniform sampler2D mask;
228 uniform lowp float brightness;
217 uniform lowp float brightness;
229 uniform lowp float itemOpacity;
218 uniform lowp float itemOpacity;
230 uniform bool clipCorner;
219 uniform bool clipCorner;
231 void main(void)
220 void main(void)
233 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
222 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
234− highp vec4 maskColor = texture2D(mask, qt_TexCoord0);
235 sourceColor.rgb = mix(sourceColor.rgb, vec3(step(0.0, brightness)), abs(brightness));
223 sourceColor.rgb = mix(sourceColor.rgb, vec3(step(0.0, brightness)), abs(brightness));
236 sourceColor *= itemOpacity;
224 sourceColor *= itemOpacity;
238− sourceColor *= maskColor.a;
240 gl_FragColor = sourceColor;
225 gl_FragColor = sourceColor;