| Index: ui/message_center/views/message_center_button_bar.cc
|
| diff --git a/ui/message_center/views/message_center_button_bar.cc b/ui/message_center/views/message_center_button_bar.cc
|
| index 14f2283a0ba446d7d9f80a354903d614bd52d0d5..ffecc3d08e587c871a2f3b08719b1b1dbd15f9ad 100644
|
| --- a/ui/message_center/views/message_center_button_bar.cc
|
| +++ b/ui/message_center/views/message_center_button_bar.cc
|
| @@ -17,6 +17,7 @@
|
| #include "ui/message_center/views/message_center_view.h"
|
| #include "ui/resources/grit/ui_resources.h"
|
| #include "ui/strings/grit/ui_strings.h"
|
| +#include "ui/views/border.h"
|
| #include "ui/views/controls/button/button.h"
|
| #include "ui/views/controls/button/image_button.h"
|
| #include "ui/views/controls/button/label_button.h"
|
| @@ -31,12 +32,7 @@
|
| namespace message_center {
|
|
|
| namespace {
|
| -const int kButtonSize = 40;
|
| -const int kLeftPaddingWidthForNonArrows = 16;
|
| -const int kFooterTopMargin = 6;
|
| -const int kFooterBottomMargin = 3;
|
| -const int kFooterLeftMargin = 4;
|
| -const int kFooterRightMargin = 14;
|
| +constexpr int kButtonSize = 40;
|
| } // namespace
|
|
|
| // NotificationCenterButton ////////////////////////////////////////////////////
|
| @@ -194,12 +190,15 @@ void MessageCenterButtonBar::ViewVisibilityChanged() {
|
| ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
|
| IDR_NOTIFICATION_SETTINGS);
|
| int image_margin = std::max(0, (kButtonSize - settings_image->width()) / 2);
|
| + constexpr int kFooterTopMargin = 6;
|
| + constexpr int kFooterLeftMargin = 4;
|
| + constexpr int kFooterBottomMargin = 3;
|
| + constexpr int kFooterRightMargin = 14;
|
| + SetBorder(views::CreateEmptyBorder(
|
| + kFooterTopMargin, kFooterLeftMargin, kFooterBottomMargin,
|
| + std::max(0, kFooterRightMargin - image_margin)));
|
| views::GridLayout* layout = new views::GridLayout(this);
|
| SetLayoutManager(layout);
|
| - layout->SetInsets(kFooterTopMargin,
|
| - kFooterLeftMargin,
|
| - kFooterBottomMargin,
|
| - std::max(0, kFooterRightMargin - image_margin));
|
| views::ColumnSet* column = layout->AddColumnSet(0);
|
| if (title_arrow_->visible()) {
|
| // Column for the left-arrow used to back out of settings.
|
| @@ -210,6 +209,7 @@ void MessageCenterButtonBar::ViewVisibilityChanged() {
|
| kButtonSize,
|
| 0);
|
| } else {
|
| + constexpr int kLeftPaddingWidthForNonArrows = 16;
|
| column->AddPaddingColumn(0.0f, kLeftPaddingWidthForNonArrows);
|
| }
|
|
|
|
|