Merge lp:~azzar1/unity/scale-left-padding into lp:unity

Proposed by Andrea Azzarone
Status: Rejected
Rejected by: Andrea Azzarone
Proposed branch: lp:~azzar1/unity/scale-left-padding
Merge into: lp:unity
Diff against target: 67 lines (+36/-17)
1 file modified
plugins/unityshell/src/unityshell.cpp (+36/-17)
To merge this branch: bzr merge lp:~azzar1/unity/scale-left-padding
Reviewer Review Type Date Requested Status
Sam Spilsbury (community) Disapprove
Review via email: mp+88625@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Now that we are using overlay struts, this isn't necessary anymore.

review: Disapprove

Unmerged revisions

1834. By Andrea Azzarone

Uses the correct left padding during the scale.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-01-14 13:05:16 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-01-15 23:26:47 +0000
4@@ -2191,27 +2191,46 @@
5 break;
6 case UnityshellOptions::IconSize:
7 {
8- CompPlugin *p = CompPlugin::find ("expo");
9+ CompPlugin* expo = CompPlugin::find("expo");
10+ CompPlugin* scale = CompPlugin::find("scale");
11
12 launcher.SetIconSize(optionGetIconSize() + 6, optionGetIconSize());
13 dash_controller_->launcher_width = optionGetIconSize() + 18;
14
15- if (p)
16- {
17- CompOption::Vector &opts = p->vTable->getOptions ();
18-
19- for (CompOption &o : opts)
20- {
21- if (o.name () == std::string ("x_offset"))
22- {
23- CompOption::Value v;
24- v.set (static_cast <int> (optionGetIconSize() + 18));
25-
26- screen->setOptionForPlugin (p->vTable->name ().c_str (), o.name ().c_str (), v);
27- break;
28- }
29- }
30- }
31+ if (expo)
32+ {
33+ CompOption::Vector &opts = expo->vTable->getOptions();
34+
35+ for (CompOption &o : opts)
36+ {
37+ if (o.name () == std::string("x_offset"))
38+ {
39+ CompOption::Value v;
40+ v.set (static_cast<int>(optionGetIconSize() + 18));
41+
42+ screen->setOptionForPlugin (expo->vTable->name().c_str(), o.name().c_str(), v);
43+ break;
44+ }
45+ }
46+ }
47+
48+ if (scale)
49+ {
50+ CompOption::Vector &opts = scale->vTable->getOptions();
51+
52+ for (CompOption &o : opts)
53+ {
54+ if (o.name() == std::string("left_padding"))
55+ {
56+ CompOption::Value v;
57+ v.set (static_cast<int>(optionGetIconSize() + 18));
58+
59+ screen->setOptionForPlugin(scale->vTable->name().c_str(), o.name().c_str(), v);
60+ break;
61+ }
62+ }
63+ }
64+
65 break;
66 }
67 case UnityshellOptions::AutohideAnimation: