diff options
author | Andreas Straub <andy@strb.org> | 2014-04-13 20:46:29 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2014-04-13 21:13:37 +0200 |
commit | e4f9a38c762e18fc8fbaaf03f35465d371b2b1cb (patch) | |
tree | fe575d6a13dc2d82b9842f8bcfc8905af3811656 /src/eu/siacs/conversations/utils | |
parent | 132689376cd3709bf25f949292bef81f496c4f37 (diff) |
Some icon tweaks
Use Roboto Light, thinner lines between tiles, slightly smaller letters
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 322ca210..f058b9ee 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -33,6 +33,7 @@ import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; +import android.graphics.Typeface; import android.net.Uri; import android.preference.PreferenceManager; import android.provider.ContactsContract.Contacts; @@ -111,14 +112,15 @@ public class UIHelper { } Paint textPaint = new Paint(), tilePaint = new Paint(); textPaint.setColor(fgColor); - Rect rect, left, right, topLeft, bottomLeft, topRight, bottomRight; + textPaint.setTypeface(Typeface.create("sans-serif-light", Typeface.NORMAL)); + Rect rect, left, right, topLeft, bottomLeft, topRight, bottomRight; float width; switch(tiles) { case 1: bitmap.eraseColor(colors[0]); - textPaint.setTextSize((float) (size * 0.9)); + textPaint.setTextSize((float) (size * 0.8)); textPaint.setAntiAlias(true); rect = new Rect(); textPaint.getTextBounds(letters[0], 0, 1, rect); @@ -131,14 +133,14 @@ public class UIHelper { bitmap.eraseColor(bgColor); tilePaint.setColor(colors[0]); - left = new Rect(0, 0, (size/2)-2, size); + left = new Rect(0, 0, (size/2)-1, size); canvas.drawRect(left, tilePaint); tilePaint.setColor(colors[1]); - right = new Rect((size/2)+2, 0, size, size); + right = new Rect((size/2)+1, 0, size, size); canvas.drawRect(right, tilePaint); - textPaint.setTextSize((float) (size * 0.9*0.5)); + textPaint.setTextSize((float) (size * 0.8*0.5)); textPaint.setAntiAlias(true); rect = new Rect(); textPaint.getTextBounds(letters[0], 0, 1, rect); @@ -155,18 +157,18 @@ public class UIHelper { bitmap.eraseColor(bgColor); tilePaint.setColor(colors[0]); - left = new Rect(0, 0, (size/2)-2, size); + left = new Rect(0, 0, (size/2)-1, size); canvas.drawRect(left, tilePaint); tilePaint.setColor(colors[1]); - topRight = new Rect((size/2)+2, 0, size, (size/2 - 2)); + topRight = new Rect((size/2)+1, 0, size, (size/2 - 1)); canvas.drawRect(topRight, tilePaint); tilePaint.setColor(colors[2]); - bottomRight = new Rect((size/2)+2, (size/2 + 2), size, size); + bottomRight = new Rect((size/2)+1, (size/2 + 1), size, size); canvas.drawRect(bottomRight, tilePaint); - textPaint.setTextSize((float) (size * 0.9*0.5)); + textPaint.setTextSize((float) (size * 0.8*0.5)); textPaint.setAntiAlias(true); rect = new Rect(); @@ -190,22 +192,22 @@ public class UIHelper { bitmap.eraseColor(bgColor); tilePaint.setColor(colors[0]); - topLeft = new Rect(0, 0, (size/2)-2, (size/2)-2); + topLeft = new Rect(0, 0, (size/2)-1, (size/2)-1); canvas.drawRect(topLeft, tilePaint); tilePaint.setColor(colors[1]); - bottomLeft = new Rect(0, (size/2)+2, (size/2)-2, size); + bottomLeft = new Rect(0, (size/2)+1, (size/2)-1, size); canvas.drawRect(bottomLeft, tilePaint); tilePaint.setColor(colors[2]); - topRight = new Rect((size/2)+2, 0, size, (size/2 - 2)); + topRight = new Rect((size/2)+1, 0, size, (size/2 - 1)); canvas.drawRect(topRight, tilePaint); tilePaint.setColor(colors[3]); - bottomRight = new Rect((size/2)+2, (size/2 + 2), size, size); + bottomRight = new Rect((size/2)+1, (size/2 + 1), size, size); canvas.drawRect(bottomRight, tilePaint); - textPaint.setTextSize((float) (size * 0.9*0.5)); + textPaint.setTextSize((float) (size * 0.8*0.5)); textPaint.setAntiAlias(true); rect = new Rect(); |