diff options
-rw-r--r-- | src/com/android/settings/users/CircleFramedDrawable.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/settings/users/CircleFramedDrawable.java b/src/com/android/settings/users/CircleFramedDrawable.java index 7af2508..671cfbe 100644 --- a/src/com/android/settings/users/CircleFramedDrawable.java +++ b/src/com/android/settings/users/CircleFramedDrawable.java @@ -123,12 +123,10 @@ class CircleFramedDrawable extends Drawable { @Override public void draw(Canvas canvas) { - // clear background - final float outside = Math.min(canvas.getWidth(), canvas.getHeight()); - final float inside = mScale * outside; - final float pad = (outside - inside) / 2f; + final float inside = mScale * mSize; + final float pad = (mSize - inside) / 2f; - mDstRect.set(pad, pad, outside - pad, outside - pad); + mDstRect.set(pad, pad, mSize - pad, mSize - pad); canvas.drawBitmap(mBitmap, mSrcRect, mDstRect, null); mFrameRect.set(mDstRect); |