Chromium Code Reviews| Index: ui/app_list/views/app_list_item_view.cc |
| diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc |
| index 737e21f0aac6289b0ac364ddba55963e5f2baee0..4a255d03f0a946f3393140d3efa68b1f9b4c25e2 100644 |
| --- a/ui/app_list/views/app_list_item_view.cc |
| +++ b/ui/app_list/views/app_list_item_view.cc |
| @@ -41,15 +41,6 @@ const int kTopPadding = 20; |
| const int kIconTitleSpacing = 7; |
| const int kProgressBarHorizontalPadding = 12; |
| -// The font is different on each platform. The font size is adjusted on some |
| -// platforms to keep a consistent look. |
| -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| -// Reducing the font size by 2 makes it the same as the Windows font size. |
| -const int kFontSizeDelta = -2; |
| -#else |
| -const int kFontSizeDelta = 0; |
| -#endif |
| - |
| // Radius of the folder dropping preview circle. |
| const int kFolderPreviewRadius = 40; |
| @@ -95,8 +86,16 @@ AppListItemView::AppListItemView(AppsGridView* apps_grid_view, |
| title_->SetBackgroundColor(0); |
| title_->SetAutoColorReadabilityEnabled(false); |
| title_->SetEnabledColor(kGridTitleColor); |
| - title_->SetFontList( |
| - rb.GetFontList(kItemTextFontStyle).DeriveWithSizeDelta(kFontSizeDelta)); |
| + |
| + const gfx::FontList& font_list = rb.GetFontList(kItemTextFontStyle); |
| +// The font is different on each platform. The font size is adjusted on some |
| +// platforms to keep a consistent look. |
| +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| + // Reducing the font size by 2 makes it the same as the Windows font size. |
| + const int kFontSizeDelta = -2; |
| + font_list = font_list.DeriveWithSizeDelta(kFontSizeDelta); |
|
tapted
2014/09/18 01:56:45
assigning to a const reference? pretty sure that s
|
| +#endif |
| + title_->SetFontList(font_list); |
|
tapted
2014/09/18 01:56:45
nit: I think I liked the #ifdefs being just around
|
| title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| title_->Invalidate(); |
| SetTitleSubpixelAA(); |