Chromium Code Reviews| Index: ui/app_list/views/search_result_view.cc |
| diff --git a/ui/app_list/views/search_result_view.cc b/ui/app_list/views/search_result_view.cc |
| index 74e3d7ab262bafdcef071685e5e73c25fbb9a1da..831a1b8b9d62779f21467c2728bc647864fc7741 100644 |
| --- a/ui/app_list/views/search_result_view.cc |
| +++ b/ui/app_list/views/search_result_view.cc |
| @@ -25,9 +25,8 @@ namespace { |
| const int kPreferredWidth = 300; |
| const int kPreferredHeight = 52; |
| -const int kIconDimension = 32; |
| const int kIconPadding = 14; |
| -const int kIconViewWidth = kIconDimension + 2 * kIconPadding; |
| +const int kIconViewWidth = kListIconSize + 2 * kIconPadding; |
|
tapted
2014/08/13 08:09:06
I think this will introduce a static initializer w
calamity
2014/08/13 08:25:09
Done.
|
| const int kTextTrailPadding = kIconPadding; |
| const int kBorderSize = 1; |
| @@ -144,7 +143,7 @@ void SearchResultView::Layout() { |
| gfx::Rect icon_bounds(rect); |
| icon_bounds.set_width(kIconViewWidth); |
| - icon_bounds.Inset(kIconPadding, (rect.height() - kIconDimension) / 2); |
| + icon_bounds.Inset(kIconPadding, (rect.height() - kListIconSize) / 2); |
| icon_bounds.Intersect(rect); |
| icon_->SetBoundsRect(icon_bounds); |
| @@ -279,11 +278,11 @@ void SearchResultView::OnIconChanged() { |
| return; |
| // Scales down big icons but leave small ones unchanged. |
| - if (image.width() > kIconDimension || image.height() > kIconDimension) { |
| + if (image.width() > kListIconSize || image.height() > kListIconSize) { |
| image = gfx::ImageSkiaOperations::CreateResizedImage( |
| image, |
| skia::ImageOperations::RESIZE_BEST, |
| - gfx::Size(kIconDimension, kIconDimension)); |
| + gfx::Size(kListIconSize, kListIconSize)); |
| } else { |
| icon_->ResetImageSize(); |
| } |