on xenial help sign in
Make peeking-animation adapt to inverted-flag of launcher-panel... removed panelMoved-signal.
99b1063Mirco Müller
qml/Launcher/LauncherDelegate.qml−12
@@ -46,18 +46,6 @@ Item {
46 signal alertingTriggered(int alertIndex)
46 signal alertingTriggered(int alertIndex)
47 signal alertingEnded(int alertIndex)
47 signal alertingEnded(int alertIndex)
48
48
49− Connections {
50− target: mainColumn.parent
51− onPanelMoved: {
52− if (alerting && launcherListView.peekingIndex === index) {
53− x = Math.max(units.gu(4.5) - launcher.visibleWidth, 0)
54− if (x === 0) {
55− alertingEnded(index)
56− }
57− }
58− }
59− }
60−
61 onAlertingChanged: {
49 onAlertingChanged: {
62 if (alerting) {
50 if (alerting) {
63 alertingTriggered(index)
51 alertingTriggered(index)
qml/Launcher/LauncherPanel.qml+2−15
@@ -37,16 +37,11 @@ Rectangle {
37
37
38 signal applicationSelected(string appId)
38 signal applicationSelected(string appId)
39 signal showDashHome()
39 signal showDashHome()
40− signal panelMoved()
41
40
42 onXChanged: {
41 onXChanged: {
43 if (quickList.state == "open") {
42 if (quickList.state == "open") {
44 quickList.state = ""
43 quickList.state = ""
45 }
44 }
46−
47− if (launcherListView.peekingIndex !== -1) {
48− panelMoved()
49− }
50 }
45 }
51
46
52 Column {
47 Column {
@@ -238,21 +233,13 @@ Rectangle {
238 source: "graphics/divider-line.png"
233 source: "graphics/divider-line.png"
239 }
234 }
240
235
241− // just for debugging the peeking animation on the device
242− onStateChanged: {
243− print("launcher-panel state changed")
244− if (state === "peeking") {
245− print("trying to run peeking animation")
246− }
247− }
248−
249 states: [
236 states: [
250 State {
237 State {
251 name: "peeking"
238 name: "peeking"
252 when: peekingItem === launcherDelegate && !dragging && launcher.state !== "visible"
239 when: peekingItem === launcherDelegate && !dragging && launcher.state !== "visible"
253 PropertyChanges {
240 PropertyChanges {
254 target: launcherDelegate
241 target: launcherDelegate
255− x: units.gu(.5) + launcherListView.width * .5
242+ x: (units.gu(.5) + launcherListView.width * .5) * (root.inverted ? -1 : 1)
256 }
243 }
257 },
244 },
258 State {
245 State {
@@ -302,7 +289,7 @@ Rectangle {
302 loops: 1
289 loops: 1
303 target: launcherDelegate
290 target: launcherDelegate
304 properties: "x"
291 properties: "x"
305− to: units.gu(.5) + launcherListView.width * .5
292+ to: (units.gu(.5) + launcherListView.width * .5) * (root.inverted ? -1 : 1)
306 duration: UbuntuAnimation.BriskDuration
293 duration: UbuntuAnimation.BriskDuration
307 }
294 }
308
295