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

Unified Diff: ash/common/system/tray/tray_background_view.cc

Issue 2679133003: [ash-md] Wired in the Shelf color to be derived from the Wallpaper. (Closed)
Patch Set: Addressed nits. Created 3 years, 10 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 | « ash/common/system/tray/tray_background_view.h ('k') | ash/common/wallpaper/wallpaper_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_background_view.cc
diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
index 1b5098f665597835615a71e126d37dc6ad63bca1..fb988555461b5df0a564ecaa62eaf36c381cc646 100644
--- a/ash/common/system/tray/tray_background_view.cc
+++ b/ash/common/system/tray/tray_background_view.cc
@@ -117,11 +117,11 @@ class TrayBackground : public views::Background {
TrayBackground(TrayBackgroundView* tray_background_view, bool draws_active)
: tray_background_view_(tray_background_view),
draws_active_(draws_active),
- alpha_(0) {}
+ color_(SK_ColorTRANSPARENT) {}
~TrayBackground() override {}
- void set_alpha(int alpha) { alpha_ = alpha; }
+ void set_color(SkColor color) { color_ = color; }
private:
WmShelf* GetShelf() const { return tray_background_view_->shelf(); }
@@ -129,7 +129,7 @@ class TrayBackground : public views::Background {
void PaintMaterial(gfx::Canvas* canvas, views::View* view) const {
cc::PaintFlags background_flags;
background_flags.setFlags(cc::PaintFlags::kAntiAlias_Flag);
- background_flags.setColor(SkColorSetA(kShelfBaseColor, alpha_));
+ background_flags.setColor(color_);
gfx::Insets insets =
GetMirroredBackgroundInsets(GetShelf()->GetAlignment());
gfx::Rect bounds = view->GetLocalBounds();
@@ -205,7 +205,7 @@ class TrayBackground : public views::Background {
// is removed (see https://crbug.com/614453).
bool draws_active_;
- int alpha_;
+ SkColor color_;
DISALLOW_COPY_AND_ASSIGN(TrayBackground);
};
@@ -514,9 +514,9 @@ void TrayBackgroundView::UpdateBubbleViewArrow(
// Nothing to do here.
}
-void TrayBackgroundView::UpdateShelfItemBackground(int alpha) {
+void TrayBackgroundView::UpdateShelfItemBackground(SkColor color) {
if (background_) {
- background_->set_alpha(alpha);
+ background_->set_color(color);
SchedulePaint();
}
}
« no previous file with comments | « ash/common/system/tray/tray_background_view.h ('k') | ash/common/wallpaper/wallpaper_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698