Change thickness and font of tab number
This commit is contained in:
parent
b81d9a0ed8
commit
2bca40901f
@ -1244,7 +1244,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
|||||||
public void updateTabNumber(int number) {
|
public void updateTabNumber(int number) {
|
||||||
if (mArrowImage != null) {
|
if (mArrowImage != null) {
|
||||||
mArrowImage.setImageBitmap(DrawableUtils.getRoundedNumberImage(number, Utils.dpToPx(24),
|
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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import android.graphics.Paint;
|
|||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.PorterDuffXfermode;
|
import android.graphics.PorterDuffXfermode;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
|
||||||
public class DrawableUtils {
|
public class DrawableUtils {
|
||||||
|
|
||||||
@ -22,8 +23,9 @@ public class DrawableUtils {
|
|||||||
Canvas canvas = new Canvas(image);
|
Canvas canvas = new Canvas(image);
|
||||||
Paint paint = new Paint();
|
Paint paint = new Paint();
|
||||||
paint.setColor(color);
|
paint.setColor(color);
|
||||||
|
Typeface boldText = Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD);
|
||||||
|
paint.setTypeface(boldText);
|
||||||
paint.setTextSize(Utils.dpToPx(14));
|
paint.setTextSize(Utils.dpToPx(14));
|
||||||
paint.setFakeBoldText(true);
|
|
||||||
paint.setAntiAlias(true);
|
paint.setAntiAlias(true);
|
||||||
paint.setTextAlign(Paint.Align.CENTER);
|
paint.setTextAlign(Paint.Align.CENTER);
|
||||||
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OVER));
|
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OVER));
|
||||||
|
Loading…
Reference in New Issue
Block a user