| Index: ash/common/shelf/overflow_button.cc
|
| diff --git a/ash/common/shelf/overflow_button.cc b/ash/common/shelf/overflow_button.cc
|
| index 6a8585750c7b971d02bd366fab49fbebf2915ea9..03fe492f67312271089524edf48623c9ca9fa567 100644
|
| --- a/ash/common/shelf/overflow_button.cc
|
| +++ b/ash/common/shelf/overflow_button.cc
|
| @@ -31,7 +31,8 @@ OverflowButton::OverflowButton(InkDropButtonListener* listener,
|
| : CustomButton(nullptr),
|
| bottom_image_(nullptr),
|
| listener_(listener),
|
| - wm_shelf_(wm_shelf) {
|
| + wm_shelf_(wm_shelf),
|
| + background_alpha_(0) {
|
| if (MaterialDesignController::IsShelfMaterial()) {
|
| bottom_image_md_ =
|
| CreateVectorIcon(gfx::VectorIconId::SHELF_OVERFLOW, kShelfIconColor);
|
| @@ -51,6 +52,11 @@ void OverflowButton::OnShelfAlignmentChanged() {
|
| SchedulePaint();
|
| }
|
|
|
| +void OverflowButton::SetBackgroundAlpha(int alpha) {
|
| + background_alpha_ = alpha;
|
| + SchedulePaint();
|
| +}
|
| +
|
| void OverflowButton::OnPaint(gfx::Canvas* canvas) {
|
| gfx::Rect bounds = CalculateButtonBounds();
|
| PaintBackground(canvas, bounds);
|
| @@ -66,18 +72,9 @@ void OverflowButton::NotifyClick(const ui::Event& event) {
|
| void OverflowButton::PaintBackground(gfx::Canvas* canvas,
|
| const gfx::Rect& bounds) {
|
| if (MaterialDesignController::IsShelfMaterial()) {
|
| - SkColor background_color = SK_ColorTRANSPARENT;
|
| - if (wm_shelf_->GetBackgroundType() ==
|
| - ShelfBackgroundType::SHELF_BACKGROUND_DEFAULT) {
|
| - background_color = SkColorSetA(kShelfBaseColor,
|
| - GetShelfConstant(SHELF_BACKGROUND_ALPHA));
|
| - }
|
| -
|
| - // TODO(bruthig|tdanderson): The background should be changed using a
|
| - // fade in/out animation.
|
| SkPaint background_paint;
|
| background_paint.setFlags(SkPaint::kAntiAlias_Flag);
|
| - background_paint.setColor(background_color);
|
| + background_paint.setColor(SkColorSetA(kShelfBaseColor, background_alpha_));
|
| canvas->DrawRoundRect(bounds, kOverflowButtonCornerRadius,
|
| background_paint);
|
|
|
|
|