diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index a11cd0c9f..cb67c1c42 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -756,8 +756,12 @@ public class Account implements BaseAccount { } + public ColorChip generateColorChip(boolean messageRead) { + return new ColorChip(mChipColor, messageRead); + } + public ColorChip generateColorChip() { - return new ColorChip(mChipColor); + return new ColorChip(mChipColor, false); } diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java index f9fa896ba..0bdd3dc8a 100644 --- a/src/com/fsck/k9/activity/Accounts.java +++ b/src/com/fsck/k9/activity/Accounts.java @@ -1747,7 +1747,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { } } else { - holder.chip.setBackgroundDrawable(new ColorChip(0xff999999).drawable()); + holder.chip.setBackgroundDrawable(new ColorChip(0xff999999, false).drawable()); } diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 5a04a30c8..f2fbe701d 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -2240,7 +2240,7 @@ public class MessageList extends K9ListActivity implements OnItemClickListener, - holder.chip.setBackgroundDrawable(message.message.getFolder().getAccount().generateColorChip().drawable()); + holder.chip.setBackgroundDrawable(message.message.getFolder().getAccount().generateColorChip(message.read).drawable()); // TODO: Make these colors part of the theme if (K9.getK9Theme() == K9.THEME_LIGHT) { // Light theme: light grey background for read messages diff --git a/src/com/fsck/k9/view/ColorChip.java b/src/com/fsck/k9/view/ColorChip.java index 50cdb50d8..77d190267 100644 --- a/src/com/fsck/k9/view/ColorChip.java +++ b/src/com/fsck/k9/view/ColorChip.java @@ -1,5 +1,6 @@ package com.fsck.k9.view; +import android.graphics.Paint; import android.graphics.Path; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.PathShape; @@ -9,23 +10,27 @@ public class ColorChip { static { - CHIP_PATH.addCircle(8,8,8f,Path.Direction.CW); + CHIP_PATH.addCircle(8,8,7f,Path.Direction.CW); CHIP_PATH.close(); } private ShapeDrawable mDrawable; - public ColorChip(int color) { + public ColorChip(int color, boolean messageRead) { mDrawable = new ShapeDrawable(new PathShape(CHIP_PATH, 16f, 16f)); + mDrawable.getPaint().setStrokeWidth(2); + if (messageRead) { + // Read messages get an outlined circle + mDrawable.getPaint().setStyle(Paint.Style.STROKE); + } mDrawable.getPaint().setColor(color); } public ShapeDrawable drawable() { - return mDrawable; }