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

Unified Diff: ash/shelf/shelf_button.cc

Issue 2849953004: SV Test
Patch Set: Created 3 years, 8 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/BUILD.gn ('k') | ash/system/fractional_view/scale_detailed_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « ash/BUILD.gn ('k') | ash/system/fractional_view/scale_detailed_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698