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

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

Issue 585053002: Use RenderText vertical centering on Label and CanvasSkia text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update LabelTest expectations. Created 6 years, 3 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/gfx/canvas_skia.cc ('k') | ui/views/controls/label_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 7ba7ffc9d00b260a4b82a6de9bfaa32ebe8c91f1..4bf10163f7f02d9a271c03e721fe059825e229ba 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -427,7 +427,7 @@ gfx::Rect Label::GetTextBounds() const {
NOTREACHED();
break;
}
- origin.Offset(0, std::max(0, (available.height() - text_size.height())) / 2);
+ text_size.set_height(available.height());
return gfx::Rect(origin, text_size);
}
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/views/controls/label_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698