1
0
Fork 0

Fixes #1662: Corrects ripple style for private browsing button

master
Sawyer Blatz 2019-04-16 10:11:20 -07:00 committed by Colin Lee
parent 8e5958580e
commit 5390aed795
3 changed files with 28 additions and 12 deletions

View File

@ -2,12 +2,28 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.5,17c-2.1,0 -3.5,-2.5 -5.5,-2.5S8.4,17 6.5,17C3.9,17 2,14.6 2,10.4 2,7.8 2.8,7 6.1,7s4.3,1.4 5.9,1.4c1.6,0 2.6,-1.4 5.9,-1.4 3.3,0 4.1,0.8 4.1,3.4 0,4.2 -1.9,6.6 -4.5,6.6zM7.7,10.2c-2,0.1 -2.9,1.3 -2.9,1.6 0,0.3 1.3,1.1 2.7,1.1 1.3,0 2.9,-0.5 2.9,-0.9 0,-0.5 -0.8,-1.9 -2.7,-1.8zM16.3,10.2c-1.9,-0.1 -2.7,1.3 -2.7,1.8 0,0.4 1.5,0.9 2.9,0.9s2.7,-0.8 2.7,-1.1c-0.1,-0.3 -0.9,-1.5 -2.9,-1.6z"
android:fillColor="?attr/primaryText" />
</vector>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<size
android:width="40dp"
android:height="40dp" />
<solid android:color="?privateBrowsingButtonBackground" />
</shape>
</item>
<item
android:bottom="8dp"
android:left="8dp"
android:right="8dp"
android:top="8dp">
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.5,17c-2.1,0 -3.5,-2.5 -5.5,-2.5S8.4,17 6.5,17C3.9,17 2,14.6 2,10.4 2,7.8 2.8,7 6.1,7s4.3,1.4 5.9,1.4c1.6,0 2.6,-1.4 5.9,-1.4 3.3,0 4.1,0.8 4.1,3.4 0,4.2 -1.9,6.6 -4.5,6.6zM7.7,10.2c-2,0.1 -2.9,1.3 -2.9,1.6 0,0.3 1.3,1.1 2.7,1.1 1.3,0 2.9,-0.5 2.9,-0.9 0,-0.5 -0.8,-1.9 -2.7,-1.8zM16.3,10.2c-1.9,-0.1 -2.7,1.3 -2.7,1.8 0,0.4 1.5,0.9 2.9,0.9s2.7,-0.8 2.7,-1.1c-0.1,-0.3 -0.9,-1.5 -2.9,-1.6z"
android:fillColor="?attr/primaryText" />
</vector>
</item>
</layer-list>

View File

@ -30,7 +30,7 @@
android:id="@+id/privateBrowsingButton"
android:layout_width="@dimen/glyph_button_height"
android:layout_height="@dimen/glyph_button_height"
android:background="?privateBrowsingButtonBackground"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_private_browsing"
android:contentDescription="@string/content_description_private_browsing_button"
app:layout_constraintEnd_toStartOf="@id/menuButton"

View File

@ -26,7 +26,7 @@
<!-- Drawables -->
<item name="fenixLogo">@drawable/ic_logo_wordmark</item>
<item name="privateBrowsingButtonBackground">?android:attr/selectableItemBackgroundBorderless</item>
<item name="privateBrowsingButtonBackground">@android:color/transparent</item>
</style>
<style name="NormalTheme" parent="NormalThemeBase"/>
@ -53,7 +53,7 @@
<!-- Drawables -->
<item name="fenixLogo">@drawable/ic_logo_wordmark_white</item>
<item name="privateBrowsingButtonBackground">@drawable/private_browsing_button_background</item>
<item name="privateBrowsingButtonBackground">@color/accent_private_theme</item>
</style>
<style name="PrivateTheme" parent="PrivateThemeBase"/>