on xenial help sign in
cleanup
b1b4feeMichael Zanetti
Launcher/LauncherDelegate.qml+11−36
@@ -25,6 +25,7 @@ Item {
25 property real angle: 0
25 property real angle: 0
26 property bool highlighted: false
26 property bool highlighted: false
27 property real offset: 0
27 property real offset: 0
28+ property alias brightness: transformEffect.brightness
28
29
29 property real maxAngle: 0
30 property real maxAngle: 0
30 property bool inverted: false
31 property bool inverted: false
@@ -37,31 +38,18 @@ Item {
37
38
38 property bool dragging:false
39 property bool dragging:false
39
40
40−// property real brightness: 0
41− property alias brightness: brightnessEffect.brightness
42−
43 signal clicked()
41 signal clicked()
44 signal longtap()
42 signal longtap()
45 signal released()
43 signal released()
46
44
47− onYChanged: print("y is", y)
48−
49 UbuntuShape {
45 UbuntuShape {
50 id: iconItem
46 id: iconItem
51 color: Qt.rgba(0, 0, 1, 0.5)
47 color: Qt.rgba(0, 0, 1, 0.5)
52 width: parent.width
48 width: parent.width
53 height: parent.height
49 height: parent.height
54 anchors.centerIn: parent
50 anchors.centerIn: parent
55− anchors.verticalCenterOffset: root.offset + (height - root.effectiveHeight)/2 * (angle < 0 ? 1 : -1)
56− rotation: root.inverted ? 180 : 0
57 radius: "medium"
51 radius: "medium"
58
52
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−
65 image: Image {
53 image: Image {
66 id: iconImage
54 id: iconImage
67 source: "../graphics/applicationIcons/" + root.iconName + ".png"
55 source: "../graphics/applicationIcons/" + root.iconName + ".png"
@@ -90,31 +78,17 @@ Item {
90 width: iconItem.width + units.gu(1.5)
78 width: iconItem.width + units.gu(1.5)
91 height: width
79 height: width
92 }
80 }
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−*/
109 }
81 }
82+
110 ShaderEffect {
83 ShaderEffect {
111− id: brightnessEffect
84+ id: transformEffect
112 anchors.centerIn: parent
85 anchors.centerIn: parent
113 width: parent.width
86 width: parent.width
114 height: parent.height
87 height: parent.height
115 property real itemOpacity: root.opacity
88 property real itemOpacity: root.opacity
116 property real brightness: 0
89 property real brightness: 0
117 property real angle: root.angle
90 property real angle: root.angle
91+ rotation: root.inverted ? 180 : 0
118
92
119 anchors.verticalCenterOffset: root.offset + (height - root.effectiveHeight)/2 * (angle < 0 ? 1 : -1)
93 anchors.verticalCenterOffset: root.offset + (height - root.effectiveHeight)/2 * (angle < 0 ? 1 : -1)
120
94
@@ -122,6 +96,13 @@ Item {
122 sourceItem: iconItem
96 sourceItem: iconItem
123 hideSource: true
97 hideSource: true
124 }
98 }
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+
125/* vertexShader: "
106/* vertexShader: "
126 uniform highp mat4 qt_Matrix;
107 uniform highp mat4 qt_Matrix;
127 attribute highp vec4 qt_Vertex;
108 attribute highp vec4 qt_Vertex;
@@ -147,12 +128,6 @@ Item {
147 sourceColor *= itemOpacity;
128 sourceColor *= itemOpacity;
148 gl_FragColor = sourceColor;
129 gl_FragColor = sourceColor;
149 }"
130 }"
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− }
156 }
131 }
157
132
158 QtObject {
133 QtObject {
Launcher/LauncherPanel.qml+1−1
@@ -24,7 +24,7 @@ Item {
24 rotation: inverted ? 180 : 0
24 rotation: inverted ? 180 : 0
25
25
26 property var model
26 property var model
27− property bool inverted: false
27+ property bool inverted: true
28 property bool dragging: false
28 property bool dragging: false
29 property bool moving: launcherFlickable.moving
29 property bool moving: launcherFlickable.moving
30 property int dragPosition: 0
30 property int dragPosition: 0