Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5049)

Unified Diff: ash/common/system/date/date_view.cc

Issue 2502693002: CrOS - Twiddle with the padding in the system tray. (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/system/tray/tray_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ef63e084735f0ce500d9c91b697c5b6a9ef9934..b4e15733e22aa1acaba67e8d7cdd734a9e3f7742 100644
--- a/ash/common/system/date/date_view.cc
+++ b/ash/common/system/date/date_view.cc
@@ -21,7 +21,6 @@
#include "third_party/icu/source/i18n/unicode/smpdtfmt.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/label.h"
@@ -51,8 +50,7 @@ const int kVerticalClockMinutesTopOffset = -4;
const int kVerticalClockMinutesTopOffsetMD = -2;
// Leading padding used to draw the tray background to the left of the clock
-// when the shelf is horizontally aligned, and on the top when the shelf is
-// vertically aligned.
+// when the shelf is vertically aligned.
const int kClockLeadingPadding = 8;
bool UseMd() {
@@ -376,13 +374,10 @@ void TimeView::UpdateClockLayout(ClockLayout clock_layout) {
}
void TimeView::SetBorderFromLayout(ClockLayout clock_layout) {
- if (MaterialDesignController::IsShelfMaterial())
- return;
-
if (clock_layout == ClockLayout::HORIZONTAL_CLOCK) {
- SetBorder(views::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment, 0,
- kTrayLabelItemHorizontalPaddingBottomAlignment));
+ SetBorder(views::CreateEmptyBorder(gfx::Insets(
+ 0, UseMd() ? GetTrayConstant(TRAY_IMAGE_ITEM_PADDING)
+ : kTrayLabelItemHorizontalPaddingBottomAlignment)));
} else {
SetBorder(views::NullBorder());
}
« no previous file with comments | « no previous file | ash/common/system/tray/tray_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698