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

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

Issue 2465403002: Some more fixes to cros system tray icons (esp. screen tray items) (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
Index: ash/common/system/tray/tray_item_view.cc
diff --git a/ash/common/system/tray/tray_item_view.cc b/ash/common/system/tray/tray_item_view.cc
index 3cc2830a9aad21f8e727bb61c36d28351ae938dd..38c4d749349e85e32f69cc59335627f719d23a26 100644
--- a/ash/common/system/tray/tray_item_view.cc
+++ b/ash/common/system/tray/tray_item_view.cc
@@ -83,9 +83,10 @@ int TrayItemView::GetAnimationDurationMS() {
gfx::Size TrayItemView::GetPreferredSize() const {
gfx::Size size;
+ DCHECK_EQ(1, child_count());
tdanderson 2016/11/01 20:25:08 Can you please add documentation somewhere in tray
Evan Stade 2016/11/01 23:45:17 Done.
if (MaterialDesignController::UseMaterialDesignSystemIcons()) {
gfx::Size inner_size = views::View::GetPreferredSize();
- if (image_view_ && child_count() == 1)
+ if (image_view_)
inner_size = gfx::Size(kTrayIconSize, kTrayIconSize);
gfx::Rect rect(inner_size);
rect.Inset(gfx::Insets(-GetTrayConstant(TRAY_IMAGE_ITEM_PADDING)));

Powered by Google App Engine
This is Rietveld 408576698