Loading src/com/fsck/k9/view/ColorChip.java +24 −29 Original line number Diff line number Diff line package com.fsck.k9.view; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.PathShape; public class ColorChip { public static final Path CIRCULAR = new Path(); public static final Path LEFT_POINTING = new Path(); Loading @@ -13,9 +15,7 @@ public class ColorChip { public static final Path RIGHT_NOTCH = new Path(); public static final Path STAR = new Path(); static { CIRCULAR.addCircle(160, 160, 70f, Path.Direction.CW); CIRCULAR.close(); Loading Loading @@ -48,14 +48,12 @@ public class ColorChip { STAR.close(); } private ShapeDrawable mDrawable; private ShapeDrawable mDrawable; public ColorChip(int color, boolean messageRead, Path shape) { if (shape.equals(STAR)) { mDrawable = new ShapeDrawable(new PathShape(shape, 280f, 280f)); } else { mDrawable = new ShapeDrawable(new PathShape(shape, 320f, 320f)); } Loading @@ -66,7 +64,6 @@ public class ColorChip { } else { // Unread messages get filled, while retaining the outline, so that they stay the same size mDrawable.getPaint().setStyle(Paint.Style.FILL_AND_STROKE); } mDrawable.getPaint().setStrokeWidth(20); Loading @@ -76,6 +73,4 @@ public class ColorChip { public ShapeDrawable drawable() { return mDrawable; } } Loading
src/com/fsck/k9/view/ColorChip.java +24 −29 Original line number Diff line number Diff line package com.fsck.k9.view; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.PathShape; public class ColorChip { public static final Path CIRCULAR = new Path(); public static final Path LEFT_POINTING = new Path(); Loading @@ -13,9 +15,7 @@ public class ColorChip { public static final Path RIGHT_NOTCH = new Path(); public static final Path STAR = new Path(); static { CIRCULAR.addCircle(160, 160, 70f, Path.Direction.CW); CIRCULAR.close(); Loading Loading @@ -48,14 +48,12 @@ public class ColorChip { STAR.close(); } private ShapeDrawable mDrawable; private ShapeDrawable mDrawable; public ColorChip(int color, boolean messageRead, Path shape) { if (shape.equals(STAR)) { mDrawable = new ShapeDrawable(new PathShape(shape, 280f, 280f)); } else { mDrawable = new ShapeDrawable(new PathShape(shape, 320f, 320f)); } Loading @@ -66,7 +64,6 @@ public class ColorChip { } else { // Unread messages get filled, while retaining the outline, so that they stay the same size mDrawable.getPaint().setStyle(Paint.Style.FILL_AND_STROKE); } mDrawable.getPaint().setStrokeWidth(20); Loading @@ -76,6 +73,4 @@ public class ColorChip { public ShapeDrawable drawable() { return mDrawable; } }