Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e28c42f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make the clock font a little thicker" into pi-dev

parents fab8e716 b4ef94d1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
    <dimen name="widget_big_font_size">64dp</dimen>
    <!-- Clock with header -->
    <dimen name="widget_small_font_size">24dp</dimen>
    <dimen name="widget_small_font_stroke">0.6dp</dimen>
    <!-- Dash between clock and header -->
    <dimen name="widget_separator_width">12dp</dimen>
    <dimen name="widget_separator_thickness">1dp</dimen>
+12 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.app.IActivityManager;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
@@ -179,6 +180,8 @@ public class KeyguardStatusView extends GridLayout implements
        mVisibleInDoze = Sets.newArraySet(mClockView, mKeyguardSlice);
        mTextColor = mClockView.getCurrentTextColor();

        int clockStroke = getResources().getDimensionPixelSize(R.dimen.widget_small_font_stroke);
        mClockView.getPaint().setStrokeWidth(clockStroke);
        mClockView.addOnLayoutChangeListener(this);
        mClockSeparator.addOnLayoutChangeListener(this);
        mKeyguardSlice.setContentChangeListener(this::onSliceContentChanged);
@@ -227,6 +230,7 @@ public class KeyguardStatusView extends GridLayout implements

        if (view == mClockView) {
            float clockScale = smallClock ? mSmallClockScale : 1;
            Paint.Style style = smallClock ? Paint.Style.FILL_AND_STROKE : Paint.Style.FILL;
            if (mAnimateLayout) {
                mClockView.setY(oldTop + heightOffset);
                mClockView.animate().cancel();
@@ -238,11 +242,17 @@ public class KeyguardStatusView extends GridLayout implements
                        .y(top)
                        .scaleX(clockScale)
                        .scaleY(clockScale)
                        .withEndAction(() -> {
                            mClockView.getPaint().setStyle(style);
                            mClockView.invalidate();
                        })
                        .start();
            } else {
                mClockView.setY(top);
                mClockView.setScaleX(clockScale);
                mClockView.setScaleY(clockScale);
                mClockView.getPaint().setStyle(style);
                mClockView.invalidate();
            }
        } else if (view == mClockSeparator) {
            boolean hasSeparator = hasHeader && !mPulsing;
@@ -280,6 +290,8 @@ public class KeyguardStatusView extends GridLayout implements
        if (mClockView != null) {
            mClockView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
                    getResources().getDimensionPixelSize(R.dimen.widget_big_font_size));
            mClockView.getPaint().setStrokeWidth(
                    getResources().getDimensionPixelSize(R.dimen.widget_small_font_stroke));
        }
        if (mOwnerInfo != null) {
            mOwnerInfo.setTextSize(TypedValue.COMPLEX_UNIT_PX,