Christian Schneppe 2020-11-12 17:51:35 +01:00
parent 1beb37dab7
commit 3d25809f08
No known key found for this signature in database
GPG key ID: F30B8D686B44D87E
6 changed files with 121 additions and 7 deletions

View file

@ -440,7 +440,7 @@ public abstract class XmppActivity extends ActionBarActivity {
}
public boolean unicoloredBG() {
return getBooleanPreference("unicolored_chatbg", R.bool.use_unicolored_chatbg);
return getBooleanPreference("unicolored_chatbg", R.bool.use_unicolored_chatbg) || getThemeColor().equalsIgnoreCase("black");
}
public void setBubbleColor(final View v, final int backgroundColor, final int borderColor) {

View file

@ -98,6 +98,15 @@ public class ThemeHelper {
default:
return dark ? R.style.ConversationsTheme_Grey_Dark : R.style.ConversationsTheme_Grey;
}
case "black":
switch (fontSize) {
case "medium":
return R.style.ConversationsTheme_Black_Dark_Medium;
case "large":
return R.style.ConversationsTheme_Black_Dark_Large;
default:
return R.style.ConversationsTheme_Black_Dark;
}
case "pink":
switch (fontSize) {
case "medium":
@ -175,6 +184,15 @@ public class ThemeHelper {
default:
return dark ? R.style.ConversationsTheme_Grey_Dark_Dialog : R.style.ConversationsTheme_Grey_Dialog;
}
case "black":
switch (fontSize) {
case "medium":
return R.style.ConversationsTheme_Black_Dark_Dialog_Medium;
case "large":
return R.style.ConversationsTheme_Black_Dark_Dialog_Large;
default:
return R.style.ConversationsTheme_Black_Dark_Dialog;
}
case "pink":
switch (fontSize) {
case "medium":
@ -207,6 +225,10 @@ public class ThemeHelper {
case R.style.ConversationsTheme_Grey_Dark:
case R.style.ConversationsTheme_Grey_Dark_Large:
case R.style.ConversationsTheme_Grey_Dark_Medium:
//black
case R.style.ConversationsTheme_Black_Dark:
case R.style.ConversationsTheme_Black_Dark_Large:
case R.style.ConversationsTheme_Black_Dark_Medium:
//pink
case R.style.ConversationsTheme_Pink_Dark:
case R.style.ConversationsTheme_Pink_Dark_Large:
@ -237,6 +259,8 @@ public class ThemeHelper {
return dark ? ContextCompat.getColorStateList(context, R.color.white70) : ContextCompat.getColorStateList(context, R.color.darkorange);
case "grey":
return dark ? ContextCompat.getColorStateList(context, R.color.white70) : ContextCompat.getColorStateList(context, R.color.darkgrey);
case "black":
return ContextCompat.getColorStateList(context, R.color.white70);
case "pink":
return dark ? ContextCompat.getColorStateList(context, R.color.white70) : ContextCompat.getColorStateList(context, R.color.darkpink);
default:
@ -262,6 +286,8 @@ public class ThemeHelper {
return R.color.primary_orange;
case "grey":
return R.color.primary_grey;
case "black":
return R.color.primary_black;
case "pink":
return R.color.primary_pink;
default:
@ -297,6 +323,8 @@ public class ThemeHelper {
return dark ? getMessageTextColor(context, dark, false) : ContextCompat.getColor(context, R.color.darkorange);
case "grey":
return dark ? getMessageTextColor(context, dark, false) : ContextCompat.getColor(context, R.color.darkgrey);
case "black":
return ContextCompat.getColor(context, R.color.darkblack);
case "pink":
return dark ? getMessageTextColor(context, dark, false) : ContextCompat.getColor(context, R.color.darkpink);
default:

View file

@ -15,6 +15,7 @@
<item>@string/pref_theme_blue</item>
<item>@string/pref_theme_orange</item>
<item>@string/pref_theme_grey</item>
<item>@string/pref_theme_black</item>
<item>@string/pref_theme_pink</item>
</string-array>
<string-array name="themecolor_values">
@ -22,6 +23,7 @@
<item>blue</item>
<item>orange</item>
<item>grey</item>
<item>black</item>
<item>pink</item>
</string-array>
@ -152,7 +154,4 @@
<item>610</item>
<item>2584</item>
</string-array>
<string name="pref_theme_blabber">blabber.im</string>
<string name="pref_theme_grey">Grey</string>
<string name="pref_theme_pink">Pink</string>
</resources>

View file

@ -28,6 +28,12 @@
<color name="accent_grey">#ff999999</color>
<color name="accent_light_grey">#1a999999</color>
<!-- black theme -->
<color name="primary_black">#ff000000</color>
<color name="primary_dark_black">#ff000000</color>
<color name="accent_black">#ffff9843</color>
<color name="accent_light_black">#1aff9843</color>
<!-- pink theme -->
<color name="primary_pink">#ffff93e4</color>
<color name="primary_dark_pink">#ffe584cd</color>
@ -69,7 +75,11 @@
<color name="middlegrey">#ff727272</color> <!-- dark theme other -->
<color name="darkgrey">#ff444444</color> <!-- dark theme me -->
<!-- grey theme -->
<!-- black theme -->
<color name="middleblack">#ff323232</color> <!-- dark theme other -->
<color name="darkblack">#ff191919</color> <!-- dark theme me -->
<!-- pink theme -->
<color name="lightpink">#fffff4fc</color> <!-- light theme other -->
<color name="lightpink2">#ffffd3f4</color> <!-- light theme me -->
<color name="middlepink">#ff7f4972</color> <!-- dark theme other -->

View file

@ -978,6 +978,10 @@
<string name="ask_for_writeaccess">Please ask for write access</string>
<string name="pref_theme_blue">Blue</string>
<string name="pref_theme_orange">Orange</string>
<string name="pref_theme_blabber">blabber.im</string>
<string name="pref_theme_grey">Grey</string>
<string name="pref_theme_pink">Pink</string>
<string name="pref_theme_black">Black (AMOLED)</string>
<string name="pref_theme_color_options_summary">Select the theme color palette</string>
<string name="pref_theme_color_options">Theme color</string>
<string name="magic_create_text_on_x">You have been invited to %1$s. We will guide you through the process of creating an account.\nWhen picking %1$s as a provider you will be able to communicate with users of other providers by giving them your full XMPP address.</string>

View file

@ -6,7 +6,8 @@
2. blabber
3. orange
4. grey
5. pink
5. black
6. pink
-->
<!-- fullscreen -->
@ -909,7 +910,79 @@
<item name="TextSizeHeadline">22sp</item>
</style>
<!-- 5. pink -->
<!-- 5. black -->
<!-- black theme -->
<style name="ConversationsTheme.Black.Dark" parent="ConversationsTheme.Dark">
<item name="colorPrimary">@color/primary_black</item>
<item name="colorPrimaryDark">@color/primary_dark_black</item>
<item name="colorAccent">@color/accent_black</item>
<item name="colorAccentLight">@color/accent_light_black</item>
<item name="color_background_primary">@color/primary_black</item>
<item name="color_background_secondary">@color/primary_black</item>
<item name="color_background_tertiary">@color/primary_black</item>
<item name="colorControlNormal">@color/accent_black</item>
<item name="colorControlActivated">@color/accent_black</item>
<item name="color_bubble_light">@color/middleblack</item>
<item name="color_bubble_dark">@color/darkblack</item>
<item name="color_bubble_date">@color/lightgreen</item>
<item name="color_bubble_warning">@color/lightred</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">@color/accent_black</item>
</style>
<!-- black dialog -->
<style name="ConversationsTheme.Black.Dark.Dialog" parent="ConversationsTheme.Dark.Dialog">
<item name="colorPrimary">@color/primary_black</item>
<item name="colorPrimaryDark">@color/primary_dark_black</item>
<item name="colorAccent">@color/accent_black</item>
<item name="colorAccentLight">@color/accent_light_black</item>
</style>
<!-- black dialog medium font -->
<style name="ConversationsTheme.Black.Dark.Dialog.Medium" parent="ConversationsTheme.Black.Dark.Dialog">
<item name="TextSizeBody2">16sp</item>
<item name="TextSizeDisplay2">51sp</item>
</style>
<!-- black dialog large font -->
<style name="ConversationsTheme.Black.Dark.Dialog.Large" parent="ConversationsTheme.Black.Dark.Dialog">
<item name="TextSizeBody2">18sp</item>
<item name="TextSizeTitle">56sp</item>
</style>
<!-- black medium font -->
<style name="ConversationsTheme.Black.Dark.Medium" parent="ConversationsTheme.Black.Dark">
<item name="TextSizeCaption">14sp</item>
<item name="TextSizeBody1">16sp</item>
<item name="TextSizeBody2">16sp</item>
<item name="TextSizeSubhead">18sp</item>
<item name="TextSizeTitle">22sp</item>
<item name="TextSizeInput">18sp</item>
<item name="TextSeparation">6sp</item>
<item name="IconSize">20sp</item>
<item name="TextSizeInfo">14sp</item>
<item name="TextSizeBody">16sp</item>
<item name="TextSizeHeadline">20sp</item>
</style>
<!-- black large font -->
<style name="ConversationsTheme.Black.Dark.Large" parent="ConversationsTheme.Black.Dark">
<item name="TextSizeCaption">16sp</item>
<item name="TextSizeBody1">18sp</item>
<item name="TextSizeBody2">18sp</item>
<item name="TextSizeSubhead">20sp</item>
<item name="TextSizeTitle">24sp</item>
<item name="TextSizeInput">20sp</item>
<item name="TextSeparation">7sp</item>
<item name="IconSize">22sp</item>
<item name="TextSizeInfo">16sp</item>
<item name="TextSizeBody">18sp</item>
<item name="TextSizeHeadline">22sp</item>
</style>
<!-- 6. pink -->
<!-- pink theme -->
<style name="ConversationsTheme.Pink" parent="ConversationsTheme">
<item name="colorPrimary">@color/primary_pink</item>