Merge lp:~brandontschaefer/unity/overlay-window-button-hi-dpi-fix into lp:unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3698
Proposed branch: lp:~brandontschaefer/unity/overlay-window-button-hi-dpi-fix
Merge into: lp:unity
Prerequisite: lp:~brandontschaefer/unity/mm-launcher-width-hidpi-fix
Diff against target: 31 lines (+8/-3)
1 file modified
unity-shared/OverlayWindowButtons.cpp (+8/-3)
To merge this branch: bzr merge lp:~brandontschaefer/unity/overlay-window-button-hi-dpi-fix
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+208470@code.launchpad.net

Commit message

When we update the OverlayWindowButtons geometry, make sure we ask the WindowButtons to update their geo as well. (This means poking it as if the DPI has changed). This way the overlay window buttons will be the correct sides per monitor.

Description of the change

When we update the OverlayWindowButtons geometry, make sure we ask the WindowButtons to update their geo as well. (This means poking it as if the DPI has changed).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (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 :

Yeah!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/OverlayWindowButtons.cpp'
2--- unity-shared/OverlayWindowButtons.cpp 2014-03-03 16:48:07 +0000
3+++ unity-shared/OverlayWindowButtons.cpp 2014-03-03 16:48:08 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright (C) 2013 Canonical Ltd
7+ * Copyright (C) 2013-2014 Canonical Ltd
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 3 as
11@@ -56,13 +56,18 @@
12 void OverlayWindowButtons::UpdateGeometry()
13 {
14 int monitor = unity::UScreen::GetDefault()->GetMonitorWithMouse();
15+ int height = panel::Style::Instance().PanelHeight(monitor);
16 nux::Geometry const& geo = unity::UScreen::GetDefault()->GetMonitorGeometry(monitor);
17
18 SetX(geo.x + MAIN_LEFT_PADDING);
19- SetY(geo.y + MENUBAR_PADDING);
20- SetHeight(panel::Style::Instance().PanelHeight(monitor));
21+ SetY(geo.y);
22+ SetHeight(height);
23
24 window_buttons_->monitor = monitor;
25+
26+ window_buttons_->SetMinimumHeight(height);
27+ window_buttons_->SetMaximumHeight(height);
28+ window_buttons_->UpdateDPIChanged();
29 }
30
31 void OverlayWindowButtons::Show()