summaryrefslogtreecommitdiffstats
path: root/ash/launcher
diff options
context:
space:
mode:
authorharrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 18:28:22 +0000
committerharrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 18:28:22 +0000
commitd6c6748f84b8311e085e19cc57ebbe0646cd122f (patch)
treef7e5e55dcb926b43ea8ee8b49f7e4ef9d2c0dcd4 /ash/launcher
parent624d6542dd29b65df0e0b160d850a2db72f74ae3 (diff)
downloadchromium_src-d6c6748f84b8311e085e19cc57ebbe0646cd122f.zip
chromium_src-d6c6748f84b8311e085e19cc57ebbe0646cd122f.tar.gz
chromium_src-d6c6748f84b8311e085e19cc57ebbe0646cd122f.tar.bz2
Increase inset for app icons on side launcher.
BUG=297038 R=jamescook@chromium.org Review URL: https://codereview.chromium.org/24323007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher')
-rw-r--r--ash/launcher/launcher_button.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc
index 38b166f2..0678d15 100644
--- a/ash/launcher/launcher_button.cc
+++ b/ash/launcher/launcher_button.cc
@@ -34,6 +34,7 @@ const int kIconSize = 32;
const int kHopSpacing = 2;
const int kIconPad = 8;
const int kAlternateIconPad = 5;
+const int kAlternateIconPadVertical = 6;
const int kHopUpMS = 0;
const int kHopDownMS = 200;
const int kAttentionThrobDurationMS = 800;
@@ -400,8 +401,12 @@ void LauncherButton::GetAccessibleState(ui::AccessibleViewState* state) {
void LauncherButton::Layout() {
const gfx::Rect button_bounds(GetContentsBounds());
- int icon_pad = ash::switches::UseAlternateShelfLayout() ?
- kAlternateIconPad : kIconPad;
+ int icon_pad = kIconPad;
+ if (ash::switches::UseAlternateShelfLayout()) {
+ icon_pad =
+ shelf_layout_manager_->GetAlignment() != SHELF_ALIGNMENT_BOTTOM ?
+ kAlternateIconPadVertical : kAlternateIconPad;
+ }
int x_offset = shelf_layout_manager_->PrimaryAxisValue(0, icon_pad);
int y_offset = shelf_layout_manager_->PrimaryAxisValue(icon_pad, 0);