Match account problem styling between HomeMenu and BrowserMenu

fennec/beta
David Walsh 4 years ago committed by Jeff Boek
parent d89fbd7af8
commit 0187669790

@ -29,6 +29,7 @@ import org.mozilla.fenix.ReleaseChannel
import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.browser.browsingmode.BrowsingMode
import org.mozilla.fenix.ext.asActivity import org.mozilla.fenix.ext.asActivity
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.getColorFromAttr
import org.mozilla.fenix.theme.ThemeManager import org.mozilla.fenix.theme.ThemeManager
import org.mozilla.fenix.utils.Settings import org.mozilla.fenix.utils.Settings
@ -195,14 +196,14 @@ class DefaultToolbarMenu(
label = context.getString(R.string.browser_menu_settings), label = context.getString(R.string.browser_menu_settings),
startImageResource = R.drawable.ic_settings, startImageResource = R.drawable.ic_settings,
iconTintColorResource = if (hasAccountProblem) iconTintColorResource = if (hasAccountProblem)
R.color.sync_error_text_color else ThemeManager.resolveAttribute(R.attr.syncDisconnected, context) else
primaryTextColor(), primaryTextColor(),
textColorResource = if (hasAccountProblem) textColorResource = if (hasAccountProblem)
R.color.sync_error_text_color else ThemeManager.resolveAttribute(R.attr.primaryText, context) else
primaryTextColor(), primaryTextColor(),
highlight = BrowserMenuHighlight.HighPriority( highlight = BrowserMenuHighlight.HighPriority(
endImageResource = R.drawable.ic_alert, endImageResource = R.drawable.ic_sync_disconnected,
backgroundTint = R.color.sync_error_background_color backgroundTint = context.getColorFromAttr(R.attr.syncDisconnectedBackground)
), ),
isHighlighted = { hasAccountProblem } isHighlighted = { hasAccountProblem }
) { ) {

Loading…
Cancel
Save