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

Unified Diff: ash/common/shelf/app_list_button.cc

Issue 2679423002: ash: Clean up naming of paint-related identifiers (Closed)
Patch Set: 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/frame/default_header_painter.cc ('k') | ash/common/shelf/overflow_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/app_list_button.cc
diff --git a/ash/common/shelf/app_list_button.cc b/ash/common/shelf/app_list_button.cc
index df9544c3beb0b1baae8ff2f7ad6ab3c7e48df40b..ad6a5d6dea0ca4932c0c3100cb14e644c00341fe 100644
--- a/ash/common/shelf/app_list_button.cc
+++ b/ash/common/shelf/app_list_button.cc
@@ -164,11 +164,11 @@ void AppListButton::PaintMd(gfx::Canvas* canvas) {
gfx::PointF circle_center(GetCenterPoint());
// Paint the circular background.
- cc::PaintFlags bg_paint;
- bg_paint.setColor(SkColorSetA(kShelfBaseColor, background_alpha_));
- bg_paint.setFlags(cc::PaintFlags::kAntiAlias_Flag);
- bg_paint.setStyle(cc::PaintFlags::kFill_Style);
- canvas->DrawCircle(circle_center, kAppListButtonRadius, bg_paint);
+ cc::PaintFlags bg_flags;
+ bg_flags.setColor(SkColorSetA(kShelfBaseColor, background_alpha_));
+ bg_flags.setFlags(cc::PaintFlags::kAntiAlias_Flag);
+ bg_flags.setStyle(cc::PaintFlags::kFill_Style);
+ canvas->DrawCircle(circle_center, kAppListButtonRadius, bg_flags);
// Paint a white ring as the foreground. The ceil/dsf math assures that the
// ring draws sharply and is centered at all scale factors.
@@ -178,15 +178,15 @@ void AppListButton::PaintMd(gfx::Canvas* canvas) {
const float dsf = canvas->UndoDeviceScaleFactor();
circle_center.Scale(dsf);
- cc::PaintFlags fg_paint;
- fg_paint.setFlags(cc::PaintFlags::kAntiAlias_Flag);
- fg_paint.setStyle(cc::PaintFlags::kStroke_Style);
- fg_paint.setColor(kShelfIconColor);
+ cc::PaintFlags fg_flags;
+ fg_flags.setFlags(cc::PaintFlags::kAntiAlias_Flag);
+ fg_flags.setStyle(cc::PaintFlags::kStroke_Style);
+ fg_flags.setColor(kShelfIconColor);
const float thickness = std::ceil(kRingThicknessDp * dsf);
const float radius = std::ceil(kRingOuterRadiusDp * dsf) - thickness / 2;
- fg_paint.setStrokeWidth(thickness);
+ fg_flags.setStrokeWidth(thickness);
// Make sure the center of the circle lands on pixel centers.
- canvas->DrawCircle(circle_center, radius, fg_paint);
+ canvas->DrawCircle(circle_center, radius, fg_flags);
}
void AppListButton::PaintAppListButton(gfx::Canvas* canvas,
« no previous file with comments | « ash/common/frame/default_header_painter.cc ('k') | ash/common/shelf/overflow_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698