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

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

Issue 2485963003: Minor adjustment to edge padding of 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray.cc
diff --git a/ash/common/system/tray/system_tray.cc b/ash/common/system/tray/system_tray.cc
index 731855c295c69d2d3a162aa40785ebb3186237a8..b30b65a83ba52b7fe0001085cd592fd10d6e31a3 100644
--- a/ash/common/system/tray/system_tray.cc
+++ b/ash/common/system/tray/system_tray.cc
@@ -96,8 +96,11 @@ class PaddingTrayItem : public SystemTrayItem {
private:
gfx::Size GetPreferredSize() const override {
- return gfx::Size(GetTrayConstant(TRAY_IMAGE_ITEM_PADDING),
- GetTrayConstant(TRAY_IMAGE_ITEM_PADDING));
+ // The other tray items already have some padding baked in so we have to
+ // subtract that off.
+ const int side =
+ kTrayEdgePadding - GetTrayConstant(TRAY_IMAGE_ITEM_PADDING);
+ return gfx::Size(side, side);
}
DISALLOW_COPY_AND_ASSIGN(PaddingView);
« no previous file with comments | « no previous file | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698