Chromium Code Reviews| Index: ash/shelf/shelf_layout_manager.cc |
| diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc |
| index cf3e9b3af311d655e13463e352ec482d084d9474..bc7a2a5368a0ce0f254a462143f06d09cf4fff52 100644 |
| --- a/ash/shelf/shelf_layout_manager.cc |
| +++ b/ash/shelf/shelf_layout_manager.cc |
| @@ -735,6 +735,17 @@ void ShelfLayoutManager::CalculateTargetBounds( |
| target_bounds->work_area_insets.right()); |
| } |
| + // Also push in the work area inset for the dock if it is visible. |
|
flackr
2013/05/31 14:23:45
It seems odd that the shelf layout manager is resp
varkha
2013/05/31 23:33:42
Done.
|
| + if (!dock_bounds_.IsEmpty()) { |
| + int left_inset = dock_bounds_.x() > 0 ? dock_bounds_.width() : 0; |
| + int right_inset = dock_bounds_.x() > 0 ? 0 : dock_bounds_.width(); |
| + target_bounds->work_area_insets.Set( |
|
flackr
2013/05/31 14:23:45
the +=(Insets) operator would probably look nicer.
varkha
2013/05/31 23:33:42
Done.
|
| + target_bounds->work_area_insets.top(), |
| + target_bounds->work_area_insets.left() + left_inset, |
| + target_bounds->work_area_insets.bottom(), |
| + target_bounds->work_area_insets.right() + right_inset); |
| + } |
| + |
| target_bounds->opacity = |
| (gesture_drag_status_ != GESTURE_DRAG_NONE || |
| state.visibility_state == SHELF_VISIBLE || |
| @@ -959,6 +970,15 @@ void ShelfLayoutManager::OnKeyboardBoundsChanging( |
| OnWindowResized(); |
| } |
| +void ShelfLayoutManager::OnDockBoundsChanging( |
| + const gfx::Rect& dock_bounds) { |
| + LOG(INFO) << "OnDockBoundsChanging - (" << |
| + dock_bounds.x() << "," << dock_bounds.y() << ") (" << |
| + dock_bounds.width() << "x" << dock_bounds.height() << ")"; |
| + dock_bounds_ = dock_bounds; |
| + OnWindowResized(); |
| +} |
| + |
| gfx::Insets ShelfLayoutManager::GetInsetsForAlignment(int distance) const { |
| switch (alignment_) { |
| case SHELF_ALIGNMENT_BOTTOM: |