Merge "Tweak home handle colors to have some opacity" into qt-r1-dev

This commit is contained in:
TreeHugger Robot
2019-07-28 08:30:35 +00:00
committed by Android (Google) Code Review
4 changed files with 10 additions and 4 deletions

View File

@@ -75,14 +75,15 @@
<attr name="horizontalSpacing" format="dimension" /> <attr name="horizontalSpacing" format="dimension" />
</declare-styleable> </declare-styleable>
<!-- Theme for icons in the status bar (light/dark). background/fillColor is used for dual tone <!-- Theme for icons in the status/nav bar (light/dark). background/fillColor is used for dual
icons like wifi and signal, and singleToneColor is used for icons with only one tone. tone icons like wifi and signal, and singleToneColor is used for icons with only one tone.
Contract: Pixel with fillColor blended over backgroundColor blended over translucent should Contract: Pixel with fillColor blended over backgroundColor blended over translucent should
equal to singleToneColor blended over translucent. --> equal to singleToneColor blended over translucent. -->
<declare-styleable name="TonedIcon"> <declare-styleable name="TonedIcon">
<attr name="backgroundColor" format="integer" /> <attr name="backgroundColor" format="integer" />
<attr name="fillColor" format="integer" /> <attr name="fillColor" format="integer" />
<attr name="singleToneColor" format="integer" /> <attr name="singleToneColor" format="integer" />
<attr name="homeHandleColor" format="integer" />
</declare-styleable> </declare-styleable>
<declare-styleable name="StatusBarWindowView_Layout"> <declare-styleable name="StatusBarWindowView_Layout">

View File

@@ -116,6 +116,9 @@
<!-- The color of the navigation bar icons. Need to be in sync with ic_sysbar_* --> <!-- The color of the navigation bar icons. Need to be in sync with ic_sysbar_* -->
<color name="navigation_bar_icon_color">#E5FFFFFF</color> <color name="navigation_bar_icon_color">#E5FFFFFF</color>
<color name="navigation_bar_home_handle_light_color">#EBffffff</color>
<color name="navigation_bar_home_handle_dark_color">#99000000</color>
<!-- The shadow color for light navigation bar icons. --> <!-- The shadow color for light navigation bar icons. -->
<color name="nav_key_button_shadow_color">#30000000</color> <color name="nav_key_button_shadow_color">#30000000</color>

View File

@@ -366,11 +366,13 @@
<item name="backgroundColor">@color/light_mode_icon_color_dual_tone_background</item> <item name="backgroundColor">@color/light_mode_icon_color_dual_tone_background</item>
<item name="fillColor">@color/light_mode_icon_color_dual_tone_fill</item> <item name="fillColor">@color/light_mode_icon_color_dual_tone_fill</item>
<item name="singleToneColor">@color/light_mode_icon_color_single_tone</item> <item name="singleToneColor">@color/light_mode_icon_color_single_tone</item>
<item name="homeHandleColor">@color/navigation_bar_home_handle_light_color</item>
</style> </style>
<style name="DualToneDarkTheme"> <style name="DualToneDarkTheme">
<item name="backgroundColor">@color/dark_mode_icon_color_dual_tone_background</item> <item name="backgroundColor">@color/dark_mode_icon_color_dual_tone_background</item>
<item name="fillColor">@color/dark_mode_icon_color_dual_tone_fill</item> <item name="fillColor">@color/dark_mode_icon_color_dual_tone_fill</item>
<item name="singleToneColor">@color/dark_mode_icon_color_single_tone</item> <item name="singleToneColor">@color/dark_mode_icon_color_single_tone</item>
<item name="homeHandleColor">@color/navigation_bar_home_handle_dark_color</item>
</style> </style>
<style name="QSHeaderDarkTheme"> <style name="QSHeaderDarkTheme">
<item name="backgroundColor">@color/dark_mode_qs_icon_color_dual_tone_background</item> <item name="backgroundColor">@color/dark_mode_qs_icon_color_dual_tone_background</item>

View File

@@ -53,8 +53,8 @@ public class NavigationHandle extends View implements ButtonInterface {
final int dualToneLightTheme = Utils.getThemeAttr(context, R.attr.lightIconTheme); final int dualToneLightTheme = Utils.getThemeAttr(context, R.attr.lightIconTheme);
Context lightContext = new ContextThemeWrapper(context, dualToneLightTheme); Context lightContext = new ContextThemeWrapper(context, dualToneLightTheme);
Context darkContext = new ContextThemeWrapper(context, dualToneDarkTheme); Context darkContext = new ContextThemeWrapper(context, dualToneDarkTheme);
mLightColor = Utils.getColorAttrDefaultColor(lightContext, R.attr.singleToneColor); mLightColor = Utils.getColorAttrDefaultColor(lightContext, R.attr.homeHandleColor);
mDarkColor = Utils.getColorAttrDefaultColor(darkContext, R.attr.singleToneColor); mDarkColor = Utils.getColorAttrDefaultColor(darkContext, R.attr.homeHandleColor);
mPaint.setAntiAlias(true); mPaint.setAntiAlias(true);
setFocusable(false); setFocusable(false);
} }