]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Make privacy_mode.xml green.
authorSoren Stoutner <soren@stoutner.com>
Thu, 4 Feb 2016 03:06:43 +0000 (20:06 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 4 Feb 2016 03:06:43 +0000 (20:06 -0700)
app/src/main/assets/about_text.html
app/src/main/java/com/stoutner/privacybrowser/MainWebView.java
app/src/main/res/drawable/javascript_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/javascript_on.xml [deleted file]
app/src/main/res/drawable/privacy_mode.xml
app/src/main/res/drawable/warning.xml [new file with mode: 0644]
app/src/main/res/drawable/warning_on.xml [deleted file]

index 89d2ab9bb776dfa37383045759e89c361557d57b..0995c3df675d266283719ce67edce6f80ae0cafa 100644 (file)
@@ -6,10 +6,10 @@
 
 <p>Privacy Browser is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.  The full text of the license is below.</p>
 
-<p>/app/src/main/res/drawable/javascript_on.xml is part of the Android Material icon set, where it is named ic_visibility.
+<p>/app/src/main/res/drawable/javascript_enabled.xml is part of the Android Material icon set, where it is named ic_visibility.
     It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.  Changes to fill color were made by Soren Stoutner in 2016.</p>
 
-<p>/app/src/main/res/drawable/warning_on.xml is part of the Android Material icon set, where it is named ic_visibility.
+<p>/app/src/main/res/drawable/warning.xml is part of the Android Material icon set, where it is named ic_visibility.
     It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.  Changes to fill color were made by Soren Stoutner in 2016.</p>
 
 <p>/app/src/main/res/drawable/privacy_mode.xml is part of the Android Material icon set, where it is named ic_visibility_off.
index 0b9c117a1ca962cacfa02073e9e08c5cbd23c368..f58f1a2b02313e570de57a202d570b802c962b1f 100644 (file)
@@ -332,10 +332,10 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
 
         // Set the initial icon for toggleJavaScript
         if (javaScriptEnabled) {
-            toggleJavaScript.setIcon(R.drawable.javascript_on);
+            toggleJavaScript.setIcon(R.drawable.javascript_enabled);
         } else {
             if (domStorageEnabled || cookiesEnabled) {
-                toggleJavaScript.setIcon(R.drawable.warning_on);
+                toggleJavaScript.setIcon(R.drawable.warning);
             } else {
                 toggleJavaScript.setIcon(R.drawable.privacy_mode);
             }
@@ -398,7 +398,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
 
                     // Update the toggleJavaScript icon and display a toast message.
                     if (domStorageEnabled || cookiesEnabled) {
-                        menuItem.setIcon(R.drawable.warning_on);
+                        menuItem.setIcon(R.drawable.warning);
                         if (domStorageEnabled && cookiesEnabled) {
                             Toast.makeText(getApplicationContext(), "JavaScript disabled, DOM Storage and Cookies still enabled", Toast.LENGTH_SHORT).show();
                         } else {
@@ -414,7 +414,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
                     }
                 } else {
                     javaScriptEnabled = true;
-                    menuItem.setIcon(R.drawable.javascript_on);
+                    menuItem.setIcon(R.drawable.javascript_enabled);
                     mainWebView.getSettings().setJavaScriptEnabled(true);
                     mainWebView.reload();
                     Toast.makeText(getApplicationContext(), "JavaScript enabled", Toast.LENGTH_SHORT).show();
@@ -434,7 +434,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
                         Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show();
                     } else {
                         if (cookiesEnabled) {
-                            toggleJavaScript.setIcon(R.drawable.warning_on);
+                            toggleJavaScript.setIcon(R.drawable.warning);
                             Toast.makeText(getApplicationContext(), "Cookies still enabled", Toast.LENGTH_SHORT).show();
                         } // Else Do nothing because JavaScript is enabled.
                     }
@@ -446,7 +446,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
 
                     // Update the toggleJavaScript icon if appropriate.
                     if (!javaScriptEnabled) {
-                        toggleJavaScript.setIcon(R.drawable.warning_on);
+                        toggleJavaScript.setIcon(R.drawable.warning);
                     } // Else Do nothing because JavaScript is enabled.
 
                     Toast.makeText(getApplicationContext(), "DOM Storage enabled", Toast.LENGTH_SHORT).show();
@@ -482,7 +482,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
                         Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show();
                     } else {
                         if (domStorageEnabled) {
-                            toggleJavaScript.setIcon(R.drawable.warning_on);
+                            toggleJavaScript.setIcon(R.drawable.warning);
                             Toast.makeText(getApplicationContext(), "DOM Storage still enabled", Toast.LENGTH_SHORT).show();
                         } // Else Do nothing because JavaScript is enabled.
                     }
@@ -494,7 +494,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh
 
                     // Update the toggleJavaScript icon if appropriate.
                     if (!javaScriptEnabled) {
-                        toggleJavaScript.setIcon(R.drawable.warning_on);
+                        toggleJavaScript.setIcon(R.drawable.warning);
                     } // Else Do nothing because JavaScript is enabled.
 
                     Toast.makeText(getApplicationContext(), "Cookies enabled", Toast.LENGTH_SHORT).show();
diff --git a/app/src/main/res/drawable/javascript_enabled.xml b/app/src/main/res/drawable/javascript_enabled.xml
new file mode 100644 (file)
index 0000000..5dc5dfc
--- /dev/null
@@ -0,0 +1,14 @@
+<!--
+  javascript_enabled.xml is part of the Android Material icon set, where it is named ic_visibility.
+  It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>.
+  Changes to fill color were made by Soren Stoutner in 2016. -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FFD50000"
+        android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
+</vector>
diff --git a/app/src/main/res/drawable/javascript_on.xml b/app/src/main/res/drawable/javascript_on.xml
deleted file mode 100644 (file)
index 306bf04..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!--
-  javascript_on.xml is part of the Android Material icon set, where it is named ic_visibility.
-  It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>.
-  Changes to fill color were made by Soren Stoutner in 2016. -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
-    <path
-        android:fillColor="#FFD50000"
-        android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
-</vector>
index 8fb3beee303d6cf937ba7ae711d5f919cc37bf98..58101898870ff9b2850c3ec0cb072991288faccc 100644 (file)
@@ -9,6 +9,6 @@
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
-        android:fillColor="#88000000"
+        android:fillColor="#FF64DD17"
         android:pathData="M12,7c2.76,0 5,2.24 5,5 0,0.65 -0.13,1.26 -0.36,1.83l2.92,2.92c1.51,-1.26 2.7,-2.89 3.43,-4.75 -1.73,-4.39 -6,-7.5 -11,-7.5 -1.4,0 -2.74,0.25 -3.98,0.7l2.16,2.16C10.74,7.13 11.35,7 12,7zM2,4.27l2.28,2.28 0.46,0.46C3.08,8.3 1.78,10.02 1,12c1.73,4.39 6,7.5 11,7.5 1.55,0 3.03,-0.3 4.38,-0.84l0.42,0.42L19.73,22 21,20.73 3.27,3 2,4.27zM7.53,9.8l1.55,1.55c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.66 1.34,3 3,3 0.22,0 0.44,-0.03 0.65,-0.08l1.55,1.55c-0.67,0.33 -1.41,0.53 -2.2,0.53 -2.76,0 -5,-2.24 -5,-5 0,-0.79 0.2,-1.53 0.53,-2.2zm4.31,-0.78l3.15,3.15 0.02,-0.16c0,-1.66 -1.34,-3 -3,-3l-0.17,0.01z"/>
 </vector>
diff --git a/app/src/main/res/drawable/warning.xml b/app/src/main/res/drawable/warning.xml
new file mode 100644 (file)
index 0000000..9415215
--- /dev/null
@@ -0,0 +1,14 @@
+<!--
+  warning.xml is part of the Android Material icon set, where it is named ic_visibility.
+  It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>.
+  Changes to fill color were made by Soren Stoutner in 2016. -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FFFFD600"
+        android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
+</vector>
diff --git a/app/src/main/res/drawable/warning_on.xml b/app/src/main/res/drawable/warning_on.xml
deleted file mode 100644 (file)
index 2de8773..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!--
-  warning_on.xml is part of the Android Material icon set, where it is named ic_visibility.
-  It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>.
-  Changes to fill color were made by Soren Stoutner in 2016. -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
-    <path
-        android:fillColor="#FFFFD600"
-        android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
-</vector>