Commit 3ad1579d authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Fix how folder image item is drawn in folder icon

Fixes sizing when drawing image rep for the target scale - instead of
using the rep's pixel size, use DIP size multiplied by scale (in case
the icon image does not have exact representation for the target scale).

BUG=1018038

Change-Id: Idd184ffa34675816dc7b9a6b9d52eafc6c55c485
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888654Reviewed-by: default avatarNic Hollingum <hollingum@google.com>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710865}
parent 5caeb246
......@@ -104,8 +104,8 @@ void FolderImageSource::DrawIcon(gfx::Canvas* canvas,
canvas->DrawImageIntInPixel(
shadowed_rep, x * scale + shadow_margin.left(),
y * scale + shadow_margin.top(), shadowed_rep.pixel_width(),
shadowed_rep.pixel_height(), true, cc::PaintFlags());
y * scale + shadow_margin.top(), scale * shadowed.width(),
scale * shadowed.height(), true, cc::PaintFlags());
}
void FolderImageSource::Draw(gfx::Canvas* canvas) {
......
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