diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a06c9425..e3c22f841 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,5 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - #916 - Added the ability to save and delete bookmarks - #356 - Adds the ability to delete history +- #208 - Added normal browsing dark mode (advised to use attrs from now on for most referenced colors) ### Changed ### Removed \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d5896bd37..74faca1db 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,7 +20,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:name=".FenixApplication" - android:theme="@style/LightTheme" + android:theme="@style/NormalTheme" android:usesCleartextTraffic="true" tools:ignore="UnusedAttribute"> ThemeManager.Theme.Light + BrowsingModeManager.Mode.Normal -> ThemeManager.Theme.Normal BrowsingModeManager.Mode.Private -> ThemeManager.Theme.Private } setTheme(newTheme) diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index 7c4d407a1..e0e3e883d 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -6,6 +6,8 @@ package org.mozilla.fenix import android.annotation.SuppressLint import android.app.Application +import androidx.appcompat.app.AppCompatDelegate +import androidx.preference.PreferenceManager import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch @@ -20,6 +22,7 @@ import mozilla.components.support.ktx.android.content.isMainProcess import mozilla.components.support.ktx.android.content.runOnlyInMainProcess import mozilla.components.support.rustlog.RustLog import org.mozilla.fenix.components.Components +import org.mozilla.fenix.utils.Settings import java.io.File @SuppressLint("Registered") @@ -30,6 +33,7 @@ open class FenixApplication : Application() { override fun onCreate() { super.onCreate() + setDayNightTheme() val megazordEnabled = setupMegazord() setupLogging(megazordEnabled) setupCrashReporting() @@ -138,4 +142,45 @@ open class FenixApplication : Application() { components.core.sessionManager.onLowMemory() } } + + private fun setDayNightTheme() { + when { + Settings.getInstance(this).shouldUseLightTheme -> { + AppCompatDelegate.setDefaultNightMode( + AppCompatDelegate.MODE_NIGHT_NO + ) + } + Settings.getInstance(this).shouldUseDarkTheme -> { + AppCompatDelegate.setDefaultNightMode( + AppCompatDelegate.MODE_NIGHT_YES + ) + } + Settings.getInstance(this).shouldUseAutoBatteryTheme -> { + AppCompatDelegate.setDefaultNightMode( + AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY + ) + } + Settings.getInstance(this).shouldFollowDeviceTheme -> { + AppCompatDelegate.setDefaultNightMode( + AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM + ) + } + // First run of app no default set, set the default to Follow System for 28+ and Normal Mode otherwise + else -> { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P) { + AppCompatDelegate.setDefaultNightMode( + AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM + ) + PreferenceManager.getDefaultSharedPreferences(this).edit() + .putBoolean(getString(R.string.pref_key_follow_device_theme), true).apply() + } else { + AppCompatDelegate.setDefaultNightMode( + AppCompatDelegate.MODE_NIGHT_NO + ) + PreferenceManager.getDefaultSharedPreferences(this).edit() + .putBoolean(getString(R.string.pref_key_light_theme), true).apply() + } + } + } + } } diff --git a/app/src/main/java/org/mozilla/fenix/ThemeManager.kt b/app/src/main/java/org/mozilla/fenix/ThemeManager.kt index 5ab5da170..252fa6c88 100644 --- a/app/src/main/java/org/mozilla/fenix/ThemeManager.kt +++ b/app/src/main/java/org/mozilla/fenix/ThemeManager.kt @@ -6,6 +6,7 @@ package org.mozilla.fenix import android.app.Activity import android.content.Context +import android.content.res.Configuration import android.util.TypedValue import android.view.View import android.view.Window @@ -13,7 +14,7 @@ import androidx.core.content.ContextCompat interface ThemeManager { enum class Theme { - Light, Private + Normal, Private } val currentTheme: Theme @@ -22,7 +23,7 @@ interface ThemeManager { fun Activity.setTheme(theme: ThemeManager.Theme) { val themeCode = when (theme) { - ThemeManager.Theme.Light -> R.style.LightTheme + ThemeManager.Theme.Normal -> R.style.NormalTheme ThemeManager.Theme.Private -> R.style.PrivateTheme } @@ -31,7 +32,7 @@ fun Activity.setTheme(theme: ThemeManager.Theme) { fun ThemeManager.Theme.isPrivate(): Boolean = this == ThemeManager.Theme.Private -private var temporaryThemeManagerStorage = ThemeManager.Theme.Light +private var temporaryThemeManagerStorage = ThemeManager.Theme.Normal class DefaultThemeManager : ThemeManager { var onThemeChange: ((ThemeManager.Theme) -> Unit)? = null @@ -77,9 +78,29 @@ class DefaultThemeManager : ThemeManager { } when (themeManager.currentTheme) { - ThemeManager.Theme.Light -> { - window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or - View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + ThemeManager.Theme.Normal -> { + val currentNightMode = + context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK + when (currentNightMode) { + Configuration.UI_MODE_NIGHT_NO -> { + window.decorView.systemUiVisibility = + window.decorView.systemUiVisibility or + View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or + View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + } + Configuration.UI_MODE_NIGHT_YES -> { + window.decorView.systemUiVisibility = + window.decorView.systemUiVisibility and + View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() and + View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv() + } + Configuration.UI_MODE_NIGHT_UNDEFINED -> { + window.decorView.systemUiVisibility = + window.decorView.systemUiVisibility or + View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or + View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + } + } } ThemeManager.Theme.Private -> { window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt index 4fa493b55..d1ade5e64 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt @@ -8,7 +8,6 @@ import android.graphics.drawable.BitmapDrawable import android.view.LayoutInflater import android.view.ViewGroup import android.widget.ImageView -import androidx.core.content.ContextCompat import io.reactivex.Observable import io.reactivex.Observer import io.reactivex.functions.Consumer @@ -55,9 +54,7 @@ class ToolbarUIView( browserActionMargin = resources.pxToDp(browserActionMarginDp) urlBoxView = urlBackground - textColor = ContextCompat.getColor(context, R.color.search_text) hint = context.getString(R.string.search_hint) - hintColor = ContextCompat.getColor(context, R.color.search_text) setOnEditListener(object : mozilla.components.concept.toolbar.Toolbar.OnEditListener { override fun onCancelEditing(): Boolean { diff --git a/app/src/main/java/org/mozilla/fenix/home/SearchView.kt b/app/src/main/java/org/mozilla/fenix/home/SearchView.kt index 87fedfab4..0fcef47c5 100644 --- a/app/src/main/java/org/mozilla/fenix/home/SearchView.kt +++ b/app/src/main/java/org/mozilla/fenix/home/SearchView.kt @@ -15,7 +15,7 @@ class SearchView(context: Context, attrs: AttributeSet) : FrameLayout(context, a var isPrivateModeEnabled = false private val lightDrawable = - resources.getDrawable(R.drawable.home_search_background_light, context.theme) + resources.getDrawable(R.drawable.home_search_background_normal, context.theme) private val privateLightDrawable = resources.getDrawable(R.drawable.home_search_background_private, context.theme) private val darkDrawable = diff --git a/app/src/main/java/org/mozilla/fenix/home/SessionBottomSheetFragment.kt b/app/src/main/java/org/mozilla/fenix/home/SessionBottomSheetFragment.kt index 319bf0144..73f476d2a 100644 --- a/app/src/main/java/org/mozilla/fenix/home/SessionBottomSheetFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/home/SessionBottomSheetFragment.kt @@ -4,13 +4,16 @@ package org.mozilla.fenix.home +import android.graphics.PorterDuff import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.content.ContextCompat import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kotlinx.android.extensions.LayoutContainer import kotlinx.android.synthetic.main.session_bottom_sheet.view.* +import org.mozilla.fenix.DefaultThemeManager import org.mozilla.fenix.utils.ItsNotBrokenSnack import org.mozilla.fenix.R import org.mozilla.fenix.home.sessions.ArchivedSession @@ -41,6 +44,14 @@ class SessionBottomSheetFragment : BottomSheetDialogFragment(), LayoutContainer view.current_session_card_tab_list.text = getTabTitles() view.archive_session_button.apply { visibility = if (sessionType is SessionType.Current) View.VISIBLE else View.GONE + val drawable = ContextCompat.getDrawable(context!!, R.drawable.ic_archive) + drawable?.setColorFilter( + ContextCompat.getColor( + context!!, + DefaultThemeManager.resolveAttribute(R.attr.iconColor, context!!) + ), PorterDuff.Mode.SRC_IN + ) + setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null) setOnClickListener { sessionType?.also { if (it is SessionType.Current) { @@ -52,6 +63,28 @@ class SessionBottomSheetFragment : BottomSheetDialogFragment(), LayoutContainer } } + view.delete_session_button.apply { + val drawable = ContextCompat.getDrawable(context!!, R.drawable.ic_delete) + drawable?.setColorFilter( + ContextCompat.getColor( + context!!, + DefaultThemeManager.resolveAttribute(R.attr.deleteColor, context!!) + ), PorterDuff.Mode.SRC_IN + ) + setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null) + } + + view.send_and_share_session_button.apply { + val drawable = ContextCompat.getDrawable(context!!, R.drawable.ic_share) + drawable?.setColorFilter( + ContextCompat.getColor( + context!!, + DefaultThemeManager.resolveAttribute(R.attr.iconColor, context!!) + ), PorterDuff.Mode.SRC_IN + ) + setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null) + } + view.send_and_share_session_button.setOnClickListener { ItsNotBrokenSnack(context!!).showSnackbar(issueNumber = "244") } diff --git a/app/src/main/java/org/mozilla/fenix/home/tabs/TabsUIView.kt b/app/src/main/java/org/mozilla/fenix/home/tabs/TabsUIView.kt index beaf186aa..3e1f1a4f7 100644 --- a/app/src/main/java/org/mozilla/fenix/home/tabs/TabsUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/home/tabs/TabsUIView.kt @@ -54,8 +54,9 @@ class TabsUIView( actionEmitter.onNext(TabsAction.MenuTapped) } + // Using a color here is fine for now because private browsing does not have this button save_session_button_text.apply { - val color = ContextCompat.getColor(context, R.color.photonWhite) + val color = ContextCompat.getColor(context, R.color.save_session_button_text_color) val drawable = ContextCompat.getDrawable(context, R.drawable.ic_archive) drawable?.setTint(color) this.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null) diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkItemMenu.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkItemMenu.kt index ceb7d6cc3..7246014ad 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkItemMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkItemMenu.kt @@ -7,6 +7,7 @@ package org.mozilla.fenix.library.bookmarks import android.content.Context import mozilla.components.browser.menu.BrowserMenuBuilder import mozilla.components.browser.menu.item.SimpleBrowserMenuItem +import org.mozilla.fenix.DefaultThemeManager import org.mozilla.fenix.R class BookmarkItemMenu( @@ -46,8 +47,12 @@ class BookmarkItemMenu( SimpleBrowserMenuItem(context.getString(R.string.bookmark_menu_open_in_private_tab_button)) { onItemTapped.invoke(BookmarkItemMenu.Item.OpenInPrivateTab) }, - SimpleBrowserMenuItem(context.getString(R.string.bookmark_menu_delete_button), - textColorResource = R.color.photonRed60 + SimpleBrowserMenuItem( + context.getString(R.string.bookmark_menu_delete_button), + textColorResource = DefaultThemeManager.resolveAttribute( + R.attr.deleteColor, + context + ) ) { onItemTapped.invoke(BookmarkItemMenu.Item.Delete) } diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryItemMenu.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryItemMenu.kt index 20727f605..c3076b206 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryItemMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryItemMenu.kt @@ -7,6 +7,7 @@ package org.mozilla.fenix.library.history import android.content.Context import mozilla.components.browser.menu.BrowserMenuBuilder import mozilla.components.browser.menu.item.SimpleBrowserMenuItem +import org.mozilla.fenix.DefaultThemeManager import org.mozilla.fenix.R class HistoryItemMenu( @@ -23,7 +24,7 @@ class HistoryItemMenu( listOf( SimpleBrowserMenuItem( context.getString(R.string.history_delete_item), - textColorResource = R.color.photonRed60 + textColorResource = DefaultThemeManager.resolveAttribute(R.attr.deleteColor, context) ) { onItemTapped.invoke(Item.Delete) } diff --git a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarUIView.kt b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarUIView.kt index aaf56d0a0..0187a910e 100644 --- a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarUIView.kt @@ -4,6 +4,7 @@ package org.mozilla.fenix.search.awesomebar 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/. */ +import android.graphics.PorterDuff import android.view.LayoutInflater import android.view.ViewGroup import androidx.core.content.ContextCompat @@ -19,6 +20,7 @@ import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider import mozilla.components.feature.search.SearchUseCases import mozilla.components.feature.session.SessionUseCases import mozilla.components.support.ktx.android.graphics.drawable.toBitmap +import org.mozilla.fenix.DefaultThemeManager import org.mozilla.fenix.R import org.mozilla.fenix.ext.components import org.mozilla.fenix.mvi.UIView @@ -76,7 +78,12 @@ class AwesomeBarUIView( private val shortcutSearchUseCase = object : SearchUseCases.SearchUseCase { override fun invoke(searchTerms: String, searchEngine: SearchEngine?) { - actionEmitter.onNext(AwesomeBarAction.SearchTermsTapped(searchTerms, state?.suggestionEngine)) + actionEmitter.onNext( + AwesomeBarAction.SearchTermsTapped( + searchTerms, + state?.suggestionEngine + ) + ) } } @@ -87,7 +94,7 @@ class AwesomeBarUIView( loadUrlUseCase, getDrawable(R.drawable.ic_link)!!.toBitmap(), getString(R.string.awesomebar_clipboard_title) - ) + ) sessionProvider = SessionSuggestionProvider( @@ -105,11 +112,17 @@ class AwesomeBarUIView( if (Settings.getInstance(container.context).showSearchSuggestions()) { val draw = getDrawable(R.drawable.ic_search) - draw?.setTint(ContextCompat.getColor(this, R.color.search_text)) - + draw?.setColorFilter( + ContextCompat.getColor( + this, + DefaultThemeManager.resolveAttribute(R.attr.searchShortcutsTextColor, this) + ), PorterDuff.Mode.SRC_IN + ) defaultSearchSuggestionProvider = SearchSuggestionProvider( - searchEngine = components.search.searchEngineManager.getDefaultSearchEngine(this), + searchEngine = components.search.searchEngineManager.getDefaultSearchEngine( + this + ), searchUseCase = searchUseCase, fetchClient = components.core.client, mode = SearchSuggestionProvider.Mode.MULTIPLE_SUGGESTIONS, @@ -119,11 +132,12 @@ class AwesomeBarUIView( } shortcutsEnginePickerProvider = - ShortcutsSuggestionProvider( - components.search.searchEngineManager, - this, - shortcutEngineManager::selectShortcutEngine, - shortcutEngineManager::selectShortcutEngineSettings) + ShortcutsSuggestionProvider( + components.search.searchEngineManager, + this, + shortcutEngineManager::selectShortcutEngine, + shortcutEngineManager::selectShortcutEngineSettings + ) shortcutEngineManager.shortcutsEnginePickerProvider = shortcutsEnginePickerProvider } @@ -148,16 +162,21 @@ class AwesomeBarUIView( private fun setShortcutEngine(engine: SearchEngine) { with(container.context) { val draw = getDrawable(R.drawable.ic_search) - draw?.setTint(androidx.core.content.ContextCompat.getColor(this, R.color.search_text)) + draw?.setColorFilter( + ContextCompat.getColor( + this, + DefaultThemeManager.resolveAttribute(R.attr.searchShortcutsTextColor, this) + ), PorterDuff.Mode.SRC_IN + ) searchSuggestionFromShortcutProvider = - SearchSuggestionProvider( - components.search.searchEngineManager.getDefaultSearchEngine(this, engine.name), - shortcutSearchUseCase, - components.core.client, - mode = SearchSuggestionProvider.Mode.MULTIPLE_SUGGESTIONS, - icon = draw?.toBitmap() - ) + SearchSuggestionProvider( + components.search.searchEngineManager.getDefaultSearchEngine(this, engine.name), + shortcutSearchUseCase, + components.core.client, + mode = SearchSuggestionProvider.Mode.MULTIPLE_SUGGESTIONS, + icon = draw?.toBitmap() + ) } } diff --git a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt index 4b251e97a..cb3f2ca8c 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt @@ -43,6 +43,7 @@ import org.mozilla.fenix.R.string.pref_key_language import org.mozilla.fenix.R.string.pref_key_data_choices import org.mozilla.fenix.R.string.pref_key_about import org.mozilla.fenix.R.string.pref_key_sign_in +import org.mozilla.fenix.R.string.pref_key_theme import org.mozilla.fenix.R.string.pref_key_account import org.mozilla.fenix.R.string.pref_key_account_category import org.mozilla.fenix.R.string.pref_key_search_engine_settings @@ -77,6 +78,12 @@ class SettingsFragment : PreferenceFragmentCompat(), CoroutineScope, AccountObse requireComponents.search.searchEngineManager.getDefaultSearchEngine(it).name } + val themesPreference = + findPreference(getString(R.string.pref_key_theme)) + themesPreference?.summary = context?.let { + org.mozilla.fenix.utils.Settings.getInstance(it).themeSettingString + } + val aboutPreference = findPreference(getString(R.string.pref_key_about)) val appName = getString(R.string.app_name) aboutPreference?.title = getString(R.string.preferences_about, appName) @@ -122,6 +129,9 @@ class SettingsFragment : PreferenceFragmentCompat(), CoroutineScope, AccountObse resources.getString(pref_key_account) -> { navigateToAccountSettings() } + resources.getString(pref_key_theme) -> { + navigateToThemeSettings() + } } return super.onPreferenceTreeClick(preference) } @@ -210,6 +220,11 @@ class SettingsFragment : PreferenceFragmentCompat(), CoroutineScope, AccountObse Navigation.findNavController(view!!).navigate(directions) } + private fun navigateToThemeSettings() { + val directions = SettingsFragmentDirections.actionSettingsFragmentToThemeFragment() + Navigation.findNavController(view!!).navigate(directions) + } + private fun navigateToSitePermissions() { val directions = SettingsFragmentDirections.actionSettingsFragmentToSitePermissionsFragment() diff --git a/app/src/main/java/org/mozilla/fenix/settings/ThemeFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/ThemeFragment.kt new file mode 100644 index 000000000..17286db0a --- /dev/null +++ b/app/src/main/java/org/mozilla/fenix/settings/ThemeFragment.kt @@ -0,0 +1,100 @@ +/* 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/. */ + +package org.mozilla.fenix.settings + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import androidx.appcompat.app.AppCompatDelegate +import androidx.preference.PreferenceFragmentCompat +import org.mozilla.fenix.R + +class ThemeFragment : PreferenceFragmentCompat() { + private lateinit var radioLightTheme: RadioButtonPreference + private lateinit var radioDarkTheme: RadioButtonPreference + private lateinit var radioAutoBatteryTheme: RadioButtonPreference + private lateinit var radioFollowDeviceTheme: RadioButtonPreference + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + (activity as AppCompatActivity).title = getString(R.string.preferences_theme) + (activity as AppCompatActivity).supportActionBar?.show() + } + + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { + setPreferencesFromResource(R.xml.theme_preferences, rootKey) + } + + override fun onResume() { + super.onResume() + setupPreferences() + } + + private fun setupPreferences() { + bindFollowDeviceTheme() + bindDarkTheme() + bindLightTheme() + bindAutoBatteryTheme() + setupRadioGroups() + } + + private fun setupRadioGroups() { + radioLightTheme.addToRadioGroup(radioDarkTheme) + radioLightTheme.addToRadioGroup(radioAutoBatteryTheme) + + radioDarkTheme.addToRadioGroup(radioLightTheme) + radioDarkTheme.addToRadioGroup(radioAutoBatteryTheme) + + radioAutoBatteryTheme.addToRadioGroup(radioLightTheme) + radioAutoBatteryTheme.addToRadioGroup(radioDarkTheme) + + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P) { + radioLightTheme.addToRadioGroup(radioFollowDeviceTheme) + radioDarkTheme.addToRadioGroup(radioFollowDeviceTheme) + radioAutoBatteryTheme.addToRadioGroup(radioFollowDeviceTheme) + + radioFollowDeviceTheme.addToRadioGroup(radioDarkTheme) + radioFollowDeviceTheme.addToRadioGroup(radioLightTheme) + radioFollowDeviceTheme.addToRadioGroup(radioAutoBatteryTheme) + } + } + + private fun bindLightTheme() { + val keyLightTheme = getString(R.string.pref_key_light_theme) + radioLightTheme = requireNotNull(findPreference(keyLightTheme)) + radioLightTheme.onClickListener { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) + activity?.recreate() + } + } + + private fun bindAutoBatteryTheme() { + val keyBatteryTheme = getString(R.string.pref_key_auto_battery_theme) + radioAutoBatteryTheme = requireNotNull(findPreference(keyBatteryTheme)) + radioAutoBatteryTheme.onClickListener { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY) + activity?.recreate() + } + } + + private fun bindDarkTheme() { + val keyDarkTheme = getString(R.string.pref_key_dark_theme) + radioDarkTheme = requireNotNull(findPreference(keyDarkTheme)) + radioDarkTheme.onClickListener { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) + activity?.recreate() + } + } + + private fun bindFollowDeviceTheme() { + val keyDeviceTheme = getString(R.string.pref_key_follow_device_theme) + radioFollowDeviceTheme = requireNotNull(findPreference(keyDeviceTheme)) + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P) { + radioFollowDeviceTheme.onClickListener { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) + activity?.recreate() + } + } + } +} diff --git a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt index 84071a983..b09845c82 100644 --- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt +++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt @@ -56,6 +56,39 @@ class Settings private constructor(context: Context) { val shouldRecommendedSettingsBeActivated: Boolean get() = preferences.getBoolean(appContext.getPreferenceKey(R.string.pref_key_recommended_settings), true) + val shouldUseLightTheme: Boolean + get() = preferences.getBoolean( + appContext.getPreferenceKey(R.string.pref_key_light_theme), + false + ) + + val shouldUseDarkTheme: Boolean + get() = preferences.getBoolean( + appContext.getPreferenceKey(R.string.pref_key_dark_theme), + false + ) + + val shouldFollowDeviceTheme: Boolean + get() = preferences.getBoolean( + appContext.getPreferenceKey(R.string.pref_key_follow_device_theme), + false + ) + + val shouldUseAutoBatteryTheme: Boolean + get() = preferences.getBoolean( + appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme), + false + ) + + val themeSettingString: String + get() = when { + shouldFollowDeviceTheme -> appContext.getString(R.string.preference_follow_device_theme) + shouldUseAutoBatteryTheme -> appContext.getString(R.string.preference_auto_battery_theme) + shouldUseDarkTheme -> appContext.getString(R.string.preference_dark_theme) + shouldUseLightTheme -> appContext.getString(R.string.preference_light_theme) + else -> appContext.getString(R.string.preference_light_theme) + } + private val autoBounceQuickActionSheetCount: Int get() = (preferences.getInt(appContext.getPreferenceKey(R.string.pref_key_bounce_quick_action), 0)) diff --git a/app/src/main/res/drawable-night-xxxhdpi/ic_logo_wordmark.png b/app/src/main/res/drawable-night-xxxhdpi/ic_logo_wordmark.png new file mode 100644 index 000000000..6b11e82ed Binary files /dev/null and b/app/src/main/res/drawable-night-xxxhdpi/ic_logo_wordmark.png differ diff --git a/app/src/main/res/drawable/home_search_background_light.xml b/app/src/main/res/drawable/home_search_background_normal.xml similarity index 74% rename from app/src/main/res/drawable/home_search_background_light.xml rename to app/src/main/res/drawable/home_search_background_normal.xml index 9c39c1019..dc41829fe 100644 --- a/app/src/main/res/drawable/home_search_background_light.xml +++ b/app/src/main/res/drawable/home_search_background_normal.xml @@ -3,10 +3,10 @@ - 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/. --> - + + android:color="@color/search_stroke_normal"/> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_customize.xml b/app/src/main/res/drawable/ic_customize.xml new file mode 100644 index 000000000..78d3ae49b --- /dev/null +++ b/app/src/main/res/drawable/ic_customize.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_drawer_pull_tab.xml b/app/src/main/res/drawable/ic_drawer_pull_tab.xml index ab9f6d465..04a234c92 100644 --- a/app/src/main/res/drawable/ic_drawer_pull_tab.xml +++ b/app/src/main/res/drawable/ic_drawer_pull_tab.xml @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_private_browsing.xml b/app/src/main/res/drawable/ic_private_browsing.xml index f3ad44d43..223ade8f7 100644 --- a/app/src/main/res/drawable/ic_private_browsing.xml +++ b/app/src/main/res/drawable/ic_private_browsing.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:fillColor="?attr/privateBrowsingButtonTint" /> diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml index 461c9c33b..f84287b39 100644 --- a/app/src/main/res/drawable/ic_settings.xml +++ b/app/src/main/res/drawable/ic_settings.xml @@ -1,4 +1,5 @@ - + android:fillColor="?attr/iconColor" + android:pathData="M20.75,11C21.3023,11 21.75,11.4477 21.75,12C21.75,12.5523 21.3023,13 20.75,13L17.91,13C17.7599,13.8907 17.4094,14.7356 16.885,15.471L18.894,17.48C19.273,17.8724 19.2676,18.4961 18.8818,18.8818C18.4961,19.2676 17.8724,19.273 17.48,18.894L15.471,16.885C14.7356,17.4094 13.8907,17.7599 13,17.91L13,20.75C13,21.3023 12.5523,21.75 12,21.75C11.4477,21.75 11,21.3023 11,20.75L11,17.91C10.0912,17.7564 9.2303,17.3943 8.485,16.852C8.445,16.9354 8.3935,17.0129 8.332,17.082L6.52,18.894C6.2689,19.154 5.8971,19.2582 5.5475,19.1667C5.1979,19.0752 4.9248,18.8021 4.8333,18.4525C4.7418,18.1029 4.846,17.7311 5.106,17.48L6.918,15.668C6.9871,15.6065 7.0646,15.555 7.148,15.515C6.6057,14.7697 6.2436,13.9088 6.09,13L3.25,13C2.6977,13 2.25,12.5523 2.25,12C2.25,11.4477 2.6977,11 3.25,11L6.09,11C6.2401,10.1093 6.5906,9.2644 7.115,8.529L5.106,6.52C4.727,6.1276 4.7324,5.5039 5.1182,5.1182C5.5039,4.7324 6.1276,4.727 6.52,5.106L8.529,7.115C9.2644,6.5906 10.1093,6.2401 11,6.09L11,3.25C11,2.6977 11.4477,2.25 12,2.25C12.5523,2.25 13,2.6977 13,3.25L13,6.09C13.8907,6.2401 14.7356,6.5906 15.471,7.115L17.48,5.106C17.8724,4.727 18.4961,4.7324 18.8818,5.1182C19.2676,5.5039 19.273,6.1276 18.894,6.52L16.885,8.529C17.4094,9.2644 17.7599,10.1093 17.91,11L20.75,11ZM8,12C8,13.0609 8.4214,14.0783 9.1716,14.8284C9.9217,15.5786 10.9391,16 12,16C14.2091,16 16,14.2091 16,12C16,9.7909 14.2091,8 12,8C9.7909,8 8,9.7909 8,12Z" /> diff --git a/app/src/main/res/drawable/sign_in_preference_background.xml b/app/src/main/res/drawable/sign_in_preference_background.xml index c415797bb..bc316be0f 100644 --- a/app/src/main/res/drawable/sign_in_preference_background.xml +++ b/app/src/main/res/drawable/sign_in_preference_background.xml @@ -12,7 +12,7 @@ - + diff --git a/app/src/main/res/layout/bookmark_row.xml b/app/src/main/res/layout/bookmark_row.xml index ff19b38cf..cd5a6c511 100644 --- a/app/src/main/res/layout/bookmark_row.xml +++ b/app/src/main/res/layout/bookmark_row.xml @@ -48,6 +48,7 @@ android:layout_margin="10dp" android:contentDescription="@string/bookmark_menu_content_description" android:src="@drawable/ic_menu" + android:tint="?attr/iconColor" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/component_awesomebar.xml b/app/src/main/res/layout/component_awesomebar.xml index 31d2be151..500e56c0c 100644 --- a/app/src/main/res/layout/component_awesomebar.xml +++ b/app/src/main/res/layout/component_awesomebar.xml @@ -2,19 +2,16 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/component_history.xml b/app/src/main/res/layout/component_history.xml index b322d5336..aefb1be8c 100644 --- a/app/src/main/res/layout/component_history.xml +++ b/app/src/main/res/layout/component_history.xml @@ -28,7 +28,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/history_delete_all" - android:textColor="@color/photonRed60" + android:textColor="?attr/deleteColor" android:drawablePadding="8dp" android:textSize="16sp" android:gravity="center" diff --git a/app/src/main/res/layout/component_tabs.xml b/app/src/main/res/layout/component_tabs.xml index ba7488c2d..b99dd8cef 100644 --- a/app/src/main/res/layout/component_tabs.xml +++ b/app/src/main/res/layout/component_tabs.xml @@ -75,13 +75,14 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:clickable="false" + android:drawableTint="@color/save_session_button_text_color" android:drawableStart="@drawable/ic_archive" android:drawablePadding="8dp" android:focusable="false" android:gravity="center" android:textStyle="bold" android:text="@string/session_save" - android:textColor="@color/photonWhite" /> + android:textColor="@color/save_session_button_text_color" /> + android:background="?attr/quickActionBackgroundColor"> + android:background="?attr/quickActionBackgroundColor"> @@ -45,6 +46,7 @@ android:layout_marginBottom="8dp" android:text="@string/tabs_header_title" android:textAppearance="@style/HeaderTextStyle" + android:textColor="?attr/toolbarTextColor" app:layout_constraintStart_toEndOf="@id/current_session_image" app:layout_constraintTop_toTopOf="parent" /> @@ -58,6 +60,7 @@ android:fadingEdgeLength="48dp" android:requiresFadingEdge="vertical" android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" + android:textColor="?attr/secondaryTextColor" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0" @@ -73,15 +76,15 @@ android:id="@+id/delete_session_button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/colorBackground" + android:background="?attr/sessionBackgroundColor" android:drawableStart="@drawable/ic_delete" android:drawablePadding="14dp" - android:drawableTint="@color/photonRed60" + android:drawableTint="?attr/deleteColor" android:paddingStart="20dp" android:paddingTop="12dp" android:paddingBottom="12dp" android:text="@string/current_session_delete" - android:textColor="@color/photonRed60" + android:textColor="?attr/deleteColor" android:textSize="16sp" tools:targetApi="m" /> @@ -94,29 +97,31 @@ android:id="@+id/archive_session_button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/colorBackground" + android:background="?attr/sessionBackgroundColor" android:drawableStart="@drawable/ic_archive" android:drawablePadding="14dp" + android:drawableTint="?attr/iconColor" android:paddingStart="20dp" android:paddingTop="12dp" android:paddingBottom="12dp" android:text="@string/current_session_save" - android:textColor="@color/light_mode_bottom_sheet_text_color" - android:textSize="16sp" /> + android:textColor="?attr/toolbarTextColor" + android:textSize="16sp" + tools:targetApi="m" /> - + android:textColor="?attr/toolbarTextColor" + android:textSize="16sp" + tools:targetApi="m" /> \ No newline at end of file diff --git a/app/src/main/res/layout/session_item.xml b/app/src/main/res/layout/session_item.xml index 7fe8d50b8..eef05cbcf 100644 --- a/app/src/main/res/layout/session_item.xml +++ b/app/src/main/res/layout/session_item.xml @@ -6,9 +6,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="96dp" + app:cardBackgroundColor="@color/sessionBackgroundColor_normal_theme" android:layout_marginTop="8dp" android:layout_marginBottom="8dp" - android:background="@android:color/white" app:cardCornerRadius="10dp" app:cardElevation="5dp"> @@ -35,7 +35,7 @@ android:layout_marginEnd="12dp" android:layout_marginBottom="5dp" android:textAppearance="@style/Header14TextStyle" - android:textColor="@color/photonInk80" + android:textColor="?attr/primaryTextColor" android:textSize="16sp" app:layout_constraintEnd_toStartOf="@id/session_card_overflow_button" app:layout_constraintStart_toEndOf="@+id/session_card_thumbnail" @@ -45,6 +45,7 @@ android:id="@+id/session_card_titles" android:layout_width="0dp" android:layout_height="wrap_content" + android:textColor="?attr/secondaryTextColor" android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" app:layout_constraintEnd_toEndOf="@id/session_card_timestamp" app:layout_constraintStart_toStartOf="@id/session_card_timestamp" @@ -54,6 +55,7 @@ android:id="@+id/session_card_extras" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:textColor="?attr/secondaryTextColor" android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" app:layout_constraintStart_toStartOf="@id/session_card_titles" app:layout_constraintTop_toBottomOf="@+id/session_card_titles" /> diff --git a/app/src/main/res/layout/tab_list_row.xml b/app/src/main/res/layout/tab_list_row.xml index 912253e0d..5193d1a2b 100644 --- a/app/src/main/res/layout/tab_list_row.xml +++ b/app/src/main/res/layout/tab_list_row.xml @@ -8,6 +8,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="8dp" + app:cardBackgroundColor="?attr/sessionBackgroundColor" android:clipToPadding="false" app:cardCornerRadius="@dimen/tab_corner_radius" app:cardElevation="5dp"> @@ -34,7 +35,7 @@ android:ellipsize="none" android:requiresFadingEdge="horizontal" android:singleLine="true" - android:textColor="?attr/toolbarTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="16sp" app:layout_constraintEnd_toStartOf="@id/close_tab_button" app:layout_constraintHorizontal_bias="0" diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index 2951a2ebd..b78cbf8e0 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -137,6 +137,9 @@ + @@ -175,4 +178,8 @@ + \ No newline at end of file diff --git a/app/src/main/res/values-night/bools.xml b/app/src/main/res/values-night/bools.xml new file mode 100644 index 000000000..73f4a60e8 --- /dev/null +++ b/app/src/main/res/values-night/bools.xml @@ -0,0 +1,7 @@ + + + + false + diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 000000000..83556834d --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,77 @@ + + + + @color/secondaryTextColor_dark_theme + @color/off_white + @color/disabled_icons_dark_mode + @color/background_dark_theme + @color/background_dark_theme + @color/background_dark_theme + @color/off_white + @color/foreground_dark_theme + #A374F7 + @color/off_white + + @android:color/transparent + @android:color/transparent + + + @color/background_dark_theme + + + @color/off_white + @color/off_white + @color/off_white + @color/background_dark_theme + @color/background_dark_theme + @color/home_buttons_dark_theme + @color/home_buttons_dark_theme + + + @color/foreground_dark_theme + #27262F + @color/foreground_dark_theme + @color/foreground_dark_theme + + + @color/foreground_dark_theme + + + @color/foreground_dark_theme + #592ACB + #EFEFF2 + #1E1338 + #e5e5ea + #EB5D63 + @color/foreground_dark_theme + @color/off_white + @color/off_white + @color/off_white + + @color/off_white + #E3E3E6 + + + @color/off_white + + + #A374F7 + @color/off_white + @color/foreground_dark_theme + + + @color/background_dark_theme + @color/background_dark_theme + @color/off_white + #202340 + + + @color/off_white + @color/secondaryTextColor_dark_theme + + + @color/secondaryTextColor_dark_theme + @color/background_dark_theme + diff --git a/app/src/main/res/values-v23/styles.xml b/app/src/main/res/values-v23/styles.xml index 63003b0a3..a7600cd56 100644 --- a/app/src/main/res/values-v23/styles.xml +++ b/app/src/main/res/values-v23/styles.xml @@ -3,12 +3,12 @@ - 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/. --> - - \ No newline at end of file diff --git a/app/src/main/res/values-v28/bools.xml b/app/src/main/res/values-v28/bools.xml new file mode 100644 index 000000000..abc07ff3d --- /dev/null +++ b/app/src/main/res/values-v28/bools.xml @@ -0,0 +1,7 @@ + + + + true + diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 9c288338a..a822adcdd 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -13,6 +13,8 @@ + + @@ -28,6 +30,7 @@ + @@ -43,6 +46,7 @@ + diff --git a/app/src/main/res/values/bools.xml b/app/src/main/res/values/bools.xml new file mode 100644 index 000000000..8aaae0c77 --- /dev/null +++ b/app/src/main/res/values/bools.xml @@ -0,0 +1,8 @@ + + + + true + false + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index adc0c7d55..a49c12f64 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,57 +3,92 @@ - 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/. --> + #544CD9 #202340 #D81B60 - #F2F2F5 - #DFDFE3 - #20123A - - #212121 - #6b6b6b - #F2F2F5 - #E9E9ED - #4f4e75 - #42416b - #393863 - #c5c8d7 - #0A202340 - #2d2e5f - #0C0C0D #f9f9fa - #E9E9ED + #6b6b6b + #20123A + + + #DFDFE3 + + + #1C1B22 + #32313C + #A2A1A5 + #A4A3AA + + + #696A6A + @color/text_color_normal_theme + #696A6A + #20123A + #8020233E + @color/off_white + @color/off_white + @color/off_white + @color/off_white + #2E0EC1 + @color/off_white + @android:color/transparent + @android:color/transparent + @color/off_white + @color/off_white + @color/menu_button_tint_normal_theme + @color/off_white + + @color/off_white + #c5c8d7 + #0A202340 + + @color/photonGrey30 + @color/photonWhite #592ACB #352F65 - #232749 - - #20123A - #8020233E - - @color/off_white - #80F9F9FA - - @color/off_white - @color/private_browsing_top_gradient - + @color/off_white + #232749 + #F2F2F5 + @color/off_white + @color/photonBlue50 + #202340 #1A665BFD #544CD9 #6D6D6E - #4a4671 + @color/photonInk80 #e5e5ea + @color/photonRed60 + #FAFAFC + #2f2c61 + #202340 + #212121 + #6b6b6b + #0C0C0D + #E9E9ED + #20123A + #F2F2F5 + #E9E9ED - #2E0EC1 - + + #4f4e75 + #42416b + #393863 + #2d2e5f + @color/off_white + #80F9F9FA + @color/private_browsing_top_gradient + #4a4671 #ad3bff #242251 #393862 - - #FAFAFC - #2f2c61 #080639 - #202340 + @color/photonGrey40 + @color/off_white + @color/photonGrey40 + #B9F0FD #0E214A @@ -72,17 +107,11 @@ #FCE98F #8A201F - #696A6A - @color/light_mode_text_color - #696A6A - - @color/photonGrey40 - @color/off_white - @color/photonGrey40 - + #312a65 #efeff2 + #174291 #b9f0fd @@ -90,6 +119,6 @@ #fce98f #2915141A - - #202340 + @color/toolbar_normal_theme + @color/toolbar_dark_mode diff --git a/app/src/main/res/values/preference_keys.xml b/app/src/main/res/values/preference_keys.xml index 3383ac1d3..3282e687d 100644 --- a/app/src/main/res/values/preference_keys.xml +++ b/app/src/main/res/values/preference_keys.xml @@ -49,4 +49,9 @@ pref_key_phone_feature_notification pref_key_category_phone_feature + + pref_key_light_theme + pref_key_dark_theme + pref_key_auto_battery_theme + pref_key_follow_device_theme diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e18aad9e4..adffb9789 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -119,6 +119,8 @@ Account Sign in + + Theme Sync bookmarks, history, and more with your Firefox Account @@ -168,6 +170,16 @@ Fenix health report + + + Light + + Dark + + Set by Battery Saver + + Follow device theme + Share diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 70f14fddc..0667ecbcc 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -4,68 +4,77 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - @@ -80,6 +89,8 @@ @color/toolbar_dark_mode @color/private_browsing_primary @color/private_browsing_primary + @color/off_white + @color/photonGrey40 @color/private_browsing_bottom_gradient @@ -98,7 +109,7 @@ @color/search_private_background @color/session_list_private_header @color/private_browsing_primary - @color/off_white + @color/photonRed60 @color/private_browsing_bottom_gradient @@ -114,6 +125,8 @@ @color/private_browsing_top_gradient @color/icons_dark_mode @color/icons_dark_mode + @color/off_white + @color/quick_action_background_private_theme @color/history_title_private_theme @@ -169,7 +182,7 @@