summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-04-25 20:32:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-25 20:32:46 +0000
commit410e2df458328d5375b35ef9a610da240293d06b (patch)
tree5138526de0e84ae3da5b85e074a59b39d6e84284
parentf6d483e6c9c8ee7999d1380b18bf9f30539af228 (diff)
parent8397ba603c9eacbd095a15478d60d5f7b85845a8 (diff)
downloadpackages_apps_Settings-410e2df458328d5375b35ef9a610da240293d06b.zip
packages_apps_Settings-410e2df458328d5375b35ef9a610da240293d06b.tar.gz
packages_apps_Settings-410e2df458328d5375b35ef9a610da240293d06b.tar.bz2
Merge "CircleFramedDrawable incorrectly has implicit dependency on the hosting view size." into jb-mr2-dev
-rw-r--r--src/com/android/settings/users/CircleFramedDrawable.java8
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);