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

Unified Diff: ui/views/controls/styled_label.h

Issue 19531006: requestAutocomplete: fix some text colors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +PreferredSizeChanged override Created 7 years, 5 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
Index: ui/views/controls/styled_label.h
diff --git a/ui/views/controls/styled_label.h b/ui/views/controls/styled_label.h
index 00c0464efcc97ea32ed89ca793a1b20ae07ce8c0..bc22a18ea1f456b61ffc0992597f57866338dcac 100644
--- a/ui/views/controls/styled_label.h
+++ b/ui/views/controls/styled_label.h
@@ -64,6 +64,10 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
// |range| must be contained in |text_|.
void AddStyleRange(const ui::Range& range, const RangeStyleInfo& style_info);
+ // Sets the default style to use for any part of the text that isn't within
+ // a range set by AddStyleRange.
+ void SetDefaultStyle(const RangeStyleInfo& style_info);
+
// Sets the color of the background on which the label is drawn. This won't
// be explicitly drawn, but the label will force the text color to be
// readable over it.
@@ -76,6 +80,7 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
virtual gfx::Insets GetInsets() const OVERRIDE;
virtual int GetHeightForWidth(int w) OVERRIDE;
virtual void Layout() OVERRIDE;
+ virtual void PreferredSizeChanged() OVERRIDE;
// LinkListener implementation:
virtual void LinkClicked(Link* source, int event_flags) OVERRIDE;
@@ -104,6 +109,10 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
// The text to display.
string16 text_;
+ // The default style to use for any part of the text that isn't within
+ // a range in |style_ranges_|.
+ RangeStyleInfo default_style_info_;
+
// The listener that will be informed of link clicks.
StyledLabelListener* listener_;
« no previous file with comments | « chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc ('k') | ui/views/controls/styled_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698