Skip to content

Commit

Permalink
Fixes mozilla-mobile#9205: Changes add-ons and 'Open links in apps' i…
Browse files Browse the repository at this point in the history
…cons from menus
  • Loading branch information
ValentinTimisica committed Jun 22, 2020
1 parent b635af8 commit e9bb11e
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class DefaultToolbarMenu(

private val openInApp = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_open_app_link),
startImageResource = R.drawable.ic_app_links,
startImageResource = R.drawable.ic_open_in_app,
iconTintColorResource = primaryTextColor(),
highlight = BrowserMenuHighlight.LowPriority(
label = context.getString(R.string.browser_menu_open_app_link),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class CustomTabToolbarMenu(

private val openInApp = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_open_app_link),
startImageResource = R.drawable.ic_app_links,
startImageResource = R.drawable.ic_open_in_app,
iconTintColorResource = primaryTextColor(),
highlight = BrowserMenuHighlight.LowPriority(
label = context.getString(R.string.browser_menu_open_app_link),
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class HomeMenu(

val addons = BrowserMenuImageText(
context.getString(R.string.browser_menu_add_ons),
R.drawable.mozac_ic_extensions,
R.drawable.ic_addons_extensions,
primaryTextColor
) {
onItemTapped.invoke(Item.AddonsManager)
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/ic_addons_extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m20.125,12c-1.213,0 -1.25,1.25 -2.187,1.25 -0.5138,-0.0101 -0.9279,-0.4242 -0.938,-0.938v-4.062c0,-0.6904 -0.5596,-1.25 -1.25,-1.25h-4.062c-0.5138,-0.0101 -0.9279,-0.4242 -0.938,-0.938 0,-0.937 1.25,-0.974 1.25,-2.187 0,-1.081 -1.119,-1.875 -2.5,-1.875s-2.5,0.794 -2.5,1.875c0,1.213 1.25,1.25 1.25,2.187 -0.0101,0.5138 -0.4242,0.9279 -0.938,0.938h-4.062c-0.3315,0 -0.6495,0.1317 -0.8839,0.3661 -0.2344,0.2344 -0.3661,0.5524 -0.3661,0.8839v2.812c0.0101,0.5138 0.4242,0.9279 0.938,0.938 0.937,0 0.974,-1.25 2.187,-1.25 1.081,0 1.875,1.119 1.875,2.5s-0.794,2.5 -1.875,2.5c-1.213,0 -1.25,-1.25 -2.187,-1.25 -0.5138,0.0101 -0.9279,0.4242 -0.938,0.938v5.312c0,0.6904 0.5596,1.25 1.25,1.25h4.062c0.5138,-0.0101 0.9279,-0.4242 0.938,-0.938 0,-0.937 -1.25,-0.974 -1.25,-2.187 0,-1.081 1.119,-1.875 2.5,-1.875s2.5,0.794 2.5,1.875c0,1.213 -1.25,1.25 -1.25,2.187 0.0101,0.5138 0.4242,0.9279 0.938,0.938h4.062c0.6904,0 1.25,-0.5596 1.25,-1.25v-4.062c0.0101,-0.5138 0.4242,-0.9279 0.938,-0.938 0.937,0 0.974,1.25 2.187,1.25 1.081,0 1.875,-1.119 1.875,-2.5s-0.794,-2.5 -1.875,-2.5z"
android:fillColor="?primaryText"
tools:ignore="VectorPath" />
</vector>
14 changes: 0 additions & 14 deletions app/src/main/res/drawable/ic_app_links.xml

This file was deleted.

15 changes: 15 additions & 0 deletions app/src/main/res/drawable/ic_open_in_app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m5.5,16c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM18.5,16c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM12,16c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM5.5,9.5c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM18.5,9.5c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM12,9.5c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM5.5,3c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM18.5,3c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5zM12,3c1.3807,0 2.5,1.1193 2.5,2.5s-1.1193,2.5 -2.5,2.5 -2.5,-1.1193 -2.5,-2.5 1.1193,-2.5 2.5,-2.5z"
android:fillColor="?primaryText"
tools:ignore="VectorPath" />
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@
android:key="@string/pref_key_advanced"
android:layout="@layout/preference_cat_style">
<androidx.preference.Preference
android:icon="@drawable/mozac_ic_extensions_black"
android:icon="@drawable/ic_addons_extensions"
android:key="@string/pref_key_addons"
android:title="@string/preferences_addons" />

<androidx.preference.SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_app_links"
android:icon="@drawable/ic_open_in_app"
android:key="@string/pref_key_open_links_in_external_app"
android:title="@string/preferences_open_links_in_apps" />

Expand Down

0 comments on commit e9bb11e

Please sign in to comment.