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

Commit 738f5a87 authored by Dave Kover's avatar Dave Kover Committed by Clark Scheff
Browse files

SystemUI: Expose values in status bar expanded header

Expose values related to weather and battery status. Consolidate
attributes into styles and remove the separate values. Also expose
the alarm status color.

Themers gotta theme.

Change-Id: I599cb2e697aa1b714c8c383eb6fb9577b7347180
parent 6a120225
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@
            android:layout_gravity="center_vertical"
            android:layout_marginStart="@dimen/header_battery_margin_expanded"
            android:paddingEnd="@dimen/battery_level_padding_end"
            android:textColor="#ffffff"
            android:textColor="@color/status_bar_battery_level_text_color"
            android:textSize="@dimen/battery_level_text_size"
            android:importantForAccessibility="noHideDescendants"/>
    </LinearLayout>
@@ -159,7 +159,7 @@
        android:layout_marginBottom="4dp"
        android:drawablePadding="6dp"
        android:drawableStart="@drawable/ic_access_alarms_small"
        android:textColor="#64ffffff"
        android:textColor="@color/status_bar_alarm_status_text_color"
        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
        android:paddingEnd="6dp"
        android:paddingStart="6dp"
@@ -183,19 +183,21 @@
            android:id="@+id/weather_line_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingEnd="16dp"
            android:paddingEnd="@dimen/status_bar_weather_padding_end"
            android:gravity="right"
            android:textColor="@color/status_bar_temperature_text_color"
            android:textSize="@dimen/weather_text_size"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.WeatherTemp"
            android:importantForAccessibility="noHideDescendants"/>
    <TextView
            android:id="@+id/weather_line_2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingEnd="16dp"
            android:paddingEnd="@dimen/status_bar_weather_padding_end"
            android:gravity="right"
            android:textColor="@color/status_bar_temperature_location_text_color"
            android:textSize="@dimen/weather_text_size"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.WeatherLocation"
            android:importantForAccessibility="noHideDescendants"/>
    </LinearLayout>

+11 −0
Original line number Diff line number Diff line
@@ -51,4 +51,15 @@

    <!-- Navigation button ripple color -->
    <color name="navbutton_ripple_color">#FFFFFFFF</color>

    <!-- Expanded Status Bar Weather Text Colors -->
    <color name="status_bar_temperature_text_color">#FFFFFFFF</color>
    <color name="status_bar_temperature_location_text_color">#FFFFFFFF</color>

    <!-- Expanded Status Bar Alarm Status Text Color -->
    <color name="status_bar_alarm_status_text_color">#64ffffff</color>

    <!-- Expanded Status Bar Battery Level Text Color -->
    <color name="status_bar_battery_level_text_color">#ffffff</color>

</resources>
+4 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
     limitations under the License.
-->
<resources>
    <dimen name="weather_text_size">12sp</dimen>

    <dimen name="detail_radio_group_padding_left">16dp</dimen>
    <dimen name="detail_radio_group_padding">8dp</dimen>

@@ -36,4 +36,7 @@
    <!-- Side padding for the Quick Settings panel -->
    <dimen name="qs_panel_side_padding">@dimen/notification_side_padding</dimen>

    <!-- Padding end for weather text -->
    <dimen name="status_bar_weather_padding_end">16dp</dimen>

</resources>
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>

    <style name="TextAppearance.StatusBar.Expanded.WeatherTemp">
        <item name="android:textSize">12sp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@color/status_bar_temperature_text_color</item>
    </style>

    <style name="TextAppearance.StatusBar.Expanded.WeatherLocation">
        <item name="android:textSize">12sp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@color/status_bar_temperature_location_text_color</item>
    </style>

</resources>