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

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

Issue 2390003002: [Chrome OS MD] Update spacing between material design icons in the system tray (Closed)
Patch Set: address nits Created 4 years, 2 months 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 | « ash/common/system/tray/tray_constants.cc ('k') | ash/common/system/user/tray_user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_utils.cc
diff --git a/ash/common/system/tray/tray_utils.cc b/ash/common/system/tray/tray_utils.cc
index 2a19fab0ee98c1e499c7ebbdb07f2e57b49de34f..d7c9dd21669267c0b4ceb8774f2994b59b070847 100644
--- a/ash/common/system/tray/tray_utils.cc
+++ b/ash/common/system/tray/tray_utils.cc
@@ -35,16 +35,19 @@ void SetupLabelForTray(views::Label* label) {
}
}
+// TODO(yiyix): Instead of using a fixed padding beside each tray item, take
+// internal icon padding into account when adjusting tray icon spacing. See
+// crbug.com/653292.
void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment) {
+ const int tray_image_item_padding = GetTrayConstant(TRAY_IMAGE_ITEM_PADDING);
if (IsHorizontalAlignment(alignment)) {
tray_view->SetBorder(views::Border::CreateEmptyBorder(
- 0, kTrayImageItemHorizontalPaddingBottomAlignment, 0,
- kTrayImageItemHorizontalPaddingBottomAlignment));
+ 0, tray_image_item_padding, 0, tray_image_item_padding));
} else {
tray_view->SetBorder(views::Border::CreateEmptyBorder(
- kTrayImageItemVerticalPaddingVerticalAlignment,
+ tray_image_item_padding,
kTrayImageItemHorizontalPaddingVerticalAlignment,
- kTrayImageItemVerticalPaddingVerticalAlignment,
+ tray_image_item_padding,
kTrayImageItemHorizontalPaddingVerticalAlignment));
}
}
« no previous file with comments | « ash/common/system/tray/tray_constants.cc ('k') | ash/common/system/user/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698