Browse Source

Change thickness and font of tab number

master
Anthony Restaino 9 years ago
parent
commit
2bca40901f
  1. 2
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 4
      app/src/main/java/acr/browser/lightning/utils/DrawableUtils.java

2
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -1244,7 +1244,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -1244,7 +1244,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
public void updateTabNumber(int number) {
if (mArrowImage != null) {
mArrowImage.setImageBitmap(DrawableUtils.getRoundedNumberImage(number, Utils.dpToPx(24),
Utils.dpToPx(24), ThemeUtils.getIconThemeColor(this, mDarkTheme), Utils.dpToPx(2)));
Utils.dpToPx(24), ThemeUtils.getIconThemeColor(this, mDarkTheme), Utils.dpToPx(2.5f)));
}
}

4
app/src/main/java/acr/browser/lightning/utils/DrawableUtils.java

@ -6,6 +6,7 @@ import android.graphics.Paint; @@ -6,6 +6,7 @@ import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.graphics.Typeface;
public class DrawableUtils {
@ -22,8 +23,9 @@ public class DrawableUtils { @@ -22,8 +23,9 @@ public class DrawableUtils {
Canvas canvas = new Canvas(image);
Paint paint = new Paint();
paint.setColor(color);
Typeface boldText = Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD);
paint.setTypeface(boldText);
paint.setTextSize(Utils.dpToPx(14));
paint.setFakeBoldText(true);
paint.setAntiAlias(true);
paint.setTextAlign(Paint.Align.CENTER);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OVER));

Loading…
Cancel
Save