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

Unified Diff: views/controls/label.cc

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « views/controls/combobox/native_combobox_win.cc ('k') | views/controls/label_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/label.cc
===================================================================
--- views/controls/label.cc (revision 55911)
+++ views/controls/label.cc (working copy)
@@ -58,7 +58,7 @@
}
int Label::GetBaseline() {
- return GetInsets().top() + font_.baseline();
+ return GetInsets().top() + font_.GetBaseline();
}
int Label::GetHeightForWidth(int w) {
@@ -66,7 +66,7 @@
return View::GetHeightForWidth(w);
w = std::max(0, w - GetInsets().width());
- int h = font_.height();
+ int h = font_.GetHeight();
gfx::CanvasSkia::SizeStringInt(text_, font_, &w, &h, ComputeMultiLineFlags());
return h + GetInsets().height();
}
@@ -292,7 +292,7 @@
// on Linux.
int w = is_multi_line_ ?
GetAvailableRect().width() : std::numeric_limits<int>::max();
- int h = font_.height();
+ int h = font_.GetHeight();
// For single-line strings, ignore the available width and calculate how
// wide the text wants to be.
int flags = ComputeMultiLineFlags();
« no previous file with comments | « views/controls/combobox/native_combobox_win.cc ('k') | views/controls/label_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698