mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
android: Modernize theme system
This commit is contained in:
parent
09780c76aa
commit
18f4ef436d
8 changed files with 130 additions and 94 deletions
|
@ -32,7 +32,7 @@
|
|||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.ui.main.MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/YuzuBase"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:resizeableActivity="false">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
|
@ -46,13 +46,13 @@
|
|||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.features.settings.ui.SettingsActivity"
|
||||
android:configChanges="orientation|screenSize|uiMode"
|
||||
android:theme="@style/YuzuSettingsBase"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:label="@string/preferences_settings"/>
|
||||
|
||||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.activities.EmulationActivity"
|
||||
android:resizeableActivity="false"
|
||||
android:theme="@style/YuzuEmulationBase"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="landscape"/>
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="citra_orange">#272727</color>
|
||||
<color name="citra_orange_dark">#121212</color>
|
||||
<color name="citra_accent">#FEC303</color>
|
||||
|
||||
<color name="view_background">#121212</color>
|
||||
<color name="view_disabled">#3D3D3D</color>
|
||||
<color name="view_text">#FF0000</color>
|
||||
|
||||
<color name="gamelist_divider">#404040</color>
|
||||
|
||||
<color name="header_text">#E0E0E0</color>
|
||||
<color name="header_subtext">#A0A0A0</color>
|
||||
|
||||
<color name="yuzu_logo_text_color">@color/citra_accent</color>
|
||||
</resources>
|
35
src/android/app/src/main/res/values-night/yuzu_colors.xml
Normal file
35
src/android/app/src/main/res/values-night/yuzu_colors.xml
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="yuzu_primary">#FFB4A8</color>
|
||||
<color name="yuzu_onPrimary">#680200</color>
|
||||
<color name="yuzu_primaryContainer">#930300</color>
|
||||
<color name="yuzu_onPrimaryContainer">#FFDAD4</color>
|
||||
<color name="yuzu_secondary">#E7BDB6</color>
|
||||
<color name="yuzu_onSecondary">#442925</color>
|
||||
<color name="yuzu_secondaryContainer">#5D3F3A</color>
|
||||
<color name="yuzu_onSecondaryContainer">#FFDAD4</color>
|
||||
<color name="yuzu_tertiary">#DEC48C</color>
|
||||
<color name="yuzu_onTertiary">#3E2E04</color>
|
||||
<color name="yuzu_tertiaryContainer">#564419</color>
|
||||
<color name="yuzu_onTertiaryContainer">#FBE0A6</color>
|
||||
<color name="yuzu_error">#FFB4AB</color>
|
||||
<color name="yuzu_errorContainer">#93000A</color>
|
||||
<color name="yuzu_onError">#690005</color>
|
||||
<color name="yuzu_onErrorContainer">#FFDAD6</color>
|
||||
<color name="yuzu_background">#201A19</color>
|
||||
<color name="yuzu_onBackground">#EDE0DD</color>
|
||||
<color name="yuzu_surface">#201A19</color>
|
||||
<color name="yuzu_onSurface">#EDE0DD</color>
|
||||
<color name="yuzu_surfaceVariant">#534341</color>
|
||||
<color name="yuzu_onSurfaceVariant">#D8C2BE</color>
|
||||
<color name="yuzu_outline">#A08C89</color>
|
||||
<color name="yuzu_inverseOnSurface">#201A19</color>
|
||||
<color name="yuzu_inverseSurface">#EDE0DD</color>
|
||||
<color name="yuzu_inversePrimary">#BF0500</color>
|
||||
<color name="yuzu_shadow">#000000</color>
|
||||
<color name="yuzu_surfaceTint">#FFB4A8</color>
|
||||
<color name="yuzu_outlineVariant">#534341</color>
|
||||
<color name="yuzu_scrim">#000000</color>
|
||||
|
||||
</resources>
|
11
src/android/app/src/main/res/values-v29/themes.xml
Normal file
11
src/android/app/src/main/res/values-v29/themes.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.V29.Yuzu" parent="Theme.Yuzu">
|
||||
<item name="android:enforceStatusBarContrast">false</item>
|
||||
<item name="android:enforceNavigationBarContrast">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Yuzu.Main" parent="Theme.V29.Yuzu" />
|
||||
|
||||
</resources>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="citra_orange">#FFC303</color>
|
||||
<color name="citra_orange_dark">#FF8D03</color>
|
||||
<color name="citra_accent">#CC7102</color>
|
||||
|
||||
<color name="view_background">#ffffff</color>
|
||||
<color name="view_disabled">#D5D5D5</color>
|
||||
<color name="view_text">#FF0000</color>
|
||||
|
||||
<color name="gamelist_divider">#ffffff</color>
|
||||
|
||||
<color name="header_text">#1C1424</color>
|
||||
<color name="header_subtext">#5C5661</color>
|
||||
|
||||
<color name="yuzu_logo_text_color">@color/header_text</color>
|
||||
</resources>
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Custom button styles -->
|
||||
<style name="InGameMenuOption" parent="Widget.Material3.Button.TextButton">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|
@ -12,61 +13,9 @@
|
|||
<item name="android:paddingRight">32dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Inherit from the material theme -->
|
||||
<style name="YuzuBase" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Main theme colors -->
|
||||
<item name="colorSurface">@color/view_background</item>
|
||||
<item name="colorOnSurface">@color/view_text</item>
|
||||
<!-- Branding color for the app bar -->
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<!-- Darker variant for the status bar and contextual app bars -->
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
|
||||
<item name="titleTextColor">@color/yuzu_logo_text_color</item>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
|
||||
<item name="android:colorControlHighlight">?attr/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<!-- Same as above, but use default action bar, and mandate margins. -->
|
||||
<style name="YuzuSettingsBase" parent="Theme.Material3.DayNight">
|
||||
<item name="colorSurface">@color/view_background</item>
|
||||
<item name="colorOnSurface">@color/view_text</item>
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
</style>
|
||||
|
||||
<!-- Inherit from the Base Citra Dialog Theme -->
|
||||
<style name="YuzuEmulationBase" parent="Theme.Material3.DayNight">
|
||||
<item name="colorSurface">@color/view_background</item>
|
||||
<item name="colorOnSurface">@color/view_text</item>
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="colorSurface">@color/view_background</item>
|
||||
<item name="colorOnSurface">@color/view_text</item>
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
<style name="YuzuSlider" parent="Widget.Material3.Slider">
|
||||
<item name="tickVisible">false</item>
|
||||
<item name="labelBehavior">gone</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
42
src/android/app/src/main/res/values/themes.xml
Normal file
42
src/android/app/src/main/res/values/themes.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Yuzu" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/yuzu_primary</item>
|
||||
<item name="colorOnPrimary">@color/yuzu_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/yuzu_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/yuzu_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/yuzu_secondary</item>
|
||||
<item name="colorOnSecondary">@color/yuzu_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/yuzu_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/yuzu_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/yuzu_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/yuzu_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/yuzu_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/yuzu_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/yuzu_error</item>
|
||||
<item name="colorErrorContainer">@color/yuzu_errorContainer</item>
|
||||
<item name="colorOnError">@color/yuzu_onError</item>
|
||||
<item name="colorOnErrorContainer">@color/yuzu_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/yuzu_background</item>
|
||||
<item name="colorOnBackground">@color/yuzu_onBackground</item>
|
||||
<item name="colorSurface">@color/yuzu_surface</item>
|
||||
<item name="colorOnSurface">@color/yuzu_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/yuzu_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/yuzu_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/yuzu_outline</item>
|
||||
<item name="colorOnSurfaceInverse">@color/yuzu_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/yuzu_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/yuzu_inversePrimary</item>
|
||||
<item name="android:shadowColor">@color/yuzu_shadow</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
|
||||
<item name="sliderStyle">@style/YuzuSlider</item>
|
||||
</style>
|
||||
|
||||
<!-- Trick for API >= 29 specific changes -->
|
||||
<style name="Theme.Yuzu.Main" parent="Theme.Yuzu" />
|
||||
|
||||
</resources>
|
35
src/android/app/src/main/res/values/yuzu_colors.xml
Normal file
35
src/android/app/src/main/res/values/yuzu_colors.xml
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="yuzu_primary">#BF0500</color>
|
||||
<color name="yuzu_onPrimary">#FFFFFF</color>
|
||||
<color name="yuzu_primaryContainer">#FFDAD4</color>
|
||||
<color name="yuzu_onPrimaryContainer">#410100</color>
|
||||
<color name="yuzu_secondary">#775651</color>
|
||||
<color name="yuzu_onSecondary">#FFFFFF</color>
|
||||
<color name="yuzu_secondaryContainer">#FFDAD4</color>
|
||||
<color name="yuzu_onSecondaryContainer">#2C1511</color>
|
||||
<color name="yuzu_tertiary">#6F5C2E</color>
|
||||
<color name="yuzu_onTertiary">#FFFFFF</color>
|
||||
<color name="yuzu_tertiaryContainer">#FBE0A6</color>
|
||||
<color name="yuzu_onTertiaryContainer">#251A00</color>
|
||||
<color name="yuzu_error">#BA1A1A</color>
|
||||
<color name="yuzu_errorContainer">#FFDAD6</color>
|
||||
<color name="yuzu_onError">#FFFFFF</color>
|
||||
<color name="yuzu_onErrorContainer">#410002</color>
|
||||
<color name="yuzu_background">#FFFBFF</color>
|
||||
<color name="yuzu_onBackground">#201A19</color>
|
||||
<color name="yuzu_surface">#FFFBFF</color>
|
||||
<color name="yuzu_onSurface">#201A19</color>
|
||||
<color name="yuzu_surfaceVariant">#F5DDD9</color>
|
||||
<color name="yuzu_onSurfaceVariant">#534341</color>
|
||||
<color name="yuzu_outline">#857370</color>
|
||||
<color name="yuzu_inverseOnSurface">#FBEEEC</color>
|
||||
<color name="yuzu_inverseSurface">#362F2E</color>
|
||||
<color name="yuzu_inversePrimary">#FFB4A8</color>
|
||||
<color name="yuzu_shadow">#000000</color>
|
||||
<color name="yuzu_surfaceTint">#BF0500</color>
|
||||
<color name="yuzu_outlineVariant">#D8C2BE</color>
|
||||
<color name="yuzu_scrim">#000000</color>
|
||||
|
||||
</resources>
|
Loading…
Reference in a new issue