sdm660-common: DeviceSettings: FPS Info: Redesign FPS Info

This commit is contained in:
chrisw444 2021-02-23 23:54:18 +02:00 committed by pix106
parent cf39246739
commit d645cc4e2b

View file

@ -90,19 +90,19 @@ public class FPSInfoService extends Service {
FPSView(Context c) {
super(c);
float density = c.getResources().getDisplayMetrics().density;
int paddingPx = Math.round(5 * density);
int paddingPx = Math.round(10 * density);
setPadding(paddingPx, paddingPx, paddingPx, paddingPx);
setBackgroundColor(Color.argb(0x60, 0, 0, 0));
setBackgroundColor(Color.argb(0x0, 0, 0, 0));
final int textSize = Math.round(12 * density);
final int textSize = Math.round(20 * density);
Typeface typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD);
Typeface typeface = Typeface.create("google-sans", Typeface.BOLD);
mOnlinePaint = new Paint();
mOnlinePaint.setTypeface(typeface);
mOnlinePaint.setAntiAlias(true);
mOnlinePaint.setTextSize(textSize);
mOnlinePaint.setColor(Color.WHITE);
mOnlinePaint.setColor(Color.YELLOW);
mOnlinePaint.setShadowLayer(5.0f, 0.0f, 0.0f, Color.BLACK);
mAscent = mOnlinePaint.ascent();
@ -163,7 +163,7 @@ public class FPSInfoService extends Service {
return;
}
int neededWidth = mPaddingLeft + mPaddingRight + mMaxWidth;
int neededWidth = mPaddingLeft + mPaddingRight + mMaxWidth + 40;
int neededHeight = mPaddingTop + mPaddingBottom + 40;
if (neededWidth != mNeededWidth || neededHeight != mNeededHeight) {
mNeededWidth = neededWidth;