Merge lp:~hikiko/unity/unity.scale-launcher-at-the-bottom into lp:unity

Proposed by Eleni Maria Stea
Status: Merged
Merge reported by: Marco Trevisan (Treviño)
Merged at revision: not available
Proposed branch: lp:~hikiko/unity/unity.scale-launcher-at-the-bottom
Merge into: lp:unity
Diff against target: 69 lines (+30/-6)
1 file modified
plugins/unityshell/src/unityshell.cpp (+30/-6)
To merge this branch: bzr merge lp:~hikiko/unity/unity.scale-launcher-at-the-bottom
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+293124@code.launchpad.net

Commit message

sets the YBottomOffset parameter to the scale and expo plugins when the launcher is at the bottom.

Description of the change

uses the scale YBottomOffset parameter to modify the work area when the launcher is placed at the bottom.

Note:
It should be tested with the: lp:~hikiko/compiz/compiz.scale-bottomYoffset compiz branch

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
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This is already in, thanks.

review: Disapprove

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 2016-03-31 05:57:11 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2016-05-10 07:20:36 +0000
4@@ -3622,8 +3622,11 @@
5 hud_controller_->launcher_locked_out = (launcher_options->hide_mode == LAUNCHER_HIDE_NEVER);
6
7 int scale_offset = (launcher_options->hide_mode == LAUNCHER_HIDE_NEVER) ? 0 : launcher_controller_->launcher().GetWidth();
8+ int scale_y_bottom_offset = (launcher_options->hide_mode == LAUNCHER_HIDE_NEVER) ? launcher_controller_->launcher().GetWidth() : 0;
9 CompOption::Value v(scale_offset);
10 screen->setOptionForPlugin("scale", "x_offset", v);
11+ CompOption::Value bv(scale_y_bottom_offset);
12+ screen->setOptionForPlugin("scale", "y_bottom_offset", bv);
13 break;
14 }
15 case UnityshellOptions::BacklightMode:
16@@ -3834,11 +3837,18 @@
17 }
18
19 auto max_bounds = NuxGeometryFromCompRect(output.workArea());
20- if (launcher_controller_->options()->hide_mode != LAUNCHER_HIDE_NEVER && Settings::Instance().launcher_position() == LauncherPosition::LEFT)
21- {
22- int monitor_width = unity_settings_.LauncherSize(monitor);
23- max_bounds.x += monitor_width;
24- max_bounds.width -= monitor_width;
25+ if (launcher_controller_->options()->hide_mode != LAUNCHER_HIDE_NEVER) {
26+ if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
27+ {
28+ int monitor_width = unity_settings_.LauncherSize(monitor);
29+ max_bounds.x += monitor_width;
30+ max_bounds.width -= monitor_width;
31+ }
32+ else if (Settings::Instance().launcher_position() == LauncherPosition::BOTTOM)
33+ {
34+ int launcher_size = unity_settings_.LauncherSize(monitor);
35+ max_bounds.height -= launcher_size;
36+ }
37 }
38
39 nux::Geometry final_bounds;
40@@ -4098,15 +4108,29 @@
41 adjustment_x = launcher_size;
42 shortcut_controller_->SetAdjustment(adjustment_x, panel_style_.PanelHeight(launcher->monitor));
43
44+ CompOption::Value v(launcher_size);
45 if (launcher_position == LauncherPosition::LEFT)
46 {
47- CompOption::Value v(launcher_size);
48 screen->setOptionForPlugin("expo", "x_offset", v);
49
50 if (launcher_controller_->options()->hide_mode == LAUNCHER_HIDE_NEVER)
51 v.set(0);
52
53 screen->setOptionForPlugin("scale", "x_offset", v);
54+ return;
55+ }
56+
57+ if (launcher_position == LauncherPosition::BOTTOM)
58+ {
59+ CompOption::Value x_offset(0);
60+ CompOption::Value y_offset(0);
61+ screen->setOptionForPlugin("expo", "x_offset", x_offset);
62+ screen->setOptionForPlugin("scale", "x_offset", x_offset);
63+ screen->setOptionForPlugin("scale", "y_offset", y_offset);
64+ if (launcher_controller_->options()->hide_mode == LAUNCHER_HIDE_NEVER)
65+ v.set(0);
66+ screen->setOptionForPlugin("scale", "y_bottom_offset", v);
67+ screen->setOptionForPlugin("expo", "y_bottom_offset", v);
68 }
69 };
70