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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 2765883004: Implement Harmony typography spec. (Closed)
Patch Set: test, nit comment 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
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 70a2f10e09b05d2748f2d52d9871398c35868586..f15aa17ea4863a2133beb3957795f0bd9780962c 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -238,6 +238,7 @@ gfx::Size LabelButton::GetPreferredSize() const {
// Use a temporary label copy for sizing to avoid calculation side-effects.
Label label(GetText(), {label_->font_list()});
+ label.SetLineHeight(label_->line_height());
label.SetShadows(label_->shadows());
if (style_ == STYLE_BUTTON && PlatformStyle::kDefaultLabelButtonHasBoldFont) {
tapted 2017/04/03 09:20:49 This ButtonHasBoldFont thing is going away eventua

Powered by Google App Engine
This is Rietveld 408576698