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

Unified Diff: ash/system/user/tray_user.cc

Issue 11535014: Replace StyleRange with BreakList; update RenderText, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 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 | chrome/browser/ui/views/extensions/extension_installed_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 6dce3cdbf311d98c54fcbe6acb785b0fcbfa5cf4..b7564bd02741ffcaf24d909a9734d0a56263d0d9 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -296,10 +296,7 @@ void PublicAccountUserDetails::Layout() {
position.set_y(position.y() + size.height());
// Set the default text color for the line.
- gfx::StyleRange default_style(line->default_style());
- default_style.foreground = kPublicAccountUserCardTextColor;
- line->set_default_style(default_style);
- line->ApplyDefaultStyle();
+ line->SetColor(kPublicAccountUserCardTextColor);
// If a range of the line contains the user's display name, apply a custom
// text color to it.
@@ -308,11 +305,9 @@ void PublicAccountUserDetails::Layout() {
if (!display_name.is_empty()) {
display_name.set_end(
it->find(kDisplayNameMark, display_name.start() + 1));
- gfx::StyleRange display_name_style(line->default_style());
- display_name_style.foreground = kPublicAccountUserCardNameColor;
ui::Range line_range(0, it->size());
- display_name_style.range = display_name.Intersect(line_range);
- line->ApplyStyleRange(display_name_style);
+ line->ApplyColor(kPublicAccountUserCardNameColor,
+ display_name.Intersect(line_range));
// Update the range for the next line.
if (display_name.end() >= line_range.end())
display_name.set_start(0);
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/extension_installed_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698