on xenial help sign in
Make peeking-animation adapt to inverted-flag of launcher-panel... removed panelMoved-signal.
commit99b10631866358eb966ebd4f845323e4b6cd0ad6 authorMirco Müller <mirco.mueller@canonical.com> dateTue 14 Jul 2015, 12:20 (11 years ago) parent085089a
2 files changed+2−27
qml/Launcher/LauncherDelegate.qml−12 qml/Launcher/LauncherPanel.qml+2−15
qml/Launcher/LauncherDelegate.qml−12
@@ -46,18 +46,6 @@ Item {
4646 signal alertingTriggered(int alertIndex)
4747 signal alertingEnded(int alertIndex)
4848
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−
6149 onAlertingChanged: {
6250 if (alerting) {
6351 alertingTriggered(index)
qml/Launcher/LauncherPanel.qml+2−15
@@ -37,16 +37,11 @@ Rectangle {
3737
3838 signal applicationSelected(string appId)
3939 signal showDashHome()
40− signal panelMoved()
4140
4241 onXChanged: {
4342 if (quickList.state == "open") {
4443 quickList.state = ""
4544 }
46−
47− if (launcherListView.peekingIndex !== -1) {
48− panelMoved()
49− }
5045 }
5146
5247 Column {
@@ -238,21 +233,13 @@ Rectangle {
238233 source: "graphics/divider-line.png"
239234 }
240235
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−
249236 states: [
250237 State {
251238 name: "peeking"
252239 when: peekingItem === launcherDelegate && !dragging && launcher.state !== "visible"
253240 PropertyChanges {
254241 target: launcherDelegate
255− x: units.gu(.5) + launcherListView.width * .5
242+ x: (units.gu(.5) + launcherListView.width * .5) * (root.inverted ? -1 : 1)
256243 }
257244 },
258245 State {
@@ -302,7 +289,7 @@ Rectangle {
302289 loops: 1
303290 target: launcherDelegate
304291 properties: "x"
305− to: units.gu(.5) + launcherListView.width * .5
292+ to: (units.gu(.5) + launcherListView.width * .5) * (root.inverted ? -1 : 1)
306293 duration: UbuntuAnimation.BriskDuration
307294 }
308295