| Index: ash/shelf/shelf_button.cc
|
| diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
|
| index f8c930d29ce9c4c65a5441bc013f0b3692b0ba3f..42c20c1a0cffa8e302f2f11b37d9aa24694aa425 100644
|
| --- a/ash/shelf/shelf_button.cc
|
| +++ b/ash/shelf/shelf_button.cc
|
| @@ -27,6 +27,8 @@
|
| #include "ui/views/animation/square_ink_drop_ripple.h"
|
| #include "ui/views/controls/image_view.h"
|
|
|
| +#include "base/debug/stack_trace.h"
|
| +
|
| namespace {
|
|
|
| const int kIconSize = 32;
|
| @@ -142,6 +144,7 @@ class ShelfButton::AppStatusIndicatorView
|
| ? ShelfButtonAnimation::GetInstance()->GetAlpha()
|
| : SK_AlphaOPAQUE;
|
| canvas->SaveLayerAlpha(alpha);
|
| + LOG(ERROR) << "Alpha: " << alpha;
|
| }
|
|
|
| DCHECK_EQ(width(), height());
|
| @@ -150,6 +153,10 @@ class ShelfButton::AppStatusIndicatorView
|
| const int kStrokeWidthPx = 1;
|
| gfx::PointF center = gfx::RectF(GetLocalBounds()).CenterPoint();
|
| center.Scale(dsf);
|
| + LOG(ERROR) << "CENTER:" << GetLocalBounds().ToString()
|
| + << ", center = " << center.ToString()
|
| + << ", dsf=" << dsf
|
| + << ", image scale=" << canvas->image_scale();
|
|
|
| // Fill the center.
|
| cc::PaintFlags flags;
|
| @@ -216,6 +223,9 @@ ShelfButton::ShelfButton(InkDropButtonListener* listener, ShelfView* shelf_view)
|
| set_ink_drop_base_color(kShelfInkDropBaseColor);
|
| set_ink_drop_visible_opacity(kShelfInkDropVisibleOpacity);
|
|
|
| + //indicator_->SetPaintToLayer();
|
| + //indicator_->layer()->SetFillsBoundsOpaquely(false);
|
| +
|
| const gfx::ShadowValue kShadows[] = {
|
| gfx::ShadowValue(gfx::Vector2d(0, 2), 0, SkColorSetARGB(0x1A, 0, 0, 0)),
|
| gfx::ShadowValue(gfx::Vector2d(0, 3), 1, SkColorSetARGB(0x1A, 0, 0, 0)),
|
| @@ -224,15 +234,15 @@ ShelfButton::ShelfButton(InkDropButtonListener* listener, ShelfView* shelf_view)
|
| icon_shadows_.assign(kShadows, kShadows + arraysize(kShadows));
|
|
|
| // TODO: refactor the layers so each button doesn't require 2.
|
| - icon_view_->SetPaintToLayer();
|
| - icon_view_->layer()->SetFillsBoundsOpaquely(false);
|
| + //icon_view_->SetPaintToLayer();
|
| + //icon_view_->layer()->SetFillsBoundsOpaquely(false);
|
| icon_view_->SetHorizontalAlignment(views::ImageView::CENTER);
|
| icon_view_->SetVerticalAlignment(views::ImageView::LEADING);
|
| // Do not make this interactive, so that events are sent to ShelfView.
|
| icon_view_->set_can_process_events_within_subtree(false);
|
|
|
| - AddChildView(indicator_);
|
| AddChildView(icon_view_);
|
| + AddChildView(indicator_);
|
| }
|
|
|
| ShelfButton::~ShelfButton() {
|
|
|