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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Further Mac and Linux fixes. 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/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 74d18b70564e2ea7e60de96e11fb9c83c41cfb45..11bd2444b8868bf8b6890b33de4e7a9304be813c 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -560,6 +560,16 @@ void Textfield::ApplyStyle(gfx::TextStyle style,
SchedulePaint();
}
+void Textfield::SetWeight(gfx::Font::Weight weight) {
+ GetRenderText()->SetWeight(weight);
+ SchedulePaint();
+}
+
+void Textfield::ApplyWeight(gfx::Font::Weight weight, const gfx::Range& range) {
+ GetRenderText()->ApplyWeight(weight, range);
+ SchedulePaint();
+}
+
void Textfield::ClearEditHistory() {
model_->ClearEditHistory();
}

Powered by Google App Engine
This is Rietveld 408576698