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

Unified Diff: chrome/browser/chromeos/ui/echo_dialog_view.cc

Issue 12906002: Add ability to defined ranges with different styles in StyledLabel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 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/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/ui/echo_dialog_view.cc
diff --git a/chrome/browser/chromeos/ui/echo_dialog_view.cc b/chrome/browser/chromeos/ui/echo_dialog_view.cc
index 4e1af74ed77c3bca543f051ef7313f92ee6e32dd..489da8b18a44ce24be31d10005265b8ed6eaca0c 100644
--- a/chrome/browser/chromeos/ui/echo_dialog_view.cc
+++ b/chrome/browser/chromeos/ui/echo_dialog_view.cc
@@ -51,7 +51,8 @@ void EchoDialogView::InitForEnabledEcho(const string16& service_name,
// TODO(tbarzic): Set style for service_name substring.
label_ = new views::StyledLabel(text, this);
- label_->AddLink(ui::Range(offsets[1], offsets[1] + link.length()));
+ label_->AddStyleRange(ui::Range(offsets[1], offsets[1] + link.length()),
+ views:: StyledLabel::RangeStyleInfo::CreateForLink());
SetLabelBorderAndBounds();
@@ -70,7 +71,8 @@ void EchoDialogView::InitForDisabledEcho() {
IDS_ECHO_DISABLED_CONSENT_DIALOG_TEXT, link, &offset);
label_ = new views::StyledLabel(text, this);
- label_->AddLink(ui::Range(offset, offset + link.length()));
+ label_->AddStyleRange(ui::Range(offset, offset + link.length()),
+ views::StyledLabel::RangeStyleInfo::CreateForLink());
SetLabelBorderAndBounds();
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698