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

Unified Diff: ash/common/shelf/app_list_button.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/shelf/app_list_button.h ('k') | ash/common/shelf/overflow_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/app_list_button.cc
diff --git a/ash/common/shelf/app_list_button.cc b/ash/common/shelf/app_list_button.cc
index 0f96da5a3bbb1b799d27b6cc03cc974989ce09e4..a2c9227ec3a6b77de89ba76dcb80c43395f81404 100644
--- a/ash/common/shelf/app_list_button.cc
+++ b/ash/common/shelf/app_list_button.cc
@@ -38,7 +38,7 @@ AppListButton::AppListButton(InkDropButtonListener* listener,
: views::ImageButton(nullptr),
is_showing_app_list_(false),
draw_background_as_active_(false),
- background_alpha_(0),
+ background_color_(kShelfDefaultBaseColor),
listener_(listener),
shelf_view_(shelf_view),
wm_shelf_(wm_shelf) {
@@ -78,8 +78,8 @@ void AppListButton::OnAppListDismissed() {
wm_shelf_->UpdateAutoHideState();
}
-void AppListButton::SetBackgroundAlpha(int alpha) {
- background_alpha_ = alpha;
+void AppListButton::UpdateShelfItemBackground(SkColor color) {
+ background_color_ = color;
SchedulePaint();
}
@@ -165,7 +165,7 @@ void AppListButton::PaintMd(gfx::Canvas* canvas) {
// Paint the circular background.
cc::PaintFlags bg_flags;
- bg_flags.setColor(SkColorSetA(kShelfBaseColor, background_alpha_));
+ bg_flags.setColor(background_color_);
bg_flags.setFlags(cc::PaintFlags::kAntiAlias_Flag);
bg_flags.setStyle(cc::PaintFlags::kFill_Style);
canvas->DrawCircle(circle_center, kAppListButtonRadius, bg_flags);
« no previous file with comments | « ash/common/shelf/app_list_button.h ('k') | ash/common/shelf/overflow_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698