Merge lp:~unity-team/unity/phablet.improve_switchApplicationAnimation into lp:unity/phablet

Proposed by Andrea Cimitan
Status: Merged
Approved by: Albert Astals Cid
Approved revision: no longer in the source branch.
Merged at revision: 641
Proposed branch: lp:~unity-team/unity/phablet.improve_switchApplicationAnimation
Merge into: lp:unity/phablet
Diff against target: 90 lines (+6/-18)
2 files modified
Components/Stage.qml (+2/-2)
tests/qmltests/Components/tst_Stage.qml (+4/-16)
To merge this branch: bzr merge lp:~unity-team/unity/phablet.improve_switchApplicationAnimation
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Needs Fixing
Michał Sawicz Needs Fixing
Jouni Helminen Pending
Gerry Boland Pending
Review via email: mp+150856@code.launchpad.net

Commit message

A little tweak to improve the switch application animation

Description of the change

A little tweak to improve the switch application animation. The change to duration 500 makes it 1:1 with the finger movement, the tweak of the hintAnimation size keeps it consistent with the dash hint and closer to the finger.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Is there a bug/design request about this?

review: Needs Information
Revision history for this message
Andrea Cimitan (cimi) wrote :

> Is there a bug/design request about this?

Nope, but design was approved by Jouni and was seen by Gerry as well..

Revision history for this message
Albert Astals Cid (aacid) wrote :

Gerry/Jouni can you review according Cimi's comment?

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

Bump?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

I reasked Jouni yesterday, and he remembers the branch and what it does (swipe from right keeps the new application under your finger, instead being detached as now)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Ok, approve then

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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 :

Failing tests:
    qmltestrunner.Stage::test_background
    qmltestrunner.Stage::test_dragFromRightEdgeToSwitchApplication
    qmltestrunner.Stage::test_pressingRightEdgeShowsHint

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

This is breaking the testStage qmluitest, can you have a look?

review: Needs Fixing
Revision history for this message
Andrea Cimitan (cimi) wrote :

I'm on it.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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 'Components/Stage.qml'
2--- Components/Stage.qml 2013-04-02 16:01:09 +0000
3+++ Components/Stage.qml 2013-04-29 20:47:28 +0000
4@@ -364,7 +364,7 @@
5 NumberAnimation {
6 target: newApplicationScreenshot
7 property: "x"
8- duration: 400
9+ duration: 500
10 easing.type: Easing.OutQuad
11 to: 0
12 }
13@@ -403,7 +403,7 @@
14 }
15
16 property real __startValue: stage.width
17- property real __hintValue: units.gu(4)
18+ property real __hintValue: units.gu(1.5) // Should be 3, but 1.5 balances the not-Linear easing of switchToApplicationAnimation
19
20 Binding {
21 target: switchToApplicationAnimationController
22
23=== modified file 'tests/qmltests/Components/tst_Stage.qml'
24--- tests/qmltests/Components/tst_Stage.qml 2013-04-17 13:01:10 +0000
25+++ tests/qmltests/Components/tst_Stage.qml 2013-04-29 20:47:28 +0000
26@@ -199,14 +199,9 @@
27 switch to the next running application. This means (graphically) sliding the
28 next application window from Stage's right edge for a small part of its width */
29 function test_pressingRightEdgeShowsHint() {
30-
31- // it shoulnd't be showing anything at first
32- compare(stage.usingScreenshots, false)
33-
34 redControl.checked = true
35
36 tryCompare(stage, "usingScreenshots", true) // wait for the animation to start
37- wait(600)
38 tryCompare(stage, "usingScreenshots", false) // and then for it to end
39 compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red")
40 compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red")
41@@ -214,7 +209,6 @@
42 greenControl.checked = true
43
44 tryCompare(stage, "usingScreenshots", true) // wait for the animation to start
45- wait(600)
46 tryCompare(stage, "usingScreenshots", false) // and then for it to end
47 compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green")
48 compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green")
49@@ -239,18 +233,18 @@
50
51 function isShowingABitOfNewApp() {
52 // it should come from the right and take less than half of the screen
53- // but at least 15% of it
54+ // but at least 5% of it
55 return newAppScreenshot.x > stage.width/2
56- && newAppScreenshot.x < stage.width*(85/100)
57+ && newAppScreenshot.x < stage.width*(95/100)
58 && newAppScreenshot.y === 0
59 && newAppScreenshot.visible
60 }
61
62 function isCurrentAppFadingOut() {
63 // it should get a bit translucent and smaller
64- return oldAppScreenshot.opacity < 0.98
65+ return oldAppScreenshot.opacity < 0.99
66 && oldAppScreenshot.opacity >= 0.1
67- && oldAppScreenshot.scale < 0.98
68+ && oldAppScreenshot.scale < 0.99
69 && oldAppScreenshot.scale >= 0.1
70 && oldAppScreenshot.visible
71 }
72@@ -268,9 +262,6 @@
73 /* If you flick from the right edge of the stage leftwards it should cause an
74 application switch. */
75 function test_dragFromRightEdgeToSwitchApplication() {
76- // it shoulnd't be showing anything at first
77- compare(stage.usingScreenshots, false)
78-
79 redControl.checked = true
80
81 tryCompare(stage, "usingScreenshots", true) // wait for the animation to start
82@@ -303,9 +294,6 @@
83 When switching between applications, backgrounds are unnecessary, 'cause the
84 applications are in front of them. */
85 function test_background() {
86- // it shoulnd't be showing anything at first
87- compare(stage.usingScreenshots, false)
88-
89 redControl.checked = true
90 tryCompare(stage, "usingScreenshots", true) // wait for the animation to start
91

Subscribers

People subscribed via source and target branches

to all changes: