Reordered theme dialog

pull/193/head
M66B 4 years ago
parent 09f549694d
commit 66c23ea20c

@ -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,24 +199,24 @@ 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: case R.id.rbThemeRedGreen:
if (system) if (system)
editor.putString("theme", editor.putString("theme",
(reverse ? "purple_yellow_system" : "yellow_purple_system") + (reverse ? "green_red_system" : "red_green_system") +
(black ? "_black" : "")).apply(); (black ? "_black" : "")).apply();
else else
editor.putString("theme", editor.putString("theme",
(reverse ? "purple_yellow" : "yellow_purple") + (reverse ? "green_red" : "red_green") +
(black ? "_black" : dark ? "_dark" : "_light")).apply(); (black ? "_black" : dark ? "_dark" : "_light")).apply();
break; break;
case R.id.rbThemeRedGreen: case R.id.rbThemeYellowPurple:
if (system) if (system)
editor.putString("theme", editor.putString("theme",
(reverse ? "green_red_system" : "red_green_system") + (reverse ? "purple_yellow_system" : "yellow_purple_system") +
(black ? "_black" : "")).apply(); (black ? "_black" : "")).apply();
else else
editor.putString("theme", editor.putString("theme",
(reverse ? "green_red" : "red_green") + (reverse ? "purple_yellow" : "yellow_purple") +
(black ? "_black" : dark ? "_dark" : "_light")).apply(); (black ? "_black" : dark ? "_dark" : "_light")).apply();
break; break;
case R.id.rbThemeGrey: case R.id.rbThemeGrey:

@ -50,19 +50,19 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton <RadioButton
android:id="@+id/rbThemeYellowPurple" android:id="@+id/rbThemeRedGreen"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="6dp" android:padding="6dp"
android:text="@string/title_setup_theme_yellow_purple" android:text="@string/title_setup_theme_red_green"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton <RadioButton
android:id="@+id/rbThemeRedGreen" android:id="@+id/rbThemeYellowPurple"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="6dp" android:padding="6dp"
android:text="@string/title_setup_theme_red_green" android:text="@string/title_setup_theme_yellow_purple"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton <RadioButton

Loading…
Cancel
Save