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

Unified Diff: ash/common/shelf/overflow_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/overflow_button.h ('k') | ash/common/shelf/shelf_background_animator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/overflow_button.cc
diff --git a/ash/common/shelf/overflow_button.cc b/ash/common/shelf/overflow_button.cc
index 50eac549205252d015ed798206f61aa0e81b3916..3d57ca0a8650608f6aeaaab483bd896e03ea2fb7 100644
--- a/ash/common/shelf/overflow_button.cc
+++ b/ash/common/shelf/overflow_button.cc
@@ -35,7 +35,7 @@ OverflowButton::OverflowButton(ShelfView* shelf_view, WmShelf* wm_shelf)
bottom_image_(nullptr),
shelf_view_(shelf_view),
wm_shelf_(wm_shelf),
- background_alpha_(0) {
+ background_color_(kShelfDefaultBaseColor) {
DCHECK(shelf_view_);
if (MaterialDesignController::IsShelfMaterial()) {
SetInkDropMode(InkDropMode::ON);
@@ -71,8 +71,8 @@ void OverflowButton::OnOverflowBubbleHidden() {
SchedulePaint();
}
-void OverflowButton::SetBackgroundAlpha(int alpha) {
- background_alpha_ = alpha;
+void OverflowButton::UpdateShelfItemBackground(SkColor color) {
+ background_color_ = color;
SchedulePaint();
}
@@ -121,7 +121,7 @@ void OverflowButton::PaintBackground(gfx::Canvas* canvas,
if (MaterialDesignController::IsShelfMaterial()) {
cc::PaintFlags flags;
flags.setFlags(cc::PaintFlags::kAntiAlias_Flag);
- flags.setColor(SkColorSetA(kShelfBaseColor, background_alpha_));
+ flags.setColor(background_color_);
canvas->DrawRoundRect(bounds, kOverflowButtonCornerRadius, flags);
} else {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
« no previous file with comments | « ash/common/shelf/overflow_button.h ('k') | ash/common/shelf/shelf_background_animator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698