Chromium Code Reviews| Index: ui/aura_shell/shelf_layout_manager.cc |
| diff --git a/ui/aura_shell/shelf_layout_manager.cc b/ui/aura_shell/shelf_layout_manager.cc |
| index cdca6d822d59373aa8cec1452e20a9fa609cbfba..7820d353c56e56c3653ae2c66d88035e383a0e06 100644 |
| --- a/ui/aura_shell/shelf_layout_manager.cc |
| +++ b/ui/aura_shell/shelf_layout_manager.cc |
| @@ -75,6 +75,10 @@ void ShelfLayoutManager::SetVisible(bool visible) { |
| // |visible_| is updated once the animation completes. |
| } |
| +gfx::Rect ShelfLayoutManager::GetLauncherBounds() const { |
| + return launcher_->GetWindowScreenBounds(); |
| +} |
| + |
| //////////////////////////////////////////////////////////////////////////////// |
| // ShelfLayoutManager, aura::LayoutManager implementation: |
| @@ -115,15 +119,17 @@ void ShelfLayoutManager::CalculateTargetBounds(bool visible, |
| const gfx::Rect& available_bounds(aura::RootWindow::GetInstance()->bounds()); |
| int y = available_bounds.bottom() - (visible ? max_height_ : 0); |
| gfx::Rect status_bounds(status_->GetWindowScreenBounds()); |
| + gfx::Rect launcher_bounds(launcher_->GetWindowScreenBounds()); |
|
sky
2011/12/14 06:23:05
What was wrong with the old code here? This change
DaveMoore
2011/12/14 17:03:19
It was left over from when I had a background in t
|
| + int shelf_h = launcher_bounds.height(); |
| + int shelf_y = y + (max_height_ - shelf_h) / 2; |
| target_bounds->status_bounds = gfx::Rect( |
| available_bounds.right() - status_bounds.width(), |
| - y + (max_height_ - status_bounds.height()) / 2, |
| - status_bounds.width(), status_bounds.height()); |
| - gfx::Rect launcher_bounds(launcher_->GetWindowScreenBounds()); |
| + shelf_y, |
| + status_bounds.width(), shelf_h); |
| target_bounds->launcher_bounds = gfx::Rect( |
| - available_bounds.x(), y + (max_height_ - launcher_bounds.height()) / 2, |
| - available_bounds.width() - status_bounds.width(), |
| - launcher_bounds.height()); |
| + available_bounds.x(), shelf_y, |
| + available_bounds.width(), |
| + shelf_h); |
| if (visible) |
| target_bounds->work_area_insets = gfx::Insets(0, 0, max_height_, 0); |
| } |