1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Reordered theme dialog

This commit is contained in:
M66B 2021-01-19 19:42:07 +01:00
parent 09f549694d
commit 66c23ea20c
2 changed files with 32 additions and 32 deletions

View file

@ -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();

View file

@ -49,14 +49,6 @@
android:text="@string/title_setup_theme_blue_orange"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeYellowPurple"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_yellow_purple"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeRedGreen"
android:layout_width="wrap_content"
@ -65,6 +57,14 @@
android:text="@string/title_setup_theme_red_green"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeYellowPurple"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_yellow_purple"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeGrey"
android:layout_width="wrap_content"