From 8b0082a9afa470799c454932fc5f9881fe5c29e0 Mon Sep 17 00:00:00 2001 From: mukai Date: Wed, 19 Aug 2015 14:27:24 -0700 Subject: [PATCH] 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} --- ui/message_center/views/message_center_button_bar.cc | 14 +++++++------- 1 file 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 fbfe2be6399c..ee0b36f2a2ad 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". -- 2.11.4.GIT