Make both dark and light themes work for login

-> Allows us to use SC light theme for default theme again
- Also tweak default dark theme
This commit is contained in:
SpiritCroc 2020-07-20 15:38:06 +02:00
parent 3e57e4bec0
commit efd8a4d88b
4 changed files with 6 additions and 18 deletions

View File

@ -104,7 +104,7 @@ object ThemeUtils {
*/ */
fun getApplicationLightTheme(context: Context): String { fun getApplicationLightTheme(context: Context): String {
return PreferenceManager.getDefaultSharedPreferences(context) return PreferenceManager.getDefaultSharedPreferences(context)
.getString(APPLICATION_THEME_KEY, THEME_SC_DARK_COLORED_VALUE) ?: THEME_SC_DARK_COLORED_VALUE .getString(APPLICATION_THEME_KEY, THEME_SC_LIGHT_VALUE) ?: THEME_SC_LIGHT_VALUE
} }
@ -116,7 +116,7 @@ object ThemeUtils {
*/ */
fun getApplicationDarkTheme(context: Context): String { fun getApplicationDarkTheme(context: Context): String {
return PreferenceManager.getDefaultSharedPreferences(context) return PreferenceManager.getDefaultSharedPreferences(context)
.getString(APPLICATION_DARK_THEME_KEY, THEME_SC_DARK_COLORED_VALUE) ?: THEME_SC_DARK_COLORED_VALUE .getString(APPLICATION_DARK_THEME_KEY, THEME_SC_DARK_VALUE) ?: THEME_SC_DARK_VALUE
} }
/** /**

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="4dp" />
<stroke
android:width="1.2dp"
android:color="?colorAccent" />
<solid android:color="@color/black" />
</shape>

View File

@ -5,8 +5,8 @@
<stroke <stroke
android:width="1.2dp" android:width="1.2dp"
android:color="#212121" /> android:color="?android:textColorSecondary" />
<solid android:color="@color/black" /> <solid android:color="?riotx_background" />
</shape> </shape>

View File

@ -13,7 +13,7 @@
app:fragment="im.vector.riotx.features.settings.locale.LocalePickerFragment" /> app:fragment="im.vector.riotx.features.settings.locale.LocalePickerFragment" />
<im.vector.riotx.core.preference.VectorListPreference <im.vector.riotx.core.preference.VectorListPreference
android:defaultValue="sc_dark_colored" android:defaultValue="sc_light"
android:entries="@array/theme_entries" android:entries="@array/theme_entries"
android:entryValues="@array/theme_values" android:entryValues="@array/theme_values"
android:key="APPLICATION_THEME_KEY" android:key="APPLICATION_THEME_KEY"
@ -22,7 +22,7 @@
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<im.vector.riotx.core.preference.VectorListPreference <im.vector.riotx.core.preference.VectorListPreference
android:defaultValue="sc_dark_colored" android:defaultValue="sc_dark"
android:entries="@array/theme_entries" android:entries="@array/theme_entries"
android:entryValues="@array/theme_values" android:entryValues="@array/theme_values"
android:key="APPLICATION_DARK_THEME_KEY" android:key="APPLICATION_DARK_THEME_KEY"