1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-30 19:56:10 +00:00

Force light background

This commit is contained in:
M66B 2022-01-29 18:57:10 +01:00
parent 1e513eaa3d
commit 040f1b921d

View file

@ -118,9 +118,10 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
WebSettings settings = getSettings();
boolean dark = Helper.isDarkTheme(context);
if (WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK))
boolean canForce = WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK);
if (canForce)
WebSettingsCompat.setForceDark(settings, dark && !force_light ? FORCE_DARK_ON : FORCE_DARK_OFF);
setBackgroundColor(Color.TRANSPARENT);
setBackgroundColor(canForce && force_light ? Color.WHITE : Color.TRANSPARENT);
float fontSize = 16f /* Default */ * message_zoom / 100f;
if (zoom == 0 /* small */)