diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 17:47:36 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 17:47:36 +0000 |
commit | 407ffd38709107fe97e9f82737cb67a2d33a4c78 (patch) | |
tree | 29e0ef3e3d7924f26c4cf583a4836c53b24cc8de /ash/launcher/launcher.cc | |
parent | 8834642d6c6595f29ca9571e201b9937145e6b94 (diff) | |
download | chromium_src-407ffd38709107fe97e9f82737cb67a2d33a4c78.zip chromium_src-407ffd38709107fe97e9f82737cb67a2d33a4c78.tar.gz chromium_src-407ffd38709107fe97e9f82737cb67a2d33a4c78.tar.bz2 |
ash: Make some height adjustments for the items in the shelf during dragging.
The change in this patch makes the LauncherViews as high as the launcher itself,
and the LauncherButton/AppListButton displays the highlight bar at the bottom,
and positions the icon vertically in the center.
Also, reduce the max-height of the dragged shelf.
BUG=147317
Review URL: https://chromiumcodereview.appspot.com/10928100
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher/launcher.cc')
-rw-r--r-- | ash/launcher/launcher.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc index 58db767..17addd0 100644 --- a/ash/launcher/launcher.cc +++ b/ash/launcher/launcher.cc @@ -98,16 +98,10 @@ void Launcher::DelegateView::Layout() { if (launcher_->alignment_ == SHELF_ALIGNMENT_BOTTOM) { int w = std::max(0, width() - launcher_->status_size_.width()); - int h = std::min(height(), launcher_view->GetPreferredSize().height()); - int move_up = height() > h ? sqrtf(height() - h) : 0; - launcher_view->SetBounds(0, std::max(0, height() - h) - move_up, w, h); + launcher_view->SetBounds(0, 0, w, height()); } else { int h = std::max(0, height() - launcher_->status_size_.height()); - int w = std::min(width(), launcher_view->GetPreferredSize().width()); - int x = width() > w ? sqrtf(width() - w) : 0; - if (launcher_->alignment_ == SHELF_ALIGNMENT_RIGHT) - x = width() - w - x; - launcher_view->SetBounds(x, 0, w, h); + launcher_view->SetBounds(0, 0, width(), h); } } |