From 67f08c0f28550fbdb73037ba06fc810416e154b0 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Thu, 20 Apr 2017 13:35:02 -0700 Subject: [PATCH] Add a 25% font zoom. Implements https://redmine.stoutner.com/issues/120. --- app/src/main/assets/es/guide_overview.html | 2 +- .../activities/MainWebViewActivity.java | 9 +++++++++ .../main/res/menu/webview_options_menu.xml | 20 ++++++++++++------- app/src/main/res/values-de/strings.xml | 4 +++- app/src/main/res/values-es/strings.xml | 2 ++ app/src/main/res/values-it/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 3 +++ 7 files changed, 33 insertions(+), 9 deletions(-) diff --git a/app/src/main/assets/es/guide_overview.html b/app/src/main/assets/es/guide_overview.html index dacfd63b..85858d09 100644 --- a/app/src/main/assets/es/guide_overview.html +++ b/app/src/main/assets/es/guide_overview.html @@ -47,6 +47,6 @@

Navegador Privado usa el WebView que incorpora Android para interpretar los sitios web. Existen algunas limitaciones en los controles que WebView expone para administrar la configuración de privacidad. Por ejemplo, no es posible habilitar algunos comandos JavaScript mientras que se deshabilitan otros. - En el futuro, Navegador Privado cambiará a un WebView personalizado llamado Webview Privado.

+ En el futuro, Navegador Privado cambiará a un WebView personalizado llamado WebView Privado.

\ No newline at end of file diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 60ff2814..0e6832f9 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -987,6 +987,11 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation // Prepare the font size title and current size menu item. switch (fontSize) { + case 25: + fontSizeTitle = getResources().getString(R.string.font_size) + " - " + getResources().getString(R.string.twenty_five_percent); + selectedFontSizeMenuItem = menu.findItem(R.id.fontSizeTwentyFivePercent); + break; + case 50: fontSizeTitle = getResources().getString(R.string.font_size) + " - " + getResources().getString(R.string.fifty_percent); selectedFontSizeMenuItem = menu.findItem(R.id.fontSizeFiftyPercent); @@ -1191,6 +1196,10 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation Snackbar.make(findViewById(R.id.main_webview), R.string.form_data_deleted, Snackbar.LENGTH_SHORT).show(); return true; + case R.id.fontSizeTwentyFivePercent: + mainWebView.getSettings().setTextZoom(25); + return true; + case R.id.fontSizeFiftyPercent: mainWebView.getSettings().setTextZoom(50); return true; diff --git a/app/src/main/res/menu/webview_options_menu.xml b/app/src/main/res/menu/webview_options_menu.xml index fbdca4d2..c1348515 100644 --- a/app/src/main/res/menu/webview_options_menu.xml +++ b/app/src/main/res/menu/webview_options_menu.xml @@ -84,46 +84,52 @@ + + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 38addd36..d43de584 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -109,7 +109,8 @@ Cookies leeren DOM-Speicher leeren Formulardaten leeren - Schriftgröße + Schriftgröße + 25% 50% 75% 100% @@ -246,6 +247,7 @@ Startseite Standard-Schriftgröße + 25% 50% 75% 100% diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 03bee800..995706d3 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -109,6 +109,7 @@ Eliminar almacenamiento DOM Borrar datos de formulario Tamaño de fuente + 25% 50% 75% 100% @@ -283,6 +284,7 @@ Página de inicio Tamaño de fuente por defecto + 25% 50% 75% 100% diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index fb934a59..46b25df6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -111,6 +111,7 @@ Elimina DOM Storage Elimina dati dei moduli Dimensione Font + 25% 50% 75% 100% @@ -285,6 +286,7 @@ Homepage Dimensione standard carattere + 25% 50% 75% 100% diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0f4d64b3..0366367c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -113,6 +113,7 @@ Clear DOM Storage Clear Form Data Font Size + 25% 50% 75% 100% @@ -330,6 +331,7 @@ Homepage Default font size + 25% 50% 75% 100% @@ -339,6 +341,7 @@ 200% + 25 50 75 100 -- 2.45.2