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

Unified Diff: ui/gfx/render_text.h

Issue 2345183002: Views: Draw Textfield selected text in gray when top-level Widget loses focus.
Patch Set: Refactor to use SelectionController(Delegate). Unfinished! Created 4 years, 1 month 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 | « chrome/browser/ui/libgtkui/native_theme_gtk.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 7e0b48310116e1fa2cf8ac004389c6bae197a084..d927a49fdd1559a1177bec7a443f833b0aaac754 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -256,13 +256,15 @@ class GFX_EXPORT RenderText {
SkColor selection_color() const { return selection_color_; }
void set_selection_color(SkColor color) { selection_color_ = color; }
- SkColor selection_background_focused_color() const {
- return selection_background_focused_color_;
+ SkColor selection_background_color() const {
+ return selection_background_color_;
}
- void set_selection_background_focused_color(SkColor color) {
- selection_background_focused_color_ = color;
+ void set_selection_background_color(SkColor color) {
+ selection_background_color_ = color;
}
+ void set_draw_text_selection(bool draw) { draw_text_selection_ = draw; }
+
bool focused() const { return focused_; }
void set_focused(bool focused) { focused_ = focused; }
@@ -760,8 +762,11 @@ class GFX_EXPORT RenderText {
// The color used for drawing selected text.
SkColor selection_color_;
- // The background color used for drawing the selection when focused.
- SkColor selection_background_focused_color_;
+ // The background color used for drawing the selection.
+ SkColor selection_background_color_;
+
+ // Whether to draw the background of the selected text.
+ bool draw_text_selection_;
// The focus state of the text.
bool focused_;
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698