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

Unified Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 8566034: Align expanded panel to the bottom of screen edge when there is an auto-hiding taskbar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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 | « chrome/browser/ui/panels/panel_browser_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_manager.cc
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc
index b7669b3d4f05e7406ad9799f97d8a08ce83b648d..12473933771a0d2c313f8d593f26e56e72401f83 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -524,11 +524,6 @@ void PanelManager::AdjustWorkAreaForAutoHidingDesktopBars() {
// Note that we do not care about the desktop bar aligned to the top edge
// since panels could not reach so high due to size constraint.
adjusted_work_area_ = work_area_;
- if (auto_hiding_desktop_bar_->IsEnabled(AutoHidingDesktopBar::ALIGN_BOTTOM)) {
- int space = auto_hiding_desktop_bar_->GetThickness(
- AutoHidingDesktopBar::ALIGN_BOTTOM);
- adjusted_work_area_.set_height(adjusted_work_area_.height() - space);
- }
if (auto_hiding_desktop_bar_->IsEnabled(AutoHidingDesktopBar::ALIGN_LEFT)) {
int space = auto_hiding_desktop_bar_->GetThickness(
AutoHidingDesktopBar::ALIGN_LEFT);
@@ -546,10 +541,10 @@ int PanelManager::GetBottomPositionForExpansionState(
Panel::ExpansionState expansion_state) const {
int bottom = adjusted_work_area_.bottom();
// If there is an auto-hiding desktop bar aligned to the bottom edge, we need
- // to move the minimize panel down to the bottom edge.
- if (expansion_state == Panel::MINIMIZED &&
+ // to move the title-only panel above the auto-hiding desktop bar.
+ if (expansion_state == Panel::TITLE_ONLY &&
Dmitry Titov 2011/11/18 21:06:20 I have a feeling auto-hiding behavior is going to
auto_hiding_desktop_bar_->IsEnabled(AutoHidingDesktopBar::ALIGN_BOTTOM)) {
- bottom += auto_hiding_desktop_bar_->GetThickness(
+ bottom -= auto_hiding_desktop_bar_->GetThickness(
AutoHidingDesktopBar::ALIGN_BOTTOM);
}
@@ -603,7 +598,9 @@ void PanelManager::Rearrange(Panels::iterator iter_to_start,
Panel* panel = *iter;
gfx::Rect new_bounds(panel->GetBounds());
new_bounds.set_x(rightmost_position - new_bounds.width());
- new_bounds.set_y(adjusted_work_area_.bottom() - new_bounds.height());
+ new_bounds.set_y(
+ GetBottomPositionForExpansionState(panel->expansion_state()) -
+ new_bounds.height());
if (new_bounds != panel->GetBounds())
panel->SetPanelBounds(new_bounds);
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698