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

Unified Diff: ash/common/system/tray/tray_details_view.cc

Issue 2492833004: Reland of Correct spacing in scroll contents of Ash MD detailed view. (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_details_view.cc
diff --git a/ash/common/system/tray/tray_details_view.cc b/ash/common/system/tray/tray_details_view.cc
index 3ba5774ba636e8ff26d7d58482691f05688fda11..ca1318d1da755deb4b0be332004f9eda53e35ded 100644
--- a/ash/common/system/tray/tray_details_view.cc
+++ b/ash/common/system/tray/tray_details_view.cc
@@ -43,7 +43,9 @@
ScrollContentsView() {
SetEventTargeter(base::MakeUnique<views::ViewTargeter>(this));
SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
+ new views::BoxLayout(views::BoxLayout::kVertical, 0,
+ UseMd() ? kContentsVerticalSpacingMd : 0,
+ UseMd() ? 0 : kContentsBetweenChildSpacingNonMd));
}
~ScrollContentsView() override {}
@@ -106,6 +108,10 @@
const SkColor kSeparatorColor = SkColorSetA(SK_ColorBLACK, 0x1F);
const int kShadowOffsetY = 2;
const int kShadowBlur = 2;
+ const int kContentsVerticalSpacingMd = 4;
+ // TODO(fukino): Remove this constant once we stop maintaining pre-MD design.
+ // crbug.com/614453.
+ const int kContentsBetweenChildSpacingNonMd = 1;
// A structure that keeps the original offset of each header between the
// calls to Layout() to allow keeping track of which view should be sticky.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698