diff --git a/browser/ui/views/location_bar/brave_location_bar_view.cc b/browser/ui/views/location_bar/brave_location_bar_view.cc index 4fd4fe323d33..8d1585882a12 100644 --- a/browser/ui/views/location_bar/brave_location_bar_view.cc +++ b/browser/ui/views/location_bar/brave_location_bar_view.cc @@ -88,6 +88,17 @@ OmniboxTint BraveLocationBarView::GetTint() { } } + +void BraveLocationBarView::OnThemeChanged() { + LocationBarView::OnThemeChanged(); + + if (!IsInitialized()) + return; + + Update(nullptr); + RefreshBackground(); +} + // Provide base class implementation for Update override that has been added to // header via a patch. This should never be called as the only instantiated // implementation should be our |BraveLocationBarView|. diff --git a/browser/ui/views/location_bar/brave_location_bar_view.h b/browser/ui/views/location_bar/brave_location_bar_view.h index e8f7d6d4bf53..9bc17e6395dc 100644 --- a/browser/ui/views/location_bar/brave_location_bar_view.h +++ b/browser/ui/views/location_bar/brave_location_bar_view.h @@ -20,6 +20,8 @@ class BraveLocationBarView : public LocationBarView { void Update(const content::WebContents* contents) override; void OnChanged() override; gfx::Size CalculatePreferredSize() const override; + void OnThemeChanged() override; + private: void UpdateBookmarkStarVisibility() override; OmniboxTint GetTint() override;