summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authormukai <mukai@chromium.org>2015-08-19 14:27:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-19 21:28:10 +0000
commit8b0082a9afa470799c454932fc5f9881fe5c29e0 (patch)
treecee2d1149699daebd00ba53c7aa11fba70494702 /ui
parentcc872d7245629d05512c1f239a177ab8dfa23456 (diff)
downloadchromium_src-8b0082a9afa470799c454932fc5f9881fe5c29e0.zip
chromium_src-8b0082a9afa470799c454932fc5f9881fe5c29e0.tar.gz
chromium_src-8b0082a9afa470799c454932fc5f9881fe5c29e0.tar.bz2
Modify the button bar style to have wider hit-area for arrow button.
As is reported in the bug, the arrow button width is too narrow. This CL specifies its size to a square of kButtonSize, and modifies some constants to keep the same visual alignment. BUG=517974 R=yoshiki@chromium.org, dewittj@chromium.org TEST=checked manually, verified graphical position doesn't change with screenshot comparison Review URL: https://codereview.chromium.org/1287163007 Cr-Commit-Position: refs/heads/master@{#344320}
Diffstat (limited to 'ui')
-rw-r--r--ui/message_center/views/message_center_button_bar.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/message_center/views/message_center_button_bar.cc b/ui/message_center/views/message_center_button_bar.cc
index fbfe2be..ee0b36f 100644
--- a/ui/message_center/views/message_center_button_bar.cc
+++ b/ui/message_center/views/message_center_button_bar.cc
@@ -30,10 +30,10 @@ namespace message_center {
namespace {
const int kButtonSize = 40;
-const int kChevronWidth = 8;
+const int kLeftPaddingWidthForNonArrows = 16;
const int kFooterTopMargin = 6;
const int kFooterBottomMargin = 3;
-const int kFooterLeftMargin = 20;
+const int kFooterLeftMargin = 4;
const int kFooterRightMargin = 14;
} // namespace
@@ -114,7 +114,7 @@ MessageCenterButtonBar::MessageCenterButtonBar(
IDR_NOTIFICATION_ARROW_HOVER,
IDR_NOTIFICATION_ARROW_PRESSED,
0);
- title_arrow_->set_size(gfx::Size(kChevronWidth, kButtonSize));
+ title_arrow_->set_size(gfx::Size(kButtonSize, kButtonSize));
// Keyboardists can use the gear button to switch modes.
title_arrow_->SetFocusable(false);
@@ -205,11 +205,11 @@ void MessageCenterButtonBar::ViewVisibilityChanged() {
column->AddColumn(views::GridLayout::LEADING,
views::GridLayout::CENTER,
0.0f,
- views::GridLayout::USE_PREF,
- 0,
+ views::GridLayout::FIXED,
+ kButtonSize,
0);
-
- column->AddPaddingColumn(0.0f, 10);
+ } else {
+ column->AddPaddingColumn(0.0f, kLeftPaddingWidthForNonArrows);
}
// Column for the label "Notifications".