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

Unified Diff: ui/views/examples/text_example.cc

Issue 2654853002: Remove gfx::Canvas::DrawStringRectWithHalo. (Closed)
Patch Set: fix test Created 3 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 | « ui/views/examples/text_example.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/text_example.cc
diff --git a/ui/views/examples/text_example.cc b/ui/views/examples/text_example.cc
index 58e9994c1c3ed36c2804a4c2b09a5ac0316e3173..05efef15f7b556d74f04bd8ca778ee32bc7f62ac 100644
--- a/ui/views/examples/text_example.cc
+++ b/ui/views/examples/text_example.cc
@@ -67,7 +67,6 @@ class TextExample::TextExampleView : public View {
TextExampleView()
: text_(base::ASCIIToUTF16(kShortText)),
flags_(0),
- halo_(false),
elide_(gfx::NO_ELIDE) {
}
@@ -77,9 +76,6 @@ class TextExample::TextExampleView : public View {
const SkColor color = SK_ColorDKGRAY;
if (elide_ == gfx::FADE_TAIL) {
canvas->DrawFadedString(text_, font_list_, color, bounds, flags_);
- } else if (halo_) {
- canvas->DrawStringRectWithHalo(text_, font_list_, color, SK_ColorYELLOW,
- bounds, flags_);
} else {
canvas->DrawStringRectWithFlags(text_, font_list_, color, bounds, flags_);
}
@@ -88,7 +84,6 @@ class TextExample::TextExampleView : public View {
int flags() const { return flags_; }
void set_flags(int flags) { flags_ = flags; }
void set_text(const base::string16& text) { text_ = text; }
- void set_halo(bool halo) { halo_ = halo; }
void set_elide(gfx::ElideBehavior elide) { elide_ = elide; }
int GetStyle() const { return font_list_.GetFontStyle(); }
@@ -109,9 +104,6 @@ class TextExample::TextExampleView : public View {
// Text flags for passing to |DrawStringRect()|.
int flags_;
- // A flag to draw a halo around the text.
- bool halo_;
-
// The eliding, fading, or truncating behavior.
gfx::ElideBehavior elide_;
@@ -175,7 +167,6 @@ void TextExample::CreateExampleView(View* container) {
layout->StartRow(0, 0);
multiline_checkbox_ = AddCheckbox(layout, "Multiline");
break_checkbox_ = AddCheckbox(layout, "Character Break");
- halo_checkbox_ = AddCheckbox(layout, "Halo");
bold_checkbox_ = AddCheckbox(layout, "Bold");
italic_checkbox_ = AddCheckbox(layout, "Italic");
underline_checkbox_ = AddCheckbox(layout, "Underline");
@@ -198,7 +189,6 @@ void TextExample::ButtonPressed(Button* button, const ui::Event& event) {
SetFlagFromCheckbox(break_checkbox_, &flags, gfx::Canvas::CHARACTER_BREAK);
SetFlagFromCheckbox(italic_checkbox_, &style, gfx::Font::ITALIC);
SetFlagFromCheckbox(underline_checkbox_, &style, gfx::Font::UNDERLINE);
- text_view_->set_halo(halo_checkbox_->checked());
text_view_->set_flags(flags);
text_view_->SetStyle(style);
text_view_->SetWeight(bold_checkbox_->checked() ? gfx::Font::Weight::BOLD
« no previous file with comments | « ui/views/examples/text_example.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698