Commit 10c002c6 authored by wutao's avatar wutao Committed by Commit Bot

app_list: Resize icon in search result view

When SetIcon in the SearchResultTileItemview, the icon is not resized
for different display size. Therefore the image quality is bad when the
scale is not 1. Resizing the icon will fix this bug.

Bug: 842997
Test: manual
Change-Id: I00189636fbb2499e778f777d7e93cd60a3cc9057
Reviewed-on: https://chromium-review.googlesource.com/1080011Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563035}
parent c79c4487
......@@ -396,7 +396,10 @@ void SearchResultTileItemView::ExecuteCommand(int command_id, int event_flags) {
}
void SearchResultTileItemView::SetIcon(const gfx::ImageSkia& icon) {
icon_->SetImage(icon);
gfx::ImageSkia resized(gfx::ImageSkiaOperations::CreateResizedImage(
icon, skia::ImageOperations::RESIZE_BEST,
gfx::Size(kTileIconSize, kTileIconSize)));
icon_->SetImage(resized);
}
void SearchResultTileItemView::SetBadgeIcon(const gfx::ImageSkia& badge_icon) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment