Added option for default light original view

This commit is contained in:
M66B
2021-09-21 14:58:54 +02:00
parent c52968bd48
commit 8ce323d844
7 changed files with 37 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ public class FragmentDialogTheme extends FragmentDialogBase {
private SwitchCompat swReverse;
private RadioGroup rgThemeOptions;
private SwitchCompat swBlack;
private SwitchCompat swHtmlLight;
private TextView tvSystem;
private TextView tvMore;
@@ -45,6 +46,8 @@ public class FragmentDialogTheme extends FragmentDialogBase {
swBlack.setEnabled(colored && !grey && !solarized && optionId != R.id.rbThemeLight);
swHtmlLight.setEnabled(!colored || optionId != R.id.rbThemeLight);
tvSystem.setEnabled(colored && optionId == R.id.rbThemeSystem);
}
@@ -56,6 +59,7 @@ public class FragmentDialogTheme extends FragmentDialogBase {
swReverse = dview.findViewById(R.id.swReverse);
rgThemeOptions = dview.findViewById(R.id.rgThemeOptions);
swBlack = dview.findViewById(R.id.swBlack);
swHtmlLight = dview.findViewById(R.id.swHtmlLight);
tvSystem = dview.findViewById(R.id.tvSystem);
tvMore = dview.findViewById(R.id.tvMore);
@@ -109,6 +113,9 @@ public class FragmentDialogTheme extends FragmentDialogBase {
swBlack.setChecked(black);
boolean default_light = prefs.getBoolean("default_light", false);
swHtmlLight.setChecked(default_light);
switch (theme) {
case "light":
case "dark":
@@ -244,6 +251,8 @@ public class FragmentDialogTheme extends FragmentDialogBase {
editor.putString("theme", "black_and_white").apply();
}
editor.putBoolean("default_light", swHtmlLight.isChecked());
editor.apply();
}
})