Disable text colors when using black/white theme

pull/184/head
M66B 5 years ago
parent 32a19051b2
commit 83d1707989

@ -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) {

@ -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);

Loading…
Cancel
Save