Fixed original view background color

This commit is contained in:
M66B 2021-09-18 07:21:48 +02:00
parent 97d46e5c03
commit 31716d8221
1 changed files with 3 additions and 7 deletions

View File

@ -109,17 +109,13 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
WebSettings settings = getSettings();
boolean forced = false;
boolean dark = Helper.isDarkTheme(context);
if (html_dark &&
WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK)) {
WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK))
WebSettingsCompat.setForceDark(settings, dark ? FORCE_DARK_ON : FORCE_DARK_OFF);
forced = true;
}
setBackgroundColor(dark && !forced
? Color.WHITE
: ColorUtils.setAlphaComponent(Color.WHITE, 127));
if (!dark)
setBackgroundColor(ColorUtils.setAlphaComponent(Color.WHITE, 127));
float fontSize = 16f /* Default */ * message_zoom / 100f;
if (zoom == 0 /* small */)