From 66c23ea20cc6456362b464048a3d6b2c1a89c757 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 19 Jan 2021 19:42:07 +0100 Subject: [PATCH] Reordered theme dialog --- .../faircode/email/FragmentDialogTheme.java | 48 +++++++++---------- app/src/main/res/layout/dialog_theme.xml | 16 +++---- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java b/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java index 6dab6c7c61..068ff0535b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java @@ -31,8 +31,8 @@ public class FragmentDialogTheme extends FragmentDialogBase { boolean grey = (checkedId == R.id.rbThemeGrey); boolean colored = (grey || checkedId == R.id.rbThemeBlueOrange || - checkedId == R.id.rbThemeYellowPurple || - checkedId == R.id.rbThemeRedGreen); + checkedId == R.id.rbThemeRedGreen || + checkedId == R.id.rbThemeYellowPurple); int optionId = rgThemeOptions.getCheckedRadioButtonId(); swReverse.setEnabled(colored && !grey); @@ -131,18 +131,6 @@ public class FragmentDialogTheme extends FragmentDialogBase { 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": @@ -155,6 +143,18 @@ public class FragmentDialogTheme extends FragmentDialogBase { case "green_red_black": rgTheme.check(R.id.rbThemeRedGreen); 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 "grey_system": case "grey_light": case "grey_dark": @@ -199,16 +199,6 @@ public class FragmentDialogTheme extends FragmentDialogBase { (reverse ? "orange_blue" : "blue_orange") + (black ? "_black" : dark ? "_dark" : "_light")).apply(); break; - case R.id.rbThemeYellowPurple: - if (system) - editor.putString("theme", - (reverse ? "purple_yellow_system" : "yellow_purple_system") + - (black ? "_black" : "")).apply(); - else - editor.putString("theme", - (reverse ? "purple_yellow" : "yellow_purple") + - (black ? "_black" : dark ? "_dark" : "_light")).apply(); - break; case R.id.rbThemeRedGreen: if (system) editor.putString("theme", @@ -219,6 +209,16 @@ public class FragmentDialogTheme extends FragmentDialogBase { (reverse ? "green_red" : "red_green") + (black ? "_black" : dark ? "_dark" : "_light")).apply(); break; + case R.id.rbThemeYellowPurple: + if (system) + editor.putString("theme", + (reverse ? "purple_yellow_system" : "yellow_purple_system") + + (black ? "_black" : "")).apply(); + else + editor.putString("theme", + (reverse ? "purple_yellow" : "yellow_purple") + + (black ? "_black" : dark ? "_dark" : "_light")).apply(); + break; case R.id.rbThemeGrey: if (system) editor.putString("theme", "grey_system").apply(); diff --git a/app/src/main/res/layout/dialog_theme.xml b/app/src/main/res/layout/dialog_theme.xml index 1d316efd21..ad1e2ca5be 100644 --- a/app/src/main/res/layout/dialog_theme.xml +++ b/app/src/main/res/layout/dialog_theme.xml @@ -49,14 +49,6 @@ android:text="@string/title_setup_theme_blue_orange" android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> - - + +