Skip to content

Commit

Permalink
[M106][DownloadBubble] Adjust toolbar active color based on theme.
Browse files Browse the repository at this point in the history
before: http://screen/QrAPdAVytvJu6Ec
after: http://screen/B3ffSyAh7JMgkHW

(cherry picked from commit 37b4e28)

Bug: 1354650
Change-Id: I04ba7edfdfdd2f470cd241183dbcd35e42165adb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3842692
Reviewed-by: Rohit Bhatia <bhatiarohit@google.com>
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1037212}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3846330
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/branch-heads/5249@{#18}
Cr-Branched-From: 4f7bea5-refs/heads/main@{#1036826}
  • Loading branch information
Xinghui Lu authored and Chromium LUCI CQ committed Aug 22, 2022
1 parent 09f8f98 commit 4ecdb53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/browser/ui/color/chrome_color_mixer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ void AddChromeColorMixer(ui::ColorProvider* provider,
kColorToolbarButtonIcon, kColorDownloadShelfBackground, 0x3A);
mixer[kColorDownloadShelfForeground] = {kColorToolbarText};
mixer[kColorDownloadStartedAnimationForeground] = {ui::kColorAccent};
mixer[kColorDownloadToolbarButtonActive] = {ui::kColorThrobber};
mixer[kColorDownloadToolbarButtonActive] =
ui::PickGoogleColor(ui::kColorThrobber, kColorToolbar,
color_utils::kMinimumVisibleContrastRatio);
mixer[kColorDownloadToolbarButtonInactive] = {kColorToolbarButtonIcon};
mixer[kColorDownloadToolbarButtonRingBackground] = {
SkColorSetA(kColorDownloadToolbarButtonInactive, 0x33)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ void DownloadToolbarButtonView::ButtonPressed() {
controller_->OnButtonPressed();
}

void DownloadToolbarButtonView::OnThemeChanged() {
ToolbarButton::OnThemeChanged();
UpdateIcon();
}

std::unique_ptr<views::View> DownloadToolbarButtonView::CreateRowListView(
std::vector<DownloadUIModel::DownloadUIModelPtr> model_list) {
// Do not create empty partial view.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class DownloadToolbarButtonView : public ToolbarButton,

// ToolbarButton:
void UpdateIcon() override;
void OnThemeChanged() override;

// DownloadBubbleNavigationHandler:
void OpenPrimaryDialog() override;
Expand Down

0 comments on commit 4ecdb53

Please sign in to comment.