on xenial help sign in
cleanup
commitb1b4fee08f5c8be2bfef3053dfe0d65374ee9487 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 20 Jun 2013, 14:44 (13 years ago) parent514d6ae
2 files changed+12−37
Launcher/LauncherDelegate.qml+11−36 Launcher/LauncherPanel.qml+1−1
Launcher/LauncherDelegate.qml+11−36
@@ -25,6 +25,7 @@ Item {
2525 property real angle: 0
2626 property bool highlighted: false
2727 property real offset: 0
28+ property alias brightness: transformEffect.brightness
2829
2930 property real maxAngle: 0
3031 property bool inverted: false
@@ -37,31 +38,18 @@ Item {
3738
3839 property bool dragging:false
3940
40−// property real brightness: 0
41− property alias brightness: brightnessEffect.brightness
42−
4341 signal clicked()
4442 signal longtap()
4543 signal released()
4644
47− onYChanged: print("y is", y)
48−
4945 UbuntuShape {
5046 id: iconItem
5147 color: Qt.rgba(0, 0, 1, 0.5)
5248 width: parent.width
5349 height: parent.height
5450 anchors.centerIn: parent
55− anchors.verticalCenterOffset: root.offset + (height - root.effectiveHeight)/2 * (angle < 0 ? 1 : -1)
56− rotation: root.inverted ? 180 : 0
5751 radius: "medium"
5852
59− transform: Rotation {
60− axis { x: 1; y: 0; z: 0 }
61− origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
62− angle: root.angle
63− }
64−
6553 image: Image {
6654 id: iconImage
6755 source: "../graphics/applicationIcons/" + root.iconName + ".png"
@@ -90,31 +78,17 @@ Item {
9078 width: iconItem.width + units.gu(1.5)
9179 height: width
9280 }
93−
94−/* BrightnessContrast {
95− id: brightnessEffect
96− anchors.fill: parent
97− source: parent
98− brightness: 0
99− }
100− */
101−
102−/* UbuntuShape {
103− id: brightnessShape
104− anchors.fill: parent
105− color: "black"
106− radius: "medium"
107− }
108−*/
10981 }
82+
11083 ShaderEffect {
111− id: brightnessEffect
84+ id: transformEffect
11285 anchors.centerIn: parent
11386 width: parent.width
11487 height: parent.height
11588 property real itemOpacity: root.opacity
11689 property real brightness: 0
11790 property real angle: root.angle
91+ rotation: root.inverted ? 180 : 0
11892
11993 anchors.verticalCenterOffset: root.offset + (height - root.effectiveHeight)/2 * (angle < 0 ? 1 : -1)
12094
@@ -122,6 +96,13 @@ Item {
12296 sourceItem: iconItem
12397 hideSource: true
12498 }
99+
100+ transform: Rotation {
101+ axis { x: 1; y: 0; z: 0 }
102+ origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
103+ angle: root.angle
104+ }
105+
125106/* vertexShader: "
126107 uniform highp mat4 qt_Matrix;
127108 attribute highp vec4 qt_Vertex;
@@ -147,12 +128,6 @@ Item {
147128 sourceColor *= itemOpacity;
148129 gl_FragColor = sourceColor;
149130 }"
150−
151− transform: Rotation {
152− axis { x: 1; y: 0; z: 0 }
153− origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
154− angle: root.angle
155− }
156131 }
157132
158133 QtObject {
Launcher/LauncherPanel.qml+1−1
@@ -24,7 +24,7 @@ Item {
2424 rotation: inverted ? 180 : 0
2525
2626 property var model
27− property bool inverted: false
27+ property bool inverted: true
2828 property bool dragging: false
2929 property bool moving: launcherFlickable.moving
3030 property int dragPosition: 0