diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 22:32:41 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 22:32:41 +0000 |
commit | 7f8bd32d382cc3f1cd70670d40f5f96d69e5d6ea (patch) | |
tree | d5d5b1722da43f55212e738d1333d2654923b75b /views/controls/label.h | |
parent | 1b0a2055ebe972b871ec3e5062ae33db72f6bf80 (diff) | |
download | chromium_src-7f8bd32d382cc3f1cd70670d40f5f96d69e5d6ea.zip chromium_src-7f8bd32d382cc3f1cd70670d40f5f96d69e5d6ea.tar.gz chromium_src-7f8bd32d382cc3f1cd70670d40f5f96d69e5d6ea.tar.bz2 |
Add highlight color support to label text.
BUG=none
TEST=--gtest_filter=LabelTest.*
Review URL: http://codereview.chromium.org/113466
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/label.h')
-rw-r--r-- | views/controls/label.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/views/controls/label.h b/views/controls/label.h index 97b5bc2..9a5526a 100644 --- a/views/controls/label.h +++ b/views/controls/label.h @@ -97,6 +97,16 @@ class Label : public View { // Return a reference to the currently used color virtual const SkColor GetColor() const; + // Set and Get the highlight color + virtual void SetHighlightColor(const SkColor& color) { + highlight_color_ = color; + } + virtual const SkColor GetHighlightColor() const { return highlight_color_; } + + // Whether to draw highlighted text. + virtual bool DrawHighlighted() const { return highlighted_; } + virtual void SetDrawHighlighted(bool h); + // Set horizontal alignment. If the locale is RTL, and the RTL alignment // setting is set as USE_UI_ALIGNMENT, the alignment is flipped around. // @@ -218,6 +228,7 @@ class Label : public View { GURL url_; gfx::Font font_; SkColor color_; + SkColor highlight_color_; gfx::Size text_size_; bool text_size_valid_; bool is_multi_line_; @@ -241,6 +252,8 @@ class Label : public View { // allows this view to reserve space for a focus border that it otherwise // might not have because it is not itself focusable. bool has_focus_border_; + // Whether the text is drawn with an inset highlight. + bool highlighted_; DISALLOW_COPY_AND_ASSIGN(Label); }; |