mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 10:25:51 +03:00
Tweak theming default values and fix login theme
Same theme for both light and dark theme for easier login screen theming
This commit is contained in:
parent
22148370cb
commit
68c03b79af
9 changed files with 21 additions and 15 deletions
|
@ -16,7 +16,7 @@ object BubbleThemeUtils {
|
|||
|
||||
fun getBubbleStyle(context: Context): String {
|
||||
if (mBubbleStyle == "") {
|
||||
mBubbleStyle = PreferenceManager.getDefaultSharedPreferences(context).getString(BUBBLE_STYLE_KEY, BUBBLE_STYLE_START)!!
|
||||
mBubbleStyle = PreferenceManager.getDefaultSharedPreferences(context).getString(BUBBLE_STYLE_KEY, BUBBLE_STYLE_BOTH)!!
|
||||
}
|
||||
return mBubbleStyle
|
||||
}
|
||||
|
|
|
@ -61,8 +61,8 @@ object ThemeUtils {
|
|||
fun getApplicationTheme(context: Context): String {
|
||||
val currentNightMode = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||
return when (currentNightMode) {
|
||||
Configuration.UI_MODE_NIGHT_YES -> PreferenceManager.getDefaultSharedPreferences(context).getString(APPLICATION_DARK_THEME_KEY, THEME_DARK_VALUE)!!
|
||||
else -> PreferenceManager.getDefaultSharedPreferences(context).getString(APPLICATION_THEME_KEY, THEME_LIGHT_VALUE)!!
|
||||
Configuration.UI_MODE_NIGHT_YES -> PreferenceManager.getDefaultSharedPreferences(context).getString(APPLICATION_DARK_THEME_KEY, THEME_SC_DARK_COLORED_VALUE)!!
|
||||
else -> PreferenceManager.getDefaultSharedPreferences(context).getString(APPLICATION_THEME_KEY, THEME_SC_DARK_COLORED_VALUE)!!
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
android:width="1.2dp"
|
||||
android:color="?colorAccent" />
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
<solid android:color="@color/black" />
|
||||
|
||||
</shape>
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
<stroke
|
||||
android:width="1.2dp"
|
||||
android:color="#E7E7E7" />
|
||||
android:color="#212121" />
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
<solid android:color="@color/black" />
|
||||
|
||||
</shape>
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
<stroke
|
||||
android:width="1.2dp"
|
||||
android:color="@color/riotx_accent" />
|
||||
android:color="@color/accent_sc" />
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
<solid android:color="@color/black" />
|
||||
|
||||
</shape>
|
|
@ -61,6 +61,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_logo_matrix_org"
|
||||
android:tint="@color/white"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginServerChoiceMatrixOrgText"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -101,6 +102,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_logo_modular"
|
||||
android:tint="@color/white"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginServerChoiceModularText"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -53,12 +53,12 @@
|
|||
<item name="layout_constraintStart_toStartOf">parent</item>
|
||||
</style>
|
||||
|
||||
<style name="Style.Vector.Login.Button" parent="VectorButtonStyle">
|
||||
<style name="Style.Vector.Login.Button" parent="VectorButtonStyle.SC">
|
||||
<item name="android:minHeight">52dp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Style.Vector.Login.Button.Outlined" parent="VectorButtonStyleOutlined">
|
||||
<style name="Style.Vector.Login.Button.Outlined" parent="VectorButtonStyleOutlined.SC">
|
||||
<item name="android:minHeight">52dp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
|
|
@ -34,4 +34,8 @@
|
|||
<item name="android:textColorLink">@color/riotx_links</item>
|
||||
</style>
|
||||
|
||||
<style name="VectorButtonStyleOutlined.SC">
|
||||
<item name="strokeColor">@color/accent_sc</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:title="@string/settings_interface_language" />
|
||||
|
||||
<im.vector.riotx.core.preference.VectorListPreference
|
||||
android:defaultValue="light"
|
||||
android:defaultValue="sc_dark_colored"
|
||||
android:entries="@array/theme_entries"
|
||||
android:entryValues="@array/theme_values"
|
||||
android:key="APPLICATION_THEME_KEY"
|
||||
|
@ -22,7 +22,7 @@
|
|||
app:iconSpaceReserved="false" />
|
||||
|
||||
<im.vector.riotx.core.preference.VectorListPreference
|
||||
android:defaultValue="dark"
|
||||
android:defaultValue="sc_dark_colored"
|
||||
android:entries="@array/theme_entries"
|
||||
android:entryValues="@array/theme_values"
|
||||
android:key="APPLICATION_DARK_THEME_KEY"
|
||||
|
@ -31,7 +31,7 @@
|
|||
app:iconSpaceReserved="false" />
|
||||
|
||||
<im.vector.riotx.core.preference.VectorListPreference
|
||||
android:defaultValue="start"
|
||||
android:defaultValue="both"
|
||||
android:entries="@array/bubble_style_entries"
|
||||
android:entryValues="@array/bubble_style_values"
|
||||
android:key="BUBBLE_STYLE_KEY"
|
||||
|
|
Loading…
Reference in a new issue