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

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

Issue 1857353002: Draw background opaquely on MD download items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/download/download_item_view_md.cc
diff --git a/chrome/browser/ui/views/download/download_item_view_md.cc b/chrome/browser/ui/views/download/download_item_view_md.cc
index 0d3082de0ae6d8e3c1c400175e42f5e4dee01cf8..6fcd44a45d3d220c3d4b97d428826c82e10797d1 100644
--- a/chrome/browser/ui/views/download/download_item_view_md.cc
+++ b/chrome/browser/ui/views/download/download_item_view_md.cc
@@ -462,6 +462,7 @@ void DownloadItemViewMd::GetAccessibleState(ui::AXViewState* state) {
void DownloadItemViewMd::OnThemeChanged() {
UpdateColorsFromTheme();
+ SchedulePaint();
}
void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) {
@@ -588,6 +589,12 @@ void DownloadItemViewMd::AnimationProgressed(const gfx::Animation* animation) {
}
void DownloadItemViewMd::OnPaint(gfx::Canvas* canvas) {
+ // Make sure to draw |this| opaquely. Since the toolbar color can be partially
+ // transparent, start with an opaque black backdrop.
+ canvas->DrawColor(SK_ColorBLACK);
sky 2016/04/05 20:26:55 Why is black the right color here? Sorry for a sim
Evan Stade 2016/04/05 20:46:54 Black seems more right to me than white because an
+ canvas->DrawColor(
+ GetThemeProvider()->GetColor(ThemeProperties::COLOR_TOOLBAR));
+
DrawStatusText(canvas);
DrawFilename(canvas);
DrawIcon(canvas);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698