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

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

Issue 2654853002: Remove gfx::Canvas::DrawStringRectWithHalo. (Closed)
Patch Set: Created 3 years, 11 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
« ui/gfx/render_text.cc ('K') | « 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 0e65163e7f0adb58e8bb9163268e98d4b9f774cd..65631bc2201ad20161855bb3e8abd4b679de31f0 100644
--- a/ui/views/examples/text_example.cc
+++ b/ui/views/examples/text_example.cc
@@ -66,7 +66,6 @@ class TextExample::TextExampleView : public View {
TextExampleView()
: text_(base::ASCIIToUTF16(kShortText)),
flags_(0),
- halo_(false),
elide_(gfx::NO_ELIDE) {
}
@@ -76,9 +75,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_);
}
@@ -87,7 +83,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(); }
@@ -108,9 +103,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_;
@@ -174,7 +166,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");
@@ -197,7 +188,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
« ui/gfx/render_text.cc ('K') | « ui/views/examples/text_example.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698