Merge lp:~azzar1/unity/dash-window-buttons-align into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Andrea Cimitan
Approved revision: no longer in the source branch.
Merged at revision: 2167
Proposed branch: lp:~azzar1/unity/dash-window-buttons-align
Merge into: lp:unity
Diff against target: 24 lines (+6/-3)
1 file modified
plugins/unityshell/src/PanelMenuView.cpp (+6/-3)
To merge this branch: bzr merge lp:~azzar1/unity/dash-window-buttons-align
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Andrea Cimitan (community) Approve
Review via email: mp+99011@code.launchpad.net

Commit message

Fix the alignment of the dash window buttons.

Description of the change

== Problem ==
The alignment of the dash window buttons is wrong.

== Fix ==
Update the padding values.

== Test ==
Not applicable

== Screenshot ==
http://ubuntuone.com/0uvd039cgo6cdd7cmZUPKv

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) wrote :

Well done!
Approving design and code

review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

[italian]
Maledetto, mi sovrascrivi il codice!! :)
[/italian]

Code looks fine (for now).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/PanelMenuView.cpp'
2--- plugins/unityshell/src/PanelMenuView.cpp 2012-03-21 12:31:11 +0000
3+++ plugins/unityshell/src/PanelMenuView.cpp 2012-03-23 12:50:29 +0000
4@@ -306,14 +306,17 @@
5
6 nux::Geometry geo = GetGeometry();
7
8+ int h_padding = _padding - 2;
9+ int v_padding = 1;
10+
11 old_window_buttons_w = _window_buttons->GetContentWidth();
12- _window_buttons->SetGeometry(geo.x + _padding, geo.y, old_window_buttons_w, geo.height);
13+ _window_buttons->SetGeometry(geo.x + h_padding, geo.y + v_padding, old_window_buttons_w, geo.height);
14 _window_buttons->ComputeContentSize();
15 new_window_buttons_w = _window_buttons->GetContentWidth();
16
17 /* Explicitly set the size and position of the widgets */
18- geo.x += _padding + new_window_buttons_w + _padding;
19- geo.width -= _padding + new_window_buttons_w + _padding;
20+ geo.x += h_padding + new_window_buttons_w + h_padding;
21+ geo.width -= h_padding + new_window_buttons_w + h_padding;
22
23 old_menu_area_w = _menu_layout->GetContentWidth();
24 _menu_layout->SetGeometry(geo.x, geo.y, old_menu_area_w, geo.height);