Merge lp:~mzanetti/unity8/fade-out-launcher into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Michał Sawicz
Approved revision: 982
Merged at revision: 1018
Proposed branch: lp:~mzanetti/unity8/fade-out-launcher
Merge into: lp:unity8
Diff against target: 97 lines (+40/-9)
2 files modified
qml/Launcher/Launcher.qml (+33/-3)
qml/Shell.qml (+7/-6)
To merge this branch: bzr merge lp:~mzanetti/unity8/fade-out-launcher
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Vesa Rautiainen (community) design Approve
Review via email: mp+224085@code.launchpad.net

Commit message

Fade out launcher in place instead of moving it to the left on long left edge swipes.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

N/A

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

 * Did you make sure that your branch does not contain spurious tags?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

no

 * If you changed the UI, has there been a design review?

reviewer from design requested

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
979. By Michael Zanetti

merge trunk

Revision history for this message
Vesa Rautiainen (vesar) wrote :

Looks good

review: Approve (design)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
980. By Michael Zanetti

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Shouldn't this happen when left-swiping the greeter, too?

See inline.

review: Needs Information
981. By Michael Zanetti

fix comments from review

982. By Michael Zanetti

oops. better now

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Shouldn't this happen when left-swiping the greeter, too?
>
> See inline.

fixed

Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes.

 * Did CI run pass? If not, please explain why.
Aborted. Will run now after the last commits.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Launcher/Launcher.qml'
2--- qml/Launcher/Launcher.qml 2014-03-25 11:34:34 +0000
3+++ qml/Launcher/Launcher.qml 2014-07-09 13:38:22 +0000
4@@ -55,6 +55,10 @@
5 switchToNextState("")
6 }
7
8+ function fadeOut() {
9+ fadeOutAnimation.start();
10+ }
11+
12 function switchToNextState(state) {
13 animateTimer.nextState = state
14 animateTimer.start();
15@@ -99,6 +103,31 @@
16 }
17 }
18
19+ SequentialAnimation {
20+ id: fadeOutAnimation
21+ ScriptAction {
22+ script: {
23+ panel.layer.enabled = true
24+ }
25+ }
26+ UbuntuNumberAnimation {
27+ target: panel
28+ property: "opacity"
29+ easing.type: Easing.InQuad
30+ to: 0
31+ }
32+ ScriptAction {
33+ script: {
34+ panel.layer.enabled = false
35+ panel.animate = false;
36+ root.state = "";
37+ panel.x = -panel.width
38+ panel.opacity = 1;
39+ panel.animate = true;
40+ }
41+ }
42+ }
43+
44 MouseArea {
45 id: launcherDragArea
46 enabled: root.state == "visible"
47@@ -173,9 +202,9 @@
48 }
49
50 Behavior on x {
51+ enabled: !dragArea.dragging && !launcherDragArea.drag.active && panel.animate;
52 NumberAnimation {
53- // Disabling animation when dragging
54- duration: dragArea.dragging || launcherDragArea.drag.active ? 0 : 300;
55+ duration: 300
56 easing.type: Easing.OutCubic
57 }
58 }
59@@ -215,9 +244,10 @@
60 onDraggingChanged: {
61 if (!dragging) {
62 if (distance > panel.width / 2) {
63- root.switchToNextState("visible")
64 if (distance > minimizeDistance) {
65 root.dash()
66+ } else {
67+ root.switchToNextState("visible")
68 }
69 } else {
70 root.switchToNextState("")
71
72=== modified file 'qml/Shell.qml'
73--- qml/Shell.qml 2014-06-24 16:27:07 +0000
74+++ qml/Shell.qml 2014-07-09 13:38:22 +0000
75@@ -534,15 +534,16 @@
76 showHome()
77 }
78 onDash: {
79- if (stages.shown && !stages.overlayMode) {
80- if (!stages.locked) {
81- stages.hide();
82- launcher.hide();
83- }
84+ if (stages.shown && !stages.overlayMode && !stages.locked) {
85+ stages.hide();
86+ launcher.fadeOut();
87+ } else {
88+ launcher.switchToNextState("visible");
89 }
90+
91 if (greeter.shown) {
92 greeter.hideRight();
93- launcher.hide();
94+ launcher.fadeOut();
95 }
96 }
97 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)

Subscribers

People subscribed via source and target branches