Bug 1066320 - Crop lightweight theme image if it's larger than the displayable area; r=mfinkle

This commit is contained in:
Manu Jain 2014-09-13 14:36:09 -04:00
parent 984d885b29
commit 1b160da21c

View File

@ -170,7 +170,7 @@ public class LightweightTheme implements GeckoEventListener {
// The bitmap image might be smaller than the device's width.
// If it's smaller, fill the extra space on the left with the dominant color.
if (bitmapWidth >= maxWidth) {
mBitmap = bitmap;
mBitmap = Bitmap.createBitmap(bitmap, bitmapWidth - maxWidth, 0, maxWidth, bitmapHeight);
} else {
Paint paint = new Paint();
paint.setAntiAlias(true);