Change options structure

This commit is contained in:
Sebastián Katzer
2019-02-07 16:42:11 +01:00
parent 13e6d4d941
commit f29b519b90
12 changed files with 147 additions and 114 deletions

View File

@@ -301,7 +301,7 @@ class PrintManager {
boolean jsEnabled = settings.optBoolean("javascript", false);
WebView view = new WebView(context);
WebSettings spec = view.getSettings();
JSONObject style = settings.optJSONObject("style");
JSONObject font = settings.optJSONObject("font");
spec.setDatabaseEnabled(true);
spec.setGeolocationEnabled(true);
@@ -309,9 +309,9 @@ class PrintManager {
spec.setUseWideViewPort(true);
spec.setJavaScriptEnabled(jsEnabled);
if (style != null && style.has("size"))
if (font != null && font.has("size"))
{
spec.setDefaultFixedFontSize(style.optInt("size", 16));
spec.setDefaultFixedFontSize(font.optInt("size", 16));
}
if (SDK_INT >= 21)