diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarComponent.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarComponent.kt index 231a86ad4..9907ee234 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarComponent.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarComponent.kt @@ -29,6 +29,8 @@ class ToolbarComponent( bus.getSafeManagedObservable(SearchChange::class.java) ) { + fun getView(): BrowserToolbar = uiView.toolbar + override val reducer: Reducer = { state, change -> when (change) { is SearchChange.QueryChanged -> state.copy(query = change.query) @@ -36,18 +38,25 @@ class ToolbarComponent( } override fun initView() = ToolbarUIView(sessionId, isPrivate, container, actionEmitter, changesObservable) + init { render(reducer) applyTheme() } - fun getView(): BrowserToolbar = uiView.toolbar - private fun applyTheme() { - getView().textColor = ContextCompat.getColor(container.context, - DefaultThemeManager.resolveAttribute(R.attr.awesomeBarTitleTextColor, container.context)) - getView().hintColor = ContextCompat.getColor(container.context, - DefaultThemeManager.resolveAttribute(R.attr.awesomeBarDescriptionTextColor, container.context)) + getView().suggestionBackgroundColor = ContextCompat.getColor( + container.context, + DefaultThemeManager.resolveAttribute(R.attr.suggestionBackground, container.context) + ) + getView().textColor = ContextCompat.getColor( + container.context, + DefaultThemeManager.resolveAttribute(R.attr.awesomeBarTitleTextColor, container.context) + ) + getView().hintColor = ContextCompat.getColor( + container.context, + DefaultThemeManager.resolveAttribute(R.attr.awesomeBarDescriptionTextColor, container.context) + ) } } diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 116f923ca..ef2a6b7f7 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -32,6 +32,7 @@ + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 2b4484c3d..cd9247473 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -11,6 +11,8 @@ @color/off_white @color/icons_light_mode @color/toolbar_light_mode + @color/off_white + @color/session_border_color @android:color/transparent @@ -36,6 +38,7 @@ @color/off_white @color/awesome_bar_title_color @color/awesome_bar_description_color + @color/photonBlue50 @drawable/home_search_background_dark @@ -56,6 +59,8 @@ @color/private_browsing_top_gradient @color/icons_dark_mode @color/toolbar_dark_mode + @color/private_browsing_primary + @color/private_browsing_primary @color/private_browsing_bottom_gradient @@ -81,6 +86,7 @@ @color/private_browsing_top_gradient @color/off_white @color/photonGrey40 + @color/private_browsing_primary @drawable/home_search_background_private_dark