mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Reordered theme dialog
This commit is contained in:
parent
09f549694d
commit
66c23ea20c
2 changed files with 32 additions and 32 deletions
|
@ -31,8 +31,8 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
||||||
boolean grey = (checkedId == R.id.rbThemeGrey);
|
boolean grey = (checkedId == R.id.rbThemeGrey);
|
||||||
boolean colored = (grey ||
|
boolean colored = (grey ||
|
||||||
checkedId == R.id.rbThemeBlueOrange ||
|
checkedId == R.id.rbThemeBlueOrange ||
|
||||||
checkedId == R.id.rbThemeYellowPurple ||
|
checkedId == R.id.rbThemeRedGreen ||
|
||||||
checkedId == R.id.rbThemeRedGreen);
|
checkedId == R.id.rbThemeYellowPurple);
|
||||||
int optionId = rgThemeOptions.getCheckedRadioButtonId();
|
int optionId = rgThemeOptions.getCheckedRadioButtonId();
|
||||||
|
|
||||||
swReverse.setEnabled(colored && !grey);
|
swReverse.setEnabled(colored && !grey);
|
||||||
|
@ -131,18 +131,6 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
||||||
case "orange_blue_black":
|
case "orange_blue_black":
|
||||||
rgTheme.check(R.id.rbThemeBlueOrange);
|
rgTheme.check(R.id.rbThemeBlueOrange);
|
||||||
break;
|
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":
|
||||||
case "red_green_system_black":
|
case "red_green_system_black":
|
||||||
case "red_green_light":
|
case "red_green_light":
|
||||||
|
@ -155,6 +143,18 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
||||||
case "green_red_black":
|
case "green_red_black":
|
||||||
rgTheme.check(R.id.rbThemeRedGreen);
|
rgTheme.check(R.id.rbThemeRedGreen);
|
||||||
break;
|
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_system":
|
||||||
case "grey_light":
|
case "grey_light":
|
||||||
case "grey_dark":
|
case "grey_dark":
|
||||||
|
@ -199,16 +199,6 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
||||||
(reverse ? "orange_blue" : "blue_orange") +
|
(reverse ? "orange_blue" : "blue_orange") +
|
||||||
(black ? "_black" : dark ? "_dark" : "_light")).apply();
|
(black ? "_black" : dark ? "_dark" : "_light")).apply();
|
||||||
break;
|
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:
|
case R.id.rbThemeRedGreen:
|
||||||
if (system)
|
if (system)
|
||||||
editor.putString("theme",
|
editor.putString("theme",
|
||||||
|
@ -219,6 +209,16 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
||||||
(reverse ? "green_red" : "red_green") +
|
(reverse ? "green_red" : "red_green") +
|
||||||
(black ? "_black" : dark ? "_dark" : "_light")).apply();
|
(black ? "_black" : dark ? "_dark" : "_light")).apply();
|
||||||
break;
|
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:
|
case R.id.rbThemeGrey:
|
||||||
if (system)
|
if (system)
|
||||||
editor.putString("theme", "grey_system").apply();
|
editor.putString("theme", "grey_system").apply();
|
||||||
|
|
|
@ -49,14 +49,6 @@
|
||||||
android:text="@string/title_setup_theme_blue_orange"
|
android:text="@string/title_setup_theme_blue_orange"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
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
|
<RadioButton
|
||||||
android:id="@+id/rbThemeRedGreen"
|
android:id="@+id/rbThemeRedGreen"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -65,6 +57,14 @@
|
||||||
android:text="@string/title_setup_theme_red_green"
|
android:text="@string/title_setup_theme_red_green"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
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
|
<RadioButton
|
||||||
android:id="@+id/rbThemeGrey"
|
android:id="@+id/rbThemeGrey"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
Loading…
Reference in a new issue