Commit 2ad77913 authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Fix to pick up preference theme in v26+

Following https://crrev.com/c/1748123, we stopped picking up the
preferenceTheme attribute on v26+, causing incorrect styling. This
change fixes that, and slightly reorganizes the Preference themes into
base styles to avoid some repetition.

Bug: 860848
Change-Id: Ib6b3b0b4394f483ef219deb2b8b1d9c63622b258
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1774315Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691813}
parent 4cc98baf
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
Use of this source code is governed by a BSD-style license that can be Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. --> found in the LICENSE file. -->
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<style name="Theme.Chromium.TabbedMode" parent="Base.Theme.Chromium.TabbedMode"> <style name="Theme.Chromium.TabbedMode" parent="Base.Theme.Chromium.TabbedMode">
<item name="android:statusBarColor">@android:color/black</item> <item name="android:statusBarColor">@android:color/black</item>
<item name="android:windowLightStatusBar">false</item> <item name="android:windowLightStatusBar">false</item>
</style> </style>
<style name="Theme.Chromium.Preferences" parent="Base.Theme.Chromium.Preferences"> <style name="Theme.Chromium.Preferences" parent="Base.V21.Theme.Chromium.Preferences">
<item name="android:statusBarColor">@android:color/black</item> <item name="android:statusBarColor">@android:color/black</item>
<item name="android:windowLightStatusBar">false</item> <item name="android:windowLightStatusBar">false</item>
</style> </style>
......
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
<item name="floatLabelPaddingRight">@dimen/pref_autofill_field_horizontal_padding</item> <item name="floatLabelPaddingRight">@dimen/pref_autofill_field_horizontal_padding</item>
<item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_margin</item> <item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_margin</item>
<item name="actionBarStyle">@style/PreferenceActionBarModern</item> <item name="actionBarStyle">@style/PreferenceActionBarModern</item>
<item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item>
</style> </style>
<!-- TODO(huayinz): Verify if these text styles are up to date with UX and override styles in <!-- TODO(huayinz): Verify if these text styles are up to date with UX and override styles in
...@@ -153,7 +154,6 @@ ...@@ -153,7 +154,6 @@
<item name="android:textAppearanceMedium">@style/TextAppearance.PreferenceMediumText</item> <item name="android:textAppearanceMedium">@style/TextAppearance.PreferenceMediumText</item>
<item name="android:textAppearanceSmall">@style/TextAppearance.BlackBody</item> <item name="android:textAppearanceSmall">@style/TextAppearance.BlackBody</item>
<item name="android:windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item>
<item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item>
</style> </style>
<style name="Theme.Chromium.Preferences.ManageSpace"> <style name="Theme.Chromium.Preferences.ManageSpace">
......
...@@ -17,11 +17,12 @@ ...@@ -17,11 +17,12 @@
<style name="Base.Theme.Chromium" parent="Base.V21.Theme.Chromium" /> <style name="Base.Theme.Chromium" parent="Base.V21.Theme.Chromium" />
<!-- Preferences --> <!-- Preferences -->
<style name="Theme.Chromium.Preferences" parent="Base.Theme.Chromium.Preferences"> <style name="Base.V21.Theme.Chromium.Preferences" parent="Base.Theme.Chromium.Preferences">
<item name="alertDialogTheme">@style/Theme.Chromium.Preferences.AlertDialog</item> <item name="alertDialogTheme">@style/Theme.Chromium.Preferences.AlertDialog</item>
<item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item>
</style> </style>
<style name="Theme.Chromium.Preferences" parent="Base.V21.Theme.Chromium.Preferences" />
<style name="Theme.Chromium.PreferenceFragment"> <style name="Theme.Chromium.PreferenceFragment">
<item name="android:divider">?android:attr/listDivider</item> <item name="android:divider">?android:attr/listDivider</item>
</style> </style>
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
Use of this source code is governed by a BSD-style license that can be Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. --> found in the LICENSE file. -->
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<style name="Theme.Chromium.TabbedMode" parent="Base.Theme.Chromium.TabbedMode"> <style name="Theme.Chromium.TabbedMode" parent="Base.Theme.Chromium.TabbedMode">
<item name="android:statusBarColor">@color/modern_primary_color</item> <item name="android:statusBarColor">@color/modern_primary_color</item>
<item name="android:windowLightStatusBar">@bool/window_light_status_bar</item> <item name="android:windowLightStatusBar">@bool/window_light_status_bar</item>
</style> </style>
<style name="Theme.Chromium.Preferences" parent="Base.Theme.Chromium.Preferences"> <style name="Theme.Chromium.Preferences" parent="Base.V21.Theme.Chromium.Preferences">
<item name="android:statusBarColor">@color/modern_primary_color</item> <item name="android:statusBarColor">@color/modern_primary_color</item>
<item name="android:windowLightStatusBar">@bool/window_light_status_bar</item> <item name="android:windowLightStatusBar">@bool/window_light_status_bar</item>
</style> </style>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment