| Index: ash/common/system/date/date_view.cc
|
| diff --git a/ash/common/system/date/date_view.cc b/ash/common/system/date/date_view.cc
|
| index ad21c9146a45d487293692233650239102e62449..40d54eb1076fc4254eaf4dff18ce7d80f41e43b4 100644
|
| --- a/ash/common/system/date/date_view.cc
|
| +++ b/ash/common/system/date/date_view.cc
|
| @@ -19,9 +19,11 @@
|
| #include "third_party/icu/source/i18n/unicode/smpdtfmt.h"
|
| #include "ui/accessibility/ax_view_state.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| +#include "ui/views/background.h"
|
| #include "ui/views/border.h"
|
| #include "ui/views/controls/label.h"
|
| #include "ui/views/layout/box_layout.h"
|
| +#include "ui/views/layout/fill_layout.h"
|
| #include "ui/views/layout/grid_layout.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| @@ -290,8 +292,7 @@ void TimeView::UpdateClockLayout(TrayDate::ClockLayout clock_layout) {
|
| if (clock_layout == TrayDate::HORIZONTAL_CLOCK) {
|
| RemoveChildView(vertical_label_hours_.get());
|
| RemoveChildView(vertical_label_minutes_.get());
|
| - SetLayoutManager(
|
| - new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
|
| + SetLayoutManager(new views::FillLayout());
|
| AddChildView(horizontal_label_.get());
|
| } else {
|
| const bool is_material_design = MaterialDesignController::IsShelfMaterial();
|
| @@ -320,16 +321,13 @@ void TimeView::UpdateClockLayout(TrayDate::ClockLayout clock_layout) {
|
| }
|
|
|
| void TimeView::SetBorderFromLayout(TrayDate::ClockLayout clock_layout) {
|
| + if (MaterialDesignController::IsShelfMaterial())
|
| + return;
|
| +
|
| if (clock_layout == TrayDate::HORIZONTAL_CLOCK) {
|
| - bool is_material_design = MaterialDesignController::IsShelfMaterial();
|
| - const int time_view_left_padding =
|
| - is_material_design ? kClockLeadingPadding
|
| - : kTrayLabelItemHorizontalPaddingBottomAlignment;
|
| - const int time_view_right_padding =
|
| - is_material_design ? GetTrayConstant(TRAY_IMAGE_ITEM_PADDING)
|
| - : kTrayLabelItemHorizontalPaddingBottomAlignment;
|
| - SetBorder(views::Border::CreateEmptyBorder(0, time_view_left_padding, 0,
|
| - time_view_right_padding));
|
| + SetBorder(views::Border::CreateEmptyBorder(
|
| + 0, kTrayLabelItemHorizontalPaddingBottomAlignment, 0,
|
| + kTrayLabelItemHorizontalPaddingBottomAlignment));
|
| } else {
|
| SetBorder(views::Border::NullBorder());
|
| }
|
|
|