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

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

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 years, 7 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/textfield_example.cc
diff --git a/ui/views/examples/textfield_example.cc b/ui/views/examples/textfield_example.cc
index f9b868ece11a3536d95be91c6f1fb06476be8ac2..ffcf464e9e57fef5e9a80acd16fd8238b9556fbe 100644
--- a/ui/views/examples/textfield_example.cc
+++ b/ui/views/examples/textfield_example.cc
@@ -123,12 +123,10 @@ void TextfieldExample::ButtonPressed(Button* sender, const ui::Event& event) {
} else if (sender == set_style_) {
if (!name_->text().empty()) {
name_->SetColor(SK_ColorGREEN);
- name_->SetStyle(gfx::BOLD, true);
if (name_->text().length() >= 5) {
size_t fifth = name_->text().length() / 5;
const gfx::Range big_range(1 * fifth, 4 * fifth);
- name_->ApplyStyle(gfx::BOLD, false, big_range);
name_->ApplyStyle(gfx::UNDERLINE, true, big_range);
name_->ApplyColor(SK_ColorBLUE, big_range);
« no previous file with comments | « ui/views/examples/text_example.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698