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

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: more commentary 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..6e896de731c3058466150d1ea6f9c12d5de9b24f 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,13 @@ 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 a black backdrop (which is the default initialized
+ // color for opaque canvases).
+ canvas->DrawColor(SK_ColorBLACK);
+ 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