mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
Begin style migration to Material3
Use large card view rounded corner guidelines Fix action bar theming Needed to import android back button clip art to fix material 3 theming issue. The DolphinSettingsBase style used to inherit from the Theme.MaterialComponents.DayNight.DarkActionBar theme which would provide the light text and icons but this is no longer available with Material 3. Fit box art more snugly in CardView Change card height to match cover art Add padding to top of games list recyclerview
This commit is contained in:
parent
1a5a52c00c
commit
fde39b455c
12
Source/Android/app/src/main/res/drawable-anydpi/ic_back.xml
Normal file
12
Source/Android/app/src/main/res/drawable-anydpi/ic_back.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#FFFFFF"
|
||||
android:alpha="1"
|
||||
android:autoMirrored="true">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
||||
</vector>
|
BIN
Source/Android/app/src/main/res/drawable-hdpi/ic_back.png
Normal file
BIN
Source/Android/app/src/main/res/drawable-hdpi/ic_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
BIN
Source/Android/app/src/main/res/drawable-mdpi/ic_back.png
Normal file
BIN
Source/Android/app/src/main/res/drawable-mdpi/ic_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 B |
BIN
Source/Android/app/src/main/res/drawable-xhdpi/ic_back.png
Normal file
BIN
Source/Android/app/src/main/res/drawable-xhdpi/ic_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 203 B |
BIN
Source/Android/app/src/main/res/drawable-xxhdpi/ic_back.png
Normal file
BIN
Source/Android/app/src/main/res/drawable-xxhdpi/ic_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 306 B |
@ -1,13 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
tools:layout_width="160dp"
|
||||
android:layout_height="270dp"
|
||||
android:transitionName="card_game"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:layout_width="160dp"
|
||||
android:layout_height="249dp"
|
||||
android:transitionName="card_game"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
app:cardCornerRadius="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -15,7 +15,8 @@
|
||||
android:id="@+id/grid_games"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/card_game"/>
|
||||
tools:listitem="@layout/card_game"
|
||||
android:paddingTop="8dp"/>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Inherit from the material theme -->
|
||||
<style name="DolphinBase" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="DolphinBase" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Main theme colors -->
|
||||
<!-- Branding color for the app bar -->
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
@ -19,21 +19,23 @@
|
||||
</style>
|
||||
|
||||
<!-- Same as above, but use default action bar, and mandate margins. -->
|
||||
<style name="DolphinSettingsBase" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<style name="DolphinSettingsBase" parent="Theme.Material3.DayNight">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
<item name="titleTextColor">@android:color/white</item>
|
||||
<item name="homeAsUpIndicator">@drawable/ic_back</item>
|
||||
</style>
|
||||
|
||||
<!-- Themes for Dialogs -->
|
||||
|
||||
<style name="DolphinDialogBase" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
|
||||
<style name="DolphinDialogBase" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="DolphinEmulationBase" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="DolphinEmulationBase" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
@ -68,7 +70,7 @@
|
||||
<item name="browseTitleViewLayout">@layout/titleview</item>
|
||||
</style>
|
||||
|
||||
<style name="InGameMenuOption" parent="Widget.MaterialComponents.Button.TextButton">
|
||||
<style name="InGameMenuOption" parent="Widget.Material3.Button.TextButton">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:fontFamily">sans-serif-condensed</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
@ -102,10 +104,10 @@
|
||||
|
||||
<!-- If you want to set a specific toolbar theme, do it here -->
|
||||
|
||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.MaterialComponents.Dark.ActionBar</item>
|
||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.Material3.Dark.ActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user