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

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: commentary 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 | « ash/common/system/tray/tray_item_view.h ('k') | ash/common/system/user/tray_user_separator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..579ad361cce55aaf672fdeb59345fe8f49aea76c 100644
--- a/ash/common/system/tray/tray_item_view.cc
+++ b/ash/common/system/tray/tray_item_view.cc
@@ -82,10 +82,11 @@ int TrayItemView::GetAnimationDurationMS() {
}
gfx::Size TrayItemView::GetPreferredSize() const {
+ DCHECK_EQ(1, child_count());
gfx::Size size;
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)));
« no previous file with comments | « ash/common/system/tray/tray_item_view.h ('k') | ash/common/system/user/tray_user_separator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698