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

Commit 29786fc7 authored by John Spurlock's avatar John Spurlock
Browse files

Make QS battery composite color match others.

Change-Id: I2a906cd997d2372f5740532a159f04ad857d393d
parent 2a1fdefe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
-->
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="top"
@@ -27,6 +28,7 @@
            android:layout_height="32dp"
            android:padding="3dp"
            android:layout_gravity="top|center_horizontal"
            systemui:frameColor="@color/qs_batterymeter_frame_color"
            />
    <TextView
            style="@style/TextAppearance.QuickSettings.TileView"
+3 −1
Original line number Diff line number Diff line
@@ -42,7 +42,9 @@
        <attr name="decayTime" format="integer" />
        <attr name="orientation" />
    </declare-styleable>

    <declare-styleable name="BatteryMeterView">
        <attr name="frameColor" format="color" />
    </declare-styleable>
    <attr name="orientation">
        <enum name="horizontal" value="0" />
        <enum name="vertical" value="1" />
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
    <color name="batterymeter_frame_color">#66FFFFFF</color><!-- 40% white -->
    <color name="batterymeter_charge_color">#FFFFFFFF</color>
    <color name="batterymeter_bolt_color">#FFFFFFFF</color>
    <color name="qs_batterymeter_frame_color">#FF404040</color>
    <color name="status_bar_clock_color">#FFFFFFFF</color>
    <drawable name="notification_item_background_color">#ff111111</drawable>
    <drawable name="notification_item_background_color_pressed">#ff454545</drawable>
+6 −1
Original line number Diff line number Diff line
@@ -177,6 +177,10 @@ public class BatteryMeterView extends View implements DemoMode {
        super(context, attrs, defStyle);

        final Resources res = context.getResources();
        TypedArray atts = context.obtainStyledAttributes(attrs, R.styleable.BatteryMeterView,
                defStyle, 0);
        final int frameColor = atts.getColor(R.styleable.BatteryMeterView_frameColor,
                res.getColor(R.color.batterymeter_frame_color));
        TypedArray levels = res.obtainTypedArray(R.array.batterymeter_color_levels);
        TypedArray colors = res.obtainTypedArray(R.array.batterymeter_color_values);

@@ -188,6 +192,7 @@ public class BatteryMeterView extends View implements DemoMode {
        }
        levels.recycle();
        colors.recycle();
        atts.recycle();
        mShowPercent = ENABLE_PERCENT && 0 != Settings.System.getInt(
                context.getContentResolver(), "status_bar_show_battery_percent", 0);
        if (mShowPercent) {
@@ -196,7 +201,7 @@ public class BatteryMeterView extends View implements DemoMode {
        mWarningString = context.getString(R.string.battery_meter_very_low_overlay_symbol);

        mFramePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mFramePaint.setColor(res.getColor(R.color.batterymeter_frame_color));
        mFramePaint.setColor(frameColor);
        mFramePaint.setDither(true);
        mFramePaint.setStrokeWidth(0);
        mFramePaint.setStyle(Paint.Style.FILL_AND_STROKE);