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

Unified Diff: ui/views/round_rect_painter.cc

Issue 2387503002: Fix menu scroll indicators and highlights overlapping the menu border. (Closed)
Patch Set: inset in layout instead Created 4 years, 3 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 | « ui/views/round_rect_painter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/round_rect_painter.cc
diff --git a/ui/views/round_rect_painter.cc b/ui/views/round_rect_painter.cc
index 1b96a125c43fa151b92b190831af35574a11739e..7673b72a380ffba06b08b73d91183741522d2b02 100644
--- a/ui/views/round_rect_painter.cc
+++ b/ui/views/round_rect_painter.cc
@@ -26,14 +26,14 @@ void RoundRectPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
SkPaint paint;
paint.setColor(border_color_);
paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(1);
+ paint.setStrokeWidth(kBorderWidth);
paint.setFlags(SkPaint::kAntiAlias_Flag);
gfx::Rect rect(size);
- rect.Inset(0, 0, 1, 1);
+ rect.Inset(0, 0, kBorderWidth, kBorderWidth);
SkRect skia_rect = gfx::RectToSkRect(rect);
- skia_rect.offset(.5, .5);
+ skia_rect.offset(kBorderWidth / 2.f, kBorderWidth / 2.f);
canvas->sk_canvas()->drawRoundRect(skia_rect, SkIntToScalar(corner_radius_),
- SkIntToScalar(corner_radius_), paint);
+ SkIntToScalar(corner_radius_), paint);
}
} // namespace views
« no previous file with comments | « ui/views/round_rect_painter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698