Disable text colors when using black/white theme

This commit is contained in:
M66B 2020-08-14 15:12:19 +02:00
parent 32a19051b2
commit 83d1707989
2 changed files with 5 additions and 1 deletions

View File

@ -660,6 +660,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
}
});
String theme = prefs.getString("theme", "light");
swTextColor.setEnabled(!"black_and_white".equals(theme));
swTextSize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View File

@ -318,7 +318,8 @@ public class HtmlHelper {
private static Document sanitize(Context context, Document parsed, boolean view, boolean show_images) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean text_color = (!view || prefs.getBoolean("text_color", true));
String theme = prefs.getString("theme", "light");
boolean text_color = (!view || (prefs.getBoolean("text_color", true) && !"black_and_white".equals(theme)));
boolean text_size = (!view || prefs.getBoolean("text_size", true));
boolean text_font = (!view || prefs.getBoolean("text_font", true));
boolean text_align = prefs.getBoolean("text_align", true);