styles: Use Appcompat instead of MaterialComponents in order to avoid various issues
Fixes the AppBar being black in settings and emulation when using the dark theme. (Dolphin does the same.) Also cleans up our styles a bit.
This commit is contained in:
parent
2d71c8abef
commit
d11cc1d695
@ -28,7 +28,7 @@
|
||||
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.ui.main.MainActivity"
|
||||
android:theme="@style/Citra">
|
||||
android:theme="@style/CitraBase">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
<intent-filter>
|
||||
@ -41,13 +41,13 @@
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.features.settings.ui.SettingsActivity"
|
||||
android:configChanges="orientation|screenSize|uiMode"
|
||||
android:theme="@style/CitraSettings"
|
||||
android:theme="@style/CitraSettingsBase"
|
||||
android:label="@string/preferences_settings"/>
|
||||
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.activities.EmulationActivity"
|
||||
android:resizeableActivity="false"
|
||||
android:theme="@style/CitraEmulation"
|
||||
android:theme="@style/CitraEmulationBase"
|
||||
android:launchMode="singleTop"/>
|
||||
|
||||
<activity
|
||||
|
@ -160,7 +160,7 @@ public final class EmulationActivity extends AppCompatActivity {
|
||||
// Set these options now so that the SurfaceView the game renders into is the right size.
|
||||
enableFullscreenImmersive();
|
||||
|
||||
setTheme(R.style.CitraEmulation);
|
||||
setTheme(R.style.CitraEmulationBase);
|
||||
|
||||
setContentView(R.layout.activity_emulation);
|
||||
|
||||
|
@ -2,12 +2,13 @@
|
||||
<resources>
|
||||
|
||||
<!-- Inherit from the material theme -->
|
||||
<style name="CitraBase" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="CitraBase" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!-- Main theme colors -->
|
||||
<!-- 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>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
@ -18,23 +19,14 @@
|
||||
</style>
|
||||
|
||||
<!-- Same as above, but use default action bar, and mandate margins. -->
|
||||
<style name="CitraSettingsBase" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<style name="CitraSettingsBase" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Citra" parent="CitraBase">
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
</style>
|
||||
|
||||
<style name="CitraSettings" parent="CitraSettingsBase">
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
</style>
|
||||
|
||||
<!-- Themes for Dialogs -->
|
||||
|
||||
<!-- Inherit from the Base Citra Dialog Theme -->
|
||||
<style name="CitraEmulationBase" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<style name="CitraEmulationBase" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
@ -47,11 +39,6 @@
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
</style>
|
||||
|
||||
<!-- Inherit from the Base Citra Emulation Theme -->
|
||||
<style name="CitraEmulation" parent="CitraEmulationBase">
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
</style>
|
||||
|
||||
<!-- Inherit from a base file picker theme that handles day/night -->
|
||||
<style name="FilePickerTheme" parent="FilePickerBaseTheme">
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
@ -69,7 +56,7 @@
|
||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/citra_orange</item>
|
||||
<item name="colorPrimaryDark">@color/citra_orange_dark</item>
|
||||
<item name="colorAccent">@color/citra_accent</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user