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

Unified Diff: ui/message_center/views/bounded_label.cc

Issue 24084003: Clean-up: Replaces Font with FontList in ui/message_center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes comments at the ending of namespaces. Created 7 years, 3 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 | « ui/message_center/views/bounded_label.h ('k') | ui/message_center/views/bounded_label_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/bounded_label.cc
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index 1fe428a314f4f5c60afc101c23e053274c7ed16e..9c6f4df5840afe0c412a3bf41f54469de012e14c 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -143,9 +143,9 @@ std::vector<string16> InnerBoundedLabel::GetWrappedText(int width, int lines) {
// Wrap, using INT_MAX for -1 widths that indicate no wrapping.
std::vector<string16> wrapped;
- gfx::ElideRectangleText(text(), font(),
- (width < 0) ? std::numeric_limits<int>::max() : width,
- height, gfx::WRAP_LONG_WORDS, &wrapped);
+ gfx::ElideRectangleText(text(), font_list(),
+ (width < 0) ? std::numeric_limits<int>::max() : width,
+ height, gfx::WRAP_LONG_WORDS, &wrapped);
// Elide if necessary.
if (lines > 0 && wrapped.size() > static_cast<unsigned int>(lines)) {
@@ -259,10 +259,10 @@ void InnerBoundedLabel::SetCachedSize(std::pair<int, int> width_and_lines,
// BoundedLabel ///////////////////////////////////////////////////////////
-BoundedLabel::BoundedLabel(const string16& text, gfx::Font font)
+BoundedLabel::BoundedLabel(const string16& text, const gfx::FontList& font_list)
: line_limit_(-1) {
label_.reset(new InnerBoundedLabel(*this));
- label_->SetFont(font);
+ label_->SetFontList(font_list);
label_->SetText(text);
}
« no previous file with comments | « ui/message_center/views/bounded_label.h ('k') | ui/message_center/views/bounded_label_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698