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

Unified Diff: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.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 | « chrome/browser/views/about_chrome_view.cc ('k') | chrome/browser/views/constrained_window_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (revision 55911)
+++ chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -313,7 +313,7 @@
icon_bounds_.SetRect(LocationBarView::kEdgeItemPadding,
(height() - icon_size_) / 2, icon_size_, icon_size_);
int text_x = icon_bounds_.right() + LocationBarView::kItemPadding;
- int font_height = std::max(normal_font_.height(), bold_font_.height());
+ int font_height = std::max(normal_font_.GetHeight(), bold_font_.GetHeight());
text_bounds_.SetRect(text_x, std::max(0, (height() - font_height) / 2),
std::max(bounds().width() - text_x - LocationBarView::kEdgeItemPadding,
0), font_height);
@@ -327,7 +327,7 @@
int AutocompleteResultView::GetPreferredHeight(
const gfx::Font& font,
const gfx::Font& bold_font) {
- int text_height = std::max(font.height(), bold_font.height()) +
+ int text_height = std::max(font.GetHeight(), bold_font.GetHeight()) +
(kTextVerticalPadding * 2);
int icon_height = icon_size_ + (kIconVerticalPadding * 2);
return std::max(icon_height, text_height);
@@ -509,7 +509,7 @@
j != i->classifications.end(); ++j) {
int left = mirroring_context_->mirrored_left_coord(x, x + j->pixel_width);
canvas->DrawStringInt(j->text, *j->font, j->color, left, y,
- j->pixel_width, j->font->height(), flags);
+ j->pixel_width, j->font->GetHeight(), flags);
x += j->pixel_width;
}
}
« no previous file with comments | « chrome/browser/views/about_chrome_view.cc ('k') | chrome/browser/views/constrained_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698