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
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-01-14 13:05:16 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-01-15 23:26:47 +0000
@@ -2191,27 +2191,46 @@
2191 break;2191 break;
2192 case UnityshellOptions::IconSize:2192 case UnityshellOptions::IconSize:
2193 {2193 {
2194 CompPlugin *p = CompPlugin::find ("expo");2194 CompPlugin* expo = CompPlugin::find("expo");
2195 CompPlugin* scale = CompPlugin::find("scale");
21952196
2196 launcher.SetIconSize(optionGetIconSize() + 6, optionGetIconSize());2197 launcher.SetIconSize(optionGetIconSize() + 6, optionGetIconSize());
2197 dash_controller_->launcher_width = optionGetIconSize() + 18;2198 dash_controller_->launcher_width = optionGetIconSize() + 18;
21982199
2199 if (p)2200 if (expo)
2200 {2201 {
2201 CompOption::Vector &opts = p->vTable->getOptions ();2202 CompOption::Vector &opts = expo->vTable->getOptions();
22022203
2203 for (CompOption &o : opts)2204 for (CompOption &o : opts)
2204 {2205 {
2205 if (o.name () == std::string ("x_offset"))2206 if (o.name () == std::string("x_offset"))
2206 {2207 {
2207 CompOption::Value v;2208 CompOption::Value v;
2208 v.set (static_cast <int> (optionGetIconSize() + 18));2209 v.set (static_cast<int>(optionGetIconSize() + 18));
22092210
2210 screen->setOptionForPlugin (p->vTable->name ().c_str (), o.name ().c_str (), v);2211 screen->setOptionForPlugin (expo->vTable->name().c_str(), o.name().c_str(), v);
2211 break;2212 break;
2212 }2213 }
2213 }2214 }
2214 }2215 }
2216
2217 if (scale)
2218 {
2219 CompOption::Vector &opts = scale->vTable->getOptions();
2220
2221 for (CompOption &o : opts)
2222 {
2223 if (o.name() == std::string("left_padding"))
2224 {
2225 CompOption::Value v;
2226 v.set (static_cast<int>(optionGetIconSize() + 18));
2227
2228 screen->setOptionForPlugin(scale->vTable->name().c_str(), o.name().c_str(), v);
2229 break;
2230 }
2231 }
2232 }
2233
2215 break;2234 break;
2216 }2235 }
2217 case UnityshellOptions::AutohideAnimation:2236 case UnityshellOptions::AutohideAnimation: