mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Added option for default light original view
This commit is contained in:
@@ -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();
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user