pull/600/head
mcarare 3 years ago committed by mergify[bot]
parent d457385e79
commit 2adea3fd40

@ -179,7 +179,7 @@ open class DefaultToolbarMenu(
val installToHomescreen = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_install_on_homescreen),
startImageResource = R.drawable.ic_add_to_homescreen,
startImageResource = R.drawable.mozac_ic_add_to_home_screen,
iconTintColorResource = primaryTextColor(),
highlight = BrowserMenuHighlight.LowPriority(
label = context.getString(R.string.browser_menu_install_on_homescreen),
@ -266,7 +266,7 @@ open class DefaultToolbarMenu(
val addToHomeScreenItem = BrowserMenuImageText(
label = context.getString(R.string.browser_menu_add_to_homescreen),
imageResource = R.drawable.ic_add_to_homescreen,
imageResource = R.drawable.mozac_ic_add_to_home_screen,
iconTintColorResource = primaryTextColor(),
isCollapsingMenuLimit = true
) {
@ -291,7 +291,7 @@ open class DefaultToolbarMenu(
val settingsItem = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_settings),
startImageResource = R.drawable.ic_settings,
startImageResource = R.drawable.mozac_ic_settings,
iconTintColorResource = if (hasAccountProblem)
ThemeManager.resolveAttribute(R.attr.syncDisconnected, context) else
primaryTextColor(),

@ -161,7 +161,7 @@ class HomeMenu(
val helpItem = BrowserMenuImageText(
context.getString(R.string.browser_menu_help),
R.drawable.ic_help,
R.drawable.mozac_ic_help,
primaryTextColor
) {
onItemTapped.invoke(Item.Help)
@ -171,7 +171,7 @@ class HomeMenu(
val variables = experiments.getVariables(FeatureId.NIMBUS_VALIDATION)
val settingsItem = BrowserMenuImageText(
variables.getText("settings-title") ?: context.getString(R.string.browser_menu_settings),
variables.getDrawableResource("settings-icon") ?: R.drawable.ic_settings,
variables.getDrawableResource("settings-icon") ?: R.drawable.mozac_ic_settings,
primaryTextColor
) {
onItemTapped.invoke(Item.Settings)

@ -6,11 +6,14 @@ package org.mozilla.fenix.search.awesomebar
import android.content.Context
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.graphics.BlendModeColorFilterCompat.createBlendModeColorFilterCompat
import androidx.core.graphics.BlendModeCompat.SRC_IN
import androidx.core.graphics.drawable.toBitmap
import mozilla.components.browser.state.search.SearchEngine
import mozilla.components.browser.state.state.searchEngines
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.concept.awesomebar.AwesomeBar
import mozilla.components.support.ktx.android.content.getColorFromAttr
import org.mozilla.fenix.R
import java.util.UUID
@ -26,7 +29,12 @@ class ShortcutsSuggestionProvider(
override val id: String = UUID.randomUUID().toString()
private val settingsIcon by lazy {
AppCompatResources.getDrawable(context, R.drawable.ic_settings)?.toBitmap()
AppCompatResources.getDrawable(context, R.drawable.mozac_ic_settings)?.apply {
colorFilter = createBlendModeColorFilterCompat(
context.getColorFromAttr(R.attr.primaryText),
SRC_IN
)
}?.toBitmap()
}
override suspend fun onInputChanged(text: String): List<AwesomeBar.Suggestion> {

@ -53,7 +53,7 @@ class ClearableEditText @JvmOverloads constructor(
// lengthAfter has inconsistent behaviour when there are spaces in the entered text, so we'll use text.length.
val textLength = text?.length ?: 0
val drawable = if (shouldShowClearButton(textLength)) {
AppCompatResources.getDrawable(context, R.drawable.ic_clear)?.apply {
AppCompatResources.getDrawable(context, R.drawable.mozac_ic_clear)?.apply {
colorFilter = createBlendModeColorFilterCompat(context.getColorFromAttr(R.attr.primaryText), SRC_IN)
}
} else {

@ -1,16 +0,0 @@
<?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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m15.535,10.526 l1.6,1.6a0.5,0.5 0,0 1,-0.351 0.854l-4.233,0.02 -0.551,-0.551 0.021,-4.232a0.5,0.5 0,0 1,0.854 -0.351l1.596,1.596L19.72,4.22a0.75,0.75 0,1 1,1.061 1.061l-5.246,5.245zM7.6,14H6.4l-0.4,0.4v1.2l0.4,0.4h1.2l0.4,-0.4v-1.2l-0.4,-0.4zM10.6,14H9.4l-0.4,0.4v1.2l0.4,0.4h1.2l0.4,-0.4v-1.2l-0.4,-0.4zM13.6,14h-1.2l-0.4,0.4v1.2l0.4,0.4h1.2l0.4,-0.4v-1.2l-0.4,-0.4zM10.6,11H9.4l-0.4,0.4v1.2l0.4,0.4h1.2l0.4,-0.4v-1.2l-0.4,-0.4z"
android:fillColor="?primaryText"/>
<path
android:pathData="M14.5,2h-9A2.5,2.5 0,0 0,3 4.5v15A2.5,2.5 0,0 0,5.5 22h9a2.5,2.5 0,0 0,2.5 -2.5v-4.275a0.75,0.75 0,0 0,-1.5 0V17h-11V4.3l0.8,-0.8h9.4l0.8,0.8V5A0.75,0.75 0,0 0,17 5v-0.5A2.5,2.5 0,0 0,14.5 2zM8.75,19h2.5a0.75,0.75 0,0 1,0 1.5h-2.5a0.75,0.75 0,0 1,0 -1.5z"
android:fillColor="?primaryText"/>
</vector>

@ -1,13 +0,0 @@
<?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"
android:width="16dp"
android:height="16dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:fillColor="?primaryText"
android:pathData="M10,2.5C5.858,2.5 2.5,5.858 2.5,10C2.5,14.142 5.858,17.5 10,17.5C14.142,17.5 17.5,14.142 17.5,10C17.5,5.858 14.142,2.5 10,2.5ZM12.817,11.933C13.06,12.177 13.06,12.574 12.817,12.818C12.695,12.939 12.535,13 12.375,13C12.215,13 12.055,12.939 11.933,12.817L10.204,11.088L9.797,11.087L8.068,12.816C7.945,12.939 7.785,13 7.625,13C7.465,13 7.305,12.939 7.183,12.817C6.94,12.573 6.94,12.176 7.183,11.932L8.897,10.218V9.781L7.183,8.067C6.94,7.823 6.94,7.426 7.183,7.182C7.427,6.938 7.824,6.938 8.068,7.182L9.787,8.901H10.215L11.934,7.182C12.178,6.938 12.575,6.938 12.819,7.182C13.062,7.426 13.062,7.823 12.819,8.067L11.1,9.786V10.214L12.817,11.933Z" />
</vector>

@ -1,16 +0,0 @@
<?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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?primaryText"
android:pathData="M11.75 14A0.75 0.75 0 0 1 11 13.25v-0.959c0-0.645 0.452-1.206 1.074-1.336a1.6 1.6 0 0 0 1.27-1.561 1.596 1.596 0 0 0-3.101-0.522 0.75 0.75 0 1 1-1.418-0.49A3.097 3.097 0 0 1 11.75 6.3a3.098 3.098 0 0 1 3.094 3.094c0 1.418-0.979 2.661-2.344 3.002v0.854A0.75 0.75 0 0 1 11.75 14zm0.45 3h-0.9L11 16.7v-0.9l0.3-0.3h0.9l0.3 0.3v0.9L12.2 17z" />
<path
android:fillColor="?primaryText"
android:pathData="M11.75 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8zm0-1.5a9.5 9.5 0 0 0-9.5 9.5 9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5 9.5 9.5 0 0 0-9.5-9.5z" />
</vector>

@ -1,13 +0,0 @@
<?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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M21.5 11.1l-8.8-8a1 1 0 0 0-1.4 0l-8.8 8c-0.3 0.4-0.3 1 0 1.3 0.4 0.4 1 0.4 1.5 0l1-1v7c0 1.5 1.3 2.8 3 2.8h8c1.7 0 3-1.3 3-2.8v-7l1 1c0.4 0.4 1 0.4 1.4 0 0.4-0.3 0.4-1 0-1.3zM17 18.4c0 0.5-0.4 1-1 1H8c-0.6 0-1-0.5-1-1V9.6L12 5l5 4.6z"
android:fillColor="?primaryText"/>
</vector>

@ -1,16 +0,0 @@
<?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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12.8,22h-1.6a2,2 0,0 1,-1.9 -1.4l-0.5,-1.8 -1,-0.6 -1.9,0.4a2,2 0,0 1,-2.2 -1L3,16.4a2,2 0,0 1,0.3 -2.4l1.3,-1.3a6.7,6.7 0,0 1,0 -1.2l-1.3,-1.3A2,2 0,0 1,3 7.7l0.8,-1.4a2,2 0,0 1,2.2 -1l1.9,0.5 1,-0.6 0.5,-1.8a2,2 0,0 1,2 -1.4h1.5a2,2 0,0 1,2 1.4l0.4,1.8 1,0.6 1.9,-0.4a2,2 0,0 1,2.2 1l0.8,1.3a2,2 0,0 1,-0.3 2.4l-1.3,1.3a6.6,6.6 0,0 1,0 1.2l1.3,1.3c0.6,0.7 0.7,1.7 0.3,2.4l-0.8,1.4a2,2 0,0 1,-2.2 1l-1.8,-0.5 -1,0.6 -0.6,1.8a2,2 0,0 1,-2 1.4zM7.8,16.6l0.6,0.2 1.3,0.7 0.4,0.5 0.6,2.1c0.1,0.3 0.3,0.4 0.5,0.4h1.6c0.2,0 0.4,-0.1 0.5,-0.4l0.6,-2 0.4,-0.6a6,6 0,0 0,1.3 -0.7l0.7,-0.2 2.1,0.6c0.2,0 0.5,0 0.6,-0.3l0.8,-1.3 -0.1,-0.6 -1.6,-1.7 -0.2,-0.6a5.8,5.8 0,0 0,0 -1.5l0.2,-0.6L19.7,9c0.1,-0.1 0.2,-0.4 0,-0.6L19,7.1a0.5,0.5 0,0 0,-0.6 -0.3l-2.2,0.6 -0.6,-0.2a6,6 0,0 0,-1.3 -0.7L14,6l-0.6,-2.1c0,-0.3 -0.3,-0.4 -0.5,-0.4h-1.6c-0.2,0 -0.4,0.1 -0.5,0.4l-0.6,2 -0.4,0.6a6,6 0,0 0,-1.3 0.7l-0.6,0.2 -2.2,-0.6c-0.2,0 -0.5,0 -0.6,0.3l-0.8,1.3 0.1,0.6L6,10.6l0.2,0.6a6.1,6.1 0,0 0,0 1.5l-0.2,0.7L4.3,15c-0.1,0.1 -0.2,0.4 0,0.6l0.7,1.3c0.1,0.2 0.4,0.3 0.6,0.3l2.1,-0.6z"
android:fillColor="?primaryText"/>
<path
android:pathData="M12,15.5a3.5,3.5 0,1 1,0 -7,3.5 3.5,0 0,1 0,7zM12,10a2,2 0,1 0,0 4,2 2,0 0,0 0,-4z"
android:fillColor="?primaryText"/>
</vector>

@ -191,7 +191,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/tracking_protection_item_height"
android:text="@string/etp_settings"
app:drawableStartCompat="@drawable/ic_settings"
app:drawableStartCompat="@drawable/mozac_ic_settings"
app:layout_constraintTop_toBottomOf="@id/line_divider" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -141,7 +141,7 @@
app:tint="@color/saved_login_clear_edit_text_tint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/inputLayoutUsername"
app:srcCompat="@drawable/ic_clear" />
app:srcCompat="@drawable/mozac_ic_clear" />
<TextView
android:id="@+id/passwordHeader"
@ -223,5 +223,5 @@
app:tint="@color/saved_login_clear_edit_text_tint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/revealPasswordButton"
app:srcCompat="@drawable/ic_clear" />
app:srcCompat="@drawable/mozac_ic_clear" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -63,7 +63,7 @@
android:text="@string/mozac_feature_addons_settings"
android:textSize="16sp"
android:textColor="?primaryText"
app:drawableStartCompat="@drawable/ic_settings"
app:drawableStartCompat="@drawable/mozac_ic_settings"
app:drawableTint="?primaryText" />
<TextView

@ -47,7 +47,7 @@
app:layout_constraintEnd_toStartOf="@id/description"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/dialog_title"
app:srcCompat="@drawable/ic_add_to_homescreen" />
app:srcCompat="@drawable/mozac_ic_add_to_home_screen" />
<TextView
android:id="@+id/description"

@ -35,7 +35,7 @@ class ShortcutsSuggestionProviderTest {
every { getString(R.string.search_shortcuts_engine_settings) } returns "Search engine settings"
}
every { AppCompatResources.getDrawable(context, R.drawable.ic_settings) } returns null
every { AppCompatResources.getDrawable(context, R.drawable.mozac_ic_settings) } returns null
}
@After

Loading…
Cancel
Save