Merge lp:~hikiko/unity/unity.launcher-icon-anim into lp:unity

Proposed by Eleni Maria Stea on 2016-07-11
Status: Needs review
Proposed branch: lp:~hikiko/unity/unity.launcher-icon-anim
Merge into: lp:unity
Diff against target: 43 lines (+16/-14)
1 file modified
launcher/Launcher.cpp (+16/-14)
To merge this branch: bzr merge lp:~hikiko/unity/unity.launcher-icon-anim
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Pending
Unity Team 2016-07-11 Pending
Review via email: mp+299664@code.launchpad.net

Commit message

reduced duration times in launcher icon quirks

Description of the change

reduced duration times in launcher icon quirks

To post a comment you must log in.

Unmerged revisions

4147. By Eleni Maria Stea on 2016-07-11

reduced animation durations and removed some launcher icons animations

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/Launcher.cpp'
2--- launcher/Launcher.cpp 2016-07-04 15:09:42 +0000
3+++ launcher/Launcher.cpp 2016-07-11 09:22:17 +0000
4@@ -1739,23 +1739,25 @@
5
6 void Launcher::SetupIconAnimations(AbstractLauncherIcon::Ptr const& icon)
7 {
8- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::VISIBLE, ANIM_DURATION_SHORT, monitor());
9- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::RUNNING, ANIM_DURATION_SHORT, monitor());
10- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::ACTIVE, ANIM_DURATION_SHORT, monitor());
11- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::STARTING, (ANIM_DURATION_LONG * MAX_STARTING_BLINKS * STARTING_BLINK_LAMBDA * 2), monitor());
12- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::PULSE_ONCE, (ANIM_DURATION_LONG * PULSE_BLINK_LAMBDA * 2), monitor());
13- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::PRESENTED, ANIM_DURATION, monitor());
14- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::UNFOLDED, ANIM_DURATION, monitor());
15- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::SHIMMER, ANIM_DURATION_LONG, monitor());
16- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::CENTER_SAVED, ANIM_DURATION, monitor());
17- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::PROGRESS, ANIM_DURATION, monitor());
18- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::DESAT, ANIM_DURATION_SHORT_SHORT, monitor());
19- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::GLOW, ANIM_DURATION_SHORT, monitor());
20+ bool lowgfx = unity::Settings::Instance().low_gfx;
21+
22+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::VISIBLE, lowgfx ? 0 : ANIM_DURATION_SHORT, monitor());
23+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::RUNNING, lowgfx ? 0 : ANIM_DURATION_SHORT, monitor());
24+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::ACTIVE, lowgfx ? 0 : ANIM_DURATION_SHORT, monitor());
25+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::STARTING, ((lowgfx ? 1 : ANIM_DURATION_LONG) * MAX_STARTING_BLINKS * STARTING_BLINK_LAMBDA * 2), monitor());
26+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::PULSE_ONCE, ((lowgfx ? 1 : ANIM_DURATION_LONG) * PULSE_BLINK_LAMBDA * 2), monitor());
27+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::PRESENTED, (lowgfx ? 0 : ANIM_DURATION), monitor());
28+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::UNFOLDED, (lowgfx ? 0 : ANIM_DURATION), monitor());
29+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::SHIMMER, (lowgfx ? 1 : ANIM_DURATION_LONG), monitor());
30+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::CENTER_SAVED, (lowgfx ? 0 : ANIM_DURATION), monitor());
31+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::PROGRESS, (lowgfx ? 0 : ANIM_DURATION), monitor());
32+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::DESAT, (lowgfx ? 0 : ANIM_DURATION_SHORT_SHORT), monitor());
33+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::GLOW, (lowgfx ? 0 : ANIM_DURATION_SHORT), monitor());
34
35 if (options()->urgent_animation() == URGENT_ANIMATION_WIGGLE)
36- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::URGENT, (ANIM_DURATION_SHORT * WIGGLE_CYCLES), monitor());
37+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::URGENT, ((lowgfx ? 1 : ANIM_DURATION_SHORT) * WIGGLE_CYCLES), monitor());
38 else
39- icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::URGENT, (ANIM_DURATION_LONG * URGENT_BLINKS * 2), monitor());
40+ icon->SetQuirkDuration(AbstractLauncherIcon::Quirk::URGENT, ((lowgfx ? 1 : ANIM_DURATION_LONG) * URGENT_BLINKS * 2), monitor());
41 }
42
43 void Launcher::SetModel(LauncherModel::Ptr model)