Skip to content

Commit

Permalink
Merge pull request #408 from brave/location_bar
Browse files Browse the repository at this point in the history
Update location bar when brave theme changes
  • Loading branch information
petemill committed Sep 6, 2018
1 parent 066d724 commit f99debb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions browser/ui/views/location_bar/brave_location_bar_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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|.
Expand Down
2 changes: 2 additions & 0 deletions browser/ui/views/location_bar/brave_location_bar_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f99debb

Please sign in to comment.