diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java index 07d09c4c85..987d2ed48d 100644 --- a/app/src/main/java/eu/faircode/email/ActivityBase.java +++ b/app/src/main/java/eu/faircode/email/ActivityBase.java @@ -184,26 +184,50 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc setTheme(night ? R.style.AppThemeBlueOrangeDark : R.style.AppThemeBlueOrangeLight); break; + case "blue_orange_system_black": + setTheme(night + ? R.style.AppThemeBlueOrangeBlack : R.style.AppThemeBlueOrangeLight); + break; case "orange_blue_system": setTheme(night ? R.style.AppThemeOrangeBlueDark : R.style.AppThemeOrangeBlueLight); break; + case "orange_blue_system_black": + setTheme(night + ? R.style.AppThemeOrangeBlueBlack : R.style.AppThemeOrangeBlueLight); + break; case "yellow_purple_system": setTheme(night ? R.style.AppThemeYellowPurpleDark : R.style.AppThemeYellowPurpleLight); break; + case "yellow_purple_system_black": + setTheme(night + ? R.style.AppThemeYellowPurpleBlack : R.style.AppThemeYellowPurpleLight); + break; case "purple_yellow_system": setTheme(night ? R.style.AppThemePurpleYellowDark : R.style.AppThemePurpleYellowLight); break; + case "purple_yellow_system_black": + setTheme(night + ? R.style.AppThemePurpleYellowBlack : R.style.AppThemePurpleYellowLight); + break; case "red_green_system": setTheme(night ? R.style.AppThemeRedGreenDark : R.style.AppThemeRedGreenLight); break; + case "red_green_system_black": + setTheme(night + ? R.style.AppThemeRedGreenBlack : R.style.AppThemeRedGreenLight); + break; case "green_red_system": setTheme(night ? R.style.AppThemeGreenRedDark : R.style.AppThemeGreenRedLight); break; + case "green_red_system_black": + setTheme(night + ? R.style.AppThemeGreenRedBlack : R.style.AppThemeGreenRedLight); + break; case "grey_system": setTheme(night ? R.style.AppThemeGreySteelBlueDark : R.style.AppThemeGreySteelBlueLight); diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java index fc8f3e7e51..a87a1bb29b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java @@ -970,7 +970,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer swReverse.setEnabled(colored); swDark.setEnabled(dark); swBlack.setEnabled(colored && swDark.isChecked()); - swSystem.setEnabled(dark && !swDark.isChecked()); + swSystem.setEnabled(dark && (!swDark.isChecked() || (swBlack.isEnabled() && swBlack.isChecked()))); tvSystem.setEnabled(swSystem.isEnabled() && swSystem.isChecked()); } @@ -1038,7 +1038,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer theme.startsWith("green_red")); boolean dark = theme.endsWith("dark"); boolean black = (!"black".equals(theme) && theme.endsWith("black")); - boolean system = theme.endsWith("system"); + boolean system = (theme.endsWith("system") || theme.endsWith("system_black")); swReverse.setChecked(colored); swDark.setChecked(dark || black); @@ -1050,30 +1050,36 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer case "dark": case "system": case "blue_orange_system": + case "blue_orange_system_black": case "blue_orange_light": case "blue_orange_dark": case "blue_orange_black": case "orange_blue_system": + case "orange_blue_system_black": case "orange_blue_light": case "orange_blue_dark": case "orange_blue_black": rgTheme.check(R.id.rbThemeBlueOrange); break; case "yellow_purple_system": + case "yellow_purple_system_black": case "yellow_purple_light": case "yellow_purple_dark": case "yellow_purple_black": case "purple_yellow_system": + case "purple_yellow_system_black": case "purple_yellow_light": case "purple_yellow_dark": case "purple_yellow_black": rgTheme.check(R.id.rbThemeYellowPurple); break; case "red_green_system": + case "red_green_system_black": case "red_green_light": case "red_green_dark": case "red_green_black": case "green_red_system": + case "green_red_system_black": case "green_red_light": case "green_red_dark": case "green_red_black": @@ -1111,7 +1117,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer case R.id.rbThemeBlueOrange: if (system) prefs.edit().putString("theme", - reverse ? "orange_blue_system" : "blue_orange_system").apply(); + (reverse ? "orange_blue_system" : "blue_orange_system") + + (black ? "_black" : "")).apply(); else prefs.edit().putString("theme", (reverse ? "orange_blue" : "blue_orange") + @@ -1120,7 +1127,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer case R.id.rbThemeYellowPurple: if (system) prefs.edit().putString("theme", - reverse ? "purple_yellow_system" : "yellow_purple_system").apply(); + (reverse ? "purple_yellow_system" : "yellow_purple_system") + + (black ? "_black" : "")).apply(); else prefs.edit().putString("theme", (reverse ? "purple_yellow" : "yellow_purple") + @@ -1129,7 +1137,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer case R.id.rbThemeRedGreen: if (system) prefs.edit().putString("theme", - reverse ? "green_red_system" : "red_green_system").apply(); + (reverse ? "green_red_system" : "red_green_system") + + (black ? "_black" : "")).apply(); else prefs.edit().putString("theme", (reverse ? "green_red" : "red_green") +