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

Unified Diff: chrome/browser/views/download_item_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
Index: chrome/browser/views/download_item_view.cc
===================================================================
--- chrome/browser/views/download_item_view.cc (revision 55911)
+++ chrome/browser/views/download_item_view.cc (working copy)
@@ -211,8 +211,8 @@
tooltip_text_ = download_->GetFileName().ToWStringHack();
font_ = ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
- box_height_ = std::max<int>(2 * kVerticalPadding + font_.height() +
- kVerticalTextPadding + font_.height(),
+ box_height_ = std::max<int>(2 * kVerticalPadding + font_.GetHeight() +
+ kVerticalTextPadding + font_.GetHeight(),
2 * kVerticalPadding +
normal_body_image_set_.top_left->height() +
normal_body_image_set_.bottom_left->height());
@@ -486,7 +486,7 @@
int mirrored_x = MirroredXWithWidthInsideView(
download_util::kSmallProgressIconSize, kTextWidth);
// Add font_.height() to compensate for title, which is drawn later.
- int y = box_y_ + kVerticalPadding + font_.height() +
+ int y = box_y_ + kVerticalPadding + font_.GetHeight() +
kVerticalTextPadding;
SkColor file_name_color = GetThemeProvider()->GetColor(
BrowserThemeProvider::COLOR_BOOKMARK_TEXT);
@@ -501,7 +501,7 @@
static_cast<int>(kDownloadItemLuminanceMod *
SkColorGetB(file_name_color)));
canvas->DrawStringInt(status_text_, font_, file_name_color,
- mirrored_x, y, kTextWidth, font_.height());
+ mirrored_x, y, kTextWidth, font_.GetHeight());
}
}
@@ -624,14 +624,15 @@
download_util::kSmallProgressIconSize, kTextWidth);
SkColor file_name_color = GetThemeProvider()->GetColor(
BrowserThemeProvider::COLOR_BOOKMARK_TEXT);
- int y = box_y_ + (show_status_text_ ? kVerticalPadding :
- (box_height_ - font_.height()) / 2);
+ int y =
+ box_y_ + (show_status_text_ ? kVerticalPadding :
+ (box_height_ - font_.GetHeight()) / 2);
// Draw the file's name.
canvas->DrawStringInt(filename, font_,
IsEnabled() ? file_name_color :
kFileNameDisabledColor,
- mirrored_x, y, kTextWidth, font_.height());
+ mirrored_x, y, kTextWidth, font_.GetHeight());
}
// Paint the icon.
@@ -738,7 +739,7 @@
int width, height;
// First, we set the height to the height of two rows or text plus margins.
- height = 2 * kVerticalPadding + 2 * font_.height() + kVerticalTextPadding;
+ height = 2 * kVerticalPadding + 2 * font_.GetHeight() + kVerticalTextPadding;
// Then we increase the size if the progress icon doesn't fit.
height = std::max<int>(height, download_util::kSmallProgressIconSize);
« no previous file with comments | « chrome/browser/views/constrained_window_win.cc ('k') | chrome/browser/views/frame/app_panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698