mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Switch to MaterialComponents theme
Summary: Androidx introduced new Materialcomponents themes, use them instead of Theme.AppCompat. This also causes AlertDialogs and PreferenceDialogFragments to be styled correctly |{F6531506}|{F6531505}| |Before|After| (Ok button is disabled if you are wondering) Test Plan: Apply patch, verify everything still looks as expected Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D18039
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<color name="darkStatusBarBackground">#333333</color>
|
||||
|
||||
<!-- KdeConnectThemeBase styles must only be defined in the main res/values/ folder -->
|
||||
<style name="KdeConnectThemeBase.Dark" parent="Theme.AppCompat">
|
||||
<style name="KdeConnectThemeBase.Dark" parent="Theme.MaterialComponents">
|
||||
<item name="colorPrimary">@color/darkGrey</item>
|
||||
<item name="colorPrimaryDark">@color/darkStatusBarBackground</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
@@ -16,6 +16,7 @@
|
||||
<item name="colorHighContrast">@android:color/white</item>
|
||||
<item name="android:textColorPrimary">@android:color/white</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="KdeConnectThemeBase.Dark.NoActionBar" parent="KdeConnectThemeBase.Dark">
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<color name="disabled_grey">#eee</color>
|
||||
|
||||
<!-- NoActionBar because we use a Toolbar widget as ActionBar -->
|
||||
<style name="KdeConnectThemeBase" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="KdeConnectThemeBase" parent="Theme.MaterialComponents.Light.DarkActionBar">
|
||||
<!-- The three colors used by system widgets, according to https://chris.banes.me/2014/10/17/appcompat-v21/ -->
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primaryDark</item>
|
||||
@@ -16,6 +16,7 @@
|
||||
<item name="colorHighContrast">@android:color/black</item>
|
||||
<item name="android:textColorPrimary">@android:color/black</item>
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="KdeConnectThemeBase.NoActionBar" parent="KdeConnectThemeBase">
|
||||
@@ -40,5 +41,4 @@
|
||||
<style name="DisableableButton" parent="ThemeOverlay.AppCompat">
|
||||
<item name="colorButtonNormal">@drawable/disableable_button</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user