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

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: A tiny fix for the ResourceBundle... Created 4 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
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);

Powered by Google App Engine
This is Rietveld 408576698