Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: chrome/browser/ui/views/download/download_shelf_view.cc

Issue 2094553002: MD - Fix coloring of buttons on DL shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compiling is always a plus Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/download/download_shelf_view.h ('k') | ui/native_theme/native_theme_dark_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/download/download_shelf_view.cc
diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc
index e474e4c0bc5057d37580f48a5108e06b72034183..0f9486f0fc8911dff90975da110acfc06d67917c 100644
--- a/chrome/browser/ui/views/download/download_shelf_view.cc
+++ b/chrome/browser/ui/views/download/download_shelf_view.cc
@@ -134,6 +134,7 @@ DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent)
shelf_animation_(this),
arrow_image_(nullptr),
show_all_view_(nullptr),
+ show_all_view_md_(nullptr),
close_button_(nullptr),
parent_(parent),
mouse_watcher_(new views::MouseWatcherViewHost(this, gfx::Insets()),
@@ -167,10 +168,9 @@ DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent)
close_button_->SetImage(views::CustomButton::STATE_PRESSED,
rb.GetImageSkiaNamed(IDR_CLOSE_1_P));
} else {
- views::LabelButton* show_all_view =
- views::MdTextButton::CreateStandardButton(
- this, l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS_MD));
- show_all_view_ = show_all_view;
+ show_all_view_md_ = views::MdTextButton::CreateMdButton(
+ this, l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS_MD));
+ show_all_view_ = show_all_view_md_;
BarControlButton* close_button = new BarControlButton(this);
close_button->SetIcon(gfx::VectorIconId::BAR_CLOSE,
@@ -392,7 +392,10 @@ void DownloadShelfView::UpdateColorsFromTheme() {
set_background(views::Background::CreateSolidBackground(
GetThemeProvider()->GetColor(ThemeProperties::COLOR_TOOLBAR)));
- if (!ui::MaterialDesignController::IsModeMaterial()) {
+ if (ui::MaterialDesignController::IsModeMaterial()) {
+ show_all_view_md_->SetEnabledTextColors(
+ GetThemeProvider()->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT));
+ } else {
views::Link* show_all_view = static_cast<views::Link*>(show_all_view_);
show_all_view->SetBackgroundColor(background()->get_color());
show_all_view->SetEnabledColor(
« no previous file with comments | « chrome/browser/ui/views/download/download_shelf_view.h ('k') | ui/native_theme/native_theme_dark_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698