diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-19 23:10:06 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-19 23:10:06 +0000 |
commit | 51e8c6d354fb55886f540a5dffafb919bae0821f (patch) | |
tree | d3db5aac6850506ba459bfb5781f747950c268dc /ash/wm | |
parent | debe027a54bb1f6ec763a37104e352a59d1da9fe (diff) | |
download | chromium_src-51e8c6d354fb55886f540a5dffafb919bae0821f.zip chromium_src-51e8c6d354fb55886f540a5dffafb919bae0821f.tar.gz chromium_src-51e8c6d354fb55886f540a5dffafb919bae0821f.tar.bz2 |
ash: Fix the status widget positioning when dragging the launcher.
BUG=170911
Review URL: https://codereview.chromium.org/12218173
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/shelf_layout_manager.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc index ec62865..edbd359 100644 --- a/ash/wm/shelf_layout_manager.cc +++ b/ash/wm/shelf_layout_manager.cc @@ -769,22 +769,14 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture( if (horizontal) { // Move the launcher with the gesture. target_bounds->launcher_bounds_in_root.Offset(0, translate); + target_bounds->status_bounds_in_root.Offset(0, translate); - if (translate > 0) { - // When dragging down, the statusbar should move. - target_bounds->status_bounds_in_root.Offset(0, translate); - } else { + if (translate < 0) { // When dragging up, the launcher height should increase. float move = std::max(translate, -static_cast<float>(resistance_free_region)); target_bounds->launcher_bounds_in_root.set_height( target_bounds->launcher_bounds_in_root.height() + move - translate); - - // The statusbar should be in the center. - gfx::Rect status_y = target_bounds->launcher_bounds_in_root; - status_y.ClampToCenteredSize( - target_bounds->status_bounds_in_root.size()); - target_bounds->status_bounds_in_root.set_y(status_y.y()); } } else { // Move the launcher with the gesture. |