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

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

Merge "Enable stroked QS tile background"

parents 5793b1d9 ba46cae7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -489,6 +489,7 @@
    -->
    <dimen name="qs_customize_header_min_height">46dp</dimen>
    <dimen name="qs_tile_margin_top">18dp</dimen>
    <dimen name="qs_tile_icon_background_stroke_width">-1dp</dimen>
    <dimen name="qs_tile_background_size">44dp</dimen>
    <dimen name="qs_quick_tile_size">48dp</dimen>
    <dimen name="qs_quick_tile_padding">12dp</dimen>
+7 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.Drawable;
@@ -98,6 +99,12 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView {
        PathShape p = new PathShape(path, pathSize, pathSize);
        ShapeDrawable d = new ShapeDrawable(p);
        d.setTintList(ColorStateList.valueOf(Color.TRANSPARENT));
        float backgroundStrokeWidth = context.getResources()
                .getDimension(R.dimen.qs_tile_icon_background_stroke_width);
        if (backgroundStrokeWidth > 0) {
            d.getPaint().setStyle(Paint.Style.STROKE);
            d.getPaint().setStrokeWidth(backgroundStrokeWidth);
        }
        int bgSize = context.getResources().getDimensionPixelSize(R.dimen.qs_tile_background_size);
        d.setIntrinsicHeight(bgSize);
        d.setIntrinsicWidth(bgSize);