Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 13482010: Align panels over hidden launcher icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test PanelLayoutManagerTest.PanelAlignsToHiddenLauncherIcon Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index 8d3ff92a11865251e84f7dedcc4ba1b72346e23f..82f6c7db88e38491ff523c6f3ba1daca5c60cdef 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -441,10 +441,11 @@ void PanelLayoutManager::Relayout() {
gfx::Rect icon_bounds =
launcher_->GetScreenBoundsOfItemIconForWindow(panel);
- // An empty rect indicates that there is no icon for the panel in the
- // launcher. Just use the current bounds, as there's no icon to draw the
- // panel above.
- if (icon_bounds.IsEmpty())
+ // If both the icon width and height are 0 then there is no icon in the
+ // launcher. If the launcher is hidden, one of the height or width will be
+ // 0 but the position in the launcher and major dimension is still reported
+ // correctly and the panel can be aligned above where the hidden icon is.
+ if (icon_bounds.width() == 0 && icon_bounds.height() == 0)
continue;
if (panel->HasFocus() ||
« no previous file with comments | « no previous file | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698