ImageView: Fix CENTER alignment on ImageViews with borders.
When positioning its internal ImageSkia for painting, CENTER-aligned ImageViews currently assume that any insets it may have are symmetrical (i.e. the left and right or top and bottom insets are the same value). This causes the image to be drawn in the incorrect position (e.g. it may cross the boundaries set by the ImageView insets) when the insets are not symmetrical. Fix by accounting for the inset width and height during positioning. Bug: 801583 Change-Id: I65766fbea4c088ca45781a6a69cbae7b52178625 Reviewed-on: https://chromium-review.googlesource.com/917843 Commit-Queue: Patti <patricialor@chromium.org> Reviewed-by:Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#536962}
Showing
Please register or sign in to comment