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

Unified Diff: ash/system/chromeos/label_tray_view.cc

Issue 17550003: Set multi-line attribute on the label before call SizeToFit to avoid DCHECK-ing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Of course don't call stuff on the text label before it is created. :) Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/label_tray_view.cc
diff --git a/ash/system/chromeos/label_tray_view.cc b/ash/system/chromeos/label_tray_view.cc
index 8398421d60e63467dc09e995b168dc289b3b6088..5af294efe09271236af9882e08562d3281cfbeb9 100644
--- a/ash/system/chromeos/label_tray_view.cc
+++ b/ash/system/chromeos/label_tray_view.cc
@@ -50,13 +50,14 @@ views::View* LabelTrayView::CreateChildView(
child->set_border(
views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal,
0, kTrayPopupPaddingHorizontal));
+ child->text_label()->SetMultiLine(true);
child->text_label()->SizeToFit(kTrayNotificationContentsWidth);
} else {
child->AddLabel(message, gfx::Font::NORMAL);
+ child->text_label()->SetMultiLine(true);
child->text_label()->SizeToFit(kTrayNotificationContentsWidth +
kNotificationIconWidth);
}
- child->text_label()->SetMultiLine(true);
child->text_label()->SetAllowCharacterBreak(true);
child->SetExpandable(true);
child->SetVisible(true);
« 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