diff options
7 files changed, 26 insertions, 18 deletions
diff --git a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml index ceef9f909c97..4d9188c40822 100644 --- a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml +++ b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml @@ -34,7 +34,7 @@ android:right="@dimen/rounded_slider_icon_inset"> <com.android.systemui.util.AlphaTintDrawableWrapper android:drawable="@drawable/ic_brightness" - android:tint="?android:attr/colorBackground" - android:alpha="0.8"/> + android:tint="?android:attr/textColorPrimaryInverse" + /> </item> </layer-list>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml index 77b98711a304..a45769fd4f34 100644 --- a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml +++ b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml @@ -34,7 +34,7 @@ </item> <item> <shape android:shape="rectangle"> - <stroke android:width="1dp" android:color="@color/qs_footer_action_border"/> + <stroke android:width="1dp" android:color="?android:attr/colorBackground"/> <corners android:radius="@dimen/qs_footer_action_corner_radius"/> </shape> </item> diff --git a/packages/SystemUI/res/layout/qs_footer_impl.xml b/packages/SystemUI/res/layout/qs_footer_impl.xml index 266ecefd0840..609fc6d41fde 100644 --- a/packages/SystemUI/res/layout/qs_footer_impl.xml +++ b/packages/SystemUI/res/layout/qs_footer_impl.xml @@ -87,7 +87,7 @@ android:focusable="true" android:padding="@dimen/qs_footer_icon_padding" android:src="@*android:drawable/ic_mode_edit" - android:tint="?android:attr/colorForeground" /> + android:tint="?android:attr/textColorPrimary" /> <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch" @@ -126,7 +126,7 @@ android:padding="@dimen/qs_footer_icon_padding" android:scaleType="centerInside" android:src="@drawable/ic_settings" - android:tint="?android:attr/colorForeground" /> + android:tint="?android:attr/textColorPrimary" /> <com.android.systemui.statusbar.AlphaOptimizedImageView android:id="@+id/tuner_icon" @@ -152,7 +152,7 @@ android:padding="@dimen/qs_footer_icon_padding" android:src="@*android:drawable/ic_lock_power_off" android:contentDescription="@string/accessibility_quick_settings_power_menu" - android:tint="?android:attr/colorForeground" /> + android:tint="?android:attr/textColorPrimary" /> </LinearLayout> </LinearLayout> diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 7101935f1f93..55596005bf12 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -35,7 +35,6 @@ <color name="status_bar_clock_color">#FFFFFFFF</color> <color name="qs_user_detail_icon_muted">#FFFFFFFF</color> <!-- not so muted after all --> <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black --> - <color name="qs_footer_action_border">#2E312C</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">#F5F5F5</color> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 9fa63dd1613d..df68dbdec9c8 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -235,7 +235,7 @@ </style> <style name="TextAppearance.QS.Status.NoCarrierText"> - <item name="android:textColor">?android:attr/textColorTertiary</item> + <item name="android:textColor">?android:attr/textColorSecondary</item> </style> <style name="TextAppearance.QS.Build"> diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java index 8280f98114e2..2e771d6fb669 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java @@ -244,11 +244,13 @@ public class QSIconViewImpl extends QSIconView { public static int getIconColorForState(Context context, int state) { switch (state) { case Tile.STATE_UNAVAILABLE: - return Utils.getColorAttrDefaultColor(context, android.R.attr.textColorTertiary); + return Utils.applyAlpha(QSTileViewImpl.UNAVAILABLE_ALPHA, + Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary)); case Tile.STATE_INACTIVE: return Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary); case Tile.STATE_ACTIVE: - return Utils.getColorAttrDefaultColor(context, android.R.attr.colorPrimary); + return Utils.getColorAttrDefaultColor(context, + android.R.attr.textColorPrimaryInverse); default: Log.e("QSIconView", "Invalid state " + state); return 0; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt index b3ec39f4f40a..cd76b4df3c92 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt @@ -61,6 +61,7 @@ open class QSTileViewImpl @JvmOverloads constructor( private const val LABEL_NAME = "label" private const val SECONDARY_LABEL_NAME = "secondaryLabel" private const val CHEVRON_NAME = "chevron" + const val UNAVAILABLE_ALPHA = 0.3f } override var heightOverride: Int = HeightOverrideable.NO_OVERRIDE @@ -68,15 +69,20 @@ open class QSTileViewImpl @JvmOverloads constructor( private val colorActive = Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorAccentPrimary) private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor) - private val colorUnavailable = - Utils.getColorAttrDefaultColor(context, android.R.attr.colorBackground) + private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive) private val colorLabelActive = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimaryInverse) private val colorLabelInactive = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary) - private val colorLabelUnavailable = - Utils.getColorAttrDefaultColor(context, android.R.attr.textColorTertiary) + private val colorLabelUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorLabelInactive) + + private val colorSecondaryLabelActive = + Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondaryInverse) + private val colorSecondaryLabelInactive = + Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary) + private val colorSecondaryLabelUnavailable = + Utils.applyAlpha(UNAVAILABLE_ALPHA, colorSecondaryLabelInactive) private lateinit var label: TextView protected lateinit var secondaryLabel: TextView @@ -404,7 +410,7 @@ open class QSTileViewImpl @JvmOverloads constructor( ), colorValuesHolder( SECONDARY_LABEL_NAME, - label.currentTextColor, + secondaryLabel.currentTextColor, getSecondaryLabelColorForState(state.state) ), colorValuesHolder( @@ -418,7 +424,7 @@ open class QSTileViewImpl @JvmOverloads constructor( setAllColors( getBackgroundColorForState(state.state), getLabelColorForState(state.state), - getLabelColorForState(state.state), + getSecondaryLabelColorForState(state.state), getChevronColorForState(state.state) ) } @@ -533,8 +539,9 @@ open class QSTileViewImpl @JvmOverloads constructor( private fun getSecondaryLabelColorForState(state: Int): Int { return when (state) { - Tile.STATE_ACTIVE -> colorLabelActive - Tile.STATE_INACTIVE, Tile.STATE_UNAVAILABLE -> colorLabelUnavailable + Tile.STATE_ACTIVE -> colorSecondaryLabelActive + Tile.STATE_INACTIVE -> colorSecondaryLabelInactive + Tile.STATE_UNAVAILABLE -> colorSecondaryLabelUnavailable else -> { Log.e(TAG, "Invalid state $state") 0 |