diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2023-04-04 19:34:00 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2023-04-04 20:53:42 +0200 |
commit | 75899594c35e0bd055cedd40f695fd6583a6b2dd (patch) | |
tree | f433bcfdd3b66925186409912fa466ff1d53d424 /ui/src/main/res/values | |
parent | 4944762d7c167da620b92914350421e5fce493be (diff) |
ui: use real M3 themeing on TV
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/res/values')
-rw-r--r-- | ui/src/main/res/values/attrs.xml | 4 | ||||
-rw-r--r-- | ui/src/main/res/values/colors.xml (renamed from ui/src/main/res/values/md_colors.xml) | 0 | ||||
-rw-r--r-- | ui/src/main/res/values/styles.xml | 7 | ||||
-rw-r--r-- | ui/src/main/res/values/tv_colors.xml | 8 | ||||
-rw-r--r-- | ui/src/main/res/values/tv_styles.xml | 31 |
5 files changed, 10 insertions, 40 deletions
diff --git a/ui/src/main/res/values/attrs.xml b/ui/src/main/res/values/attrs.xml index 903ac008..9ba1eea5 100644 --- a/ui/src/main/res/values/attrs.xml +++ b/ui/src/main/res/values/attrs.xml @@ -4,4 +4,8 @@ <attr name="state_multiselected" format="boolean" /> <attr name="colorMultiselectActiveBackground" format="reference|color" /> </declare-styleable> + <declare-styleable name="TvCardView"> + <attr name="state_isUp" format="boolean" /> + <attr name="state_isDeleting" format="boolean" /> + </declare-styleable> </resources> diff --git a/ui/src/main/res/values/md_colors.xml b/ui/src/main/res/values/colors.xml index 65e82389..65e82389 100644 --- a/ui/src/main/res/values/md_colors.xml +++ b/ui/src/main/res/values/colors.xml diff --git a/ui/src/main/res/values/styles.xml b/ui/src/main/res/values/styles.xml index 74b4e80c..ea36784b 100644 --- a/ui/src/main/res/values/styles.xml +++ b/ui/src/main/res/values/styles.xml @@ -12,7 +12,7 @@ </style> <!-- Various additional API-specific features in values-v*/styles.xml --> - <style name="AppTheme" parent="AppThemeBase"/> + <style name="AppTheme" parent="AppThemeBase" /> <style name="WireGuardTheme.MaterialCardView" parent="Widget.Material3.CardView.Elevated"> <item name="cornerRadius">4dp</item> @@ -36,4 +36,9 @@ <item name="android:windowEnterAnimation">@android:anim/fade_in</item> <item name="android:windowExitAnimation">@android:anim/fade_out</item> </style> + + <style name="TvTheme" parent="AppTheme"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + </style> </resources> diff --git a/ui/src/main/res/values/tv_colors.xml b/ui/src/main/res/values/tv_colors.xml deleted file mode 100644 index dc4e6a01..00000000 --- a/ui/src/main/res/values/tv_colors.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="tv_primary_color">#ff212121</color> - <color name="tv_secondary_dark_color">#ff0059c1</color> - <color name="tv_card_background">@color/tv_primary_color</color> - <color name="tv_card_delete_background">#b00020</color> - <color name="tv_list_multiselect_background">#ffeeeeee</color> -</resources> diff --git a/ui/src/main/res/values/tv_styles.xml b/ui/src/main/res/values/tv_styles.xml deleted file mode 100644 index 07565a72..00000000 --- a/ui/src/main/res/values/tv_styles.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources xmlns:android="http://schemas.android.com/apk/res/android"> - - <style name="TvTheme" parent="Theme.Material3.DayNight.NoActionBar"> - <item name="colorPrimary">@color/tv_primary_color</item> - <item name="colorOnPrimary">#fffafafa</item> - <item name="colorPrimaryDark">@color/tv_primary_color</item> - <item name="colorPrimaryVariant">#ff484848</item> - <item name="colorSecondary">#ff4285f4</item> - <item name="colorOnSecondary">#ff0059c1</item> - <item name="colorSurface">@color/tv_primary_color</item> - <item name="colorOnSurface">#fffafafa</item> - <item name="colorMultiselectActiveBackground">@color/tv_list_multiselect_background</item> - <item name="colorControlNormal">#fffafafa</item> - <item name="elevationOverlayEnabled">false</item> - <item name="android:statusBarColor">@color/tv_primary_color</item> - <item name="android:windowBackground">@color/tv_primary_color</item> - <item name="alertDialogTheme">@style/TvTheme.Dialog</item> - <item name="materialAlertDialogTheme">@style/TvTheme.Dialog</item> - <item name="materialCardViewStyle">@style/TvTheme.MaterialCardView</item> - </style> - - <style name="TvTheme.Dialog" parent="Theme.Material3.DayNight.Dialog.Alert"> - <item name="android:windowBackground">?attr/colorSurface</item> - </style> - - <style name="TvTheme.MaterialCardView" parent="Widget.Material3.CardView.Elevated"> - <item name="cornerRadius">4dp</item> - <item name="contentPadding">8dp</item> - </style> -</resources> |