Chromium Code Reviews| Index: ash/shelf/app_list_button.cc |
| diff --git a/ash/shelf/app_list_button.cc b/ash/shelf/app_list_button.cc |
| index 1fb50398c101db0230bfe64aa0f319a58a00e72f..df42c709ecc5ffcbf918b72640ff37a4e0cb053e 100644 |
| --- a/ash/shelf/app_list_button.cc |
| +++ b/ash/shelf/app_list_button.cc |
| @@ -10,6 +10,7 @@ |
| #include "ash/common/shelf/shelf_item_types.h" |
| #include "ash/common/shelf/shelf_types.h" |
| #include "ash/common/shelf/wm_shelf_util.h" |
| +#include "ash/common/system/tray/tray_constants.h" |
| #include "ash/shelf/ink_drop_button_listener.h" |
| #include "ash/shelf/shelf_layout_manager.h" |
| #include "ash/shelf/shelf_view.h" |
| @@ -30,9 +31,6 @@ |
| namespace ash { |
| -// Radius of the app list button circular background. |
| -const int kAppListButtonBackgroundRadius = 16; |
| - |
| AppListButton::AppListButton(InkDropButtonListener* listener, |
| ShelfView* shelf_view) |
| : views::ImageButton(nullptr), |
| @@ -143,12 +141,11 @@ void AppListButton::PaintBackgroundMD(gfx::Canvas* canvas) { |
| } |
| // Paint the circular background of AppList button. |
| + const int kRadius = kTrayItemSize / 2; |
|
James Cook
2016/06/27 18:04:12
nit: elsewhere you use the style "const int radius
tdanderson
2016/06/27 21:29:42
Done.
|
| gfx::Point circle_center = GetContentsBounds().CenterPoint(); |
| if (!IsHorizontalAlignment(shelf_view_->shelf()->alignment())) |
| circle_center = gfx::Point(circle_center.y(), circle_center.x()); |
| - |
| - canvas->DrawCircle(circle_center, kAppListButtonBackgroundRadius, |
| - background_paint); |
| + canvas->DrawCircle(circle_center, kRadius, background_paint); |
| if (Shell::GetInstance()->GetAppListTargetVisibility() || |
| draw_background_as_active_) { |
| @@ -156,9 +153,7 @@ void AppListButton::PaintBackgroundMD(gfx::Canvas* canvas) { |
| highlight_paint.setColor(kShelfButtonActivatedHighlightColor); |
| highlight_paint.setFlags(SkPaint::kAntiAlias_Flag); |
| highlight_paint.setStyle(SkPaint::kFill_Style); |
| - |
| - canvas->DrawCircle(circle_center, kAppListButtonBackgroundRadius, |
| - highlight_paint); |
| + canvas->DrawCircle(circle_center, kRadius, highlight_paint); |
| } |
| } |