Chromium Code Reviews| Index: ui/native_theme/native_theme_base.cc |
| diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc |
| index dcf742cc64d70b4a405b9db12a2463fd58888e77..db2ec00497960251b2e2a1061c424559613a297f 100644 |
| --- a/ui/native_theme/native_theme_base.cc |
| +++ b/ui/native_theme/native_theme_base.cc |
| @@ -772,10 +772,22 @@ void NativeThemeBase::PaintMenuList( |
| paint.setAntiAlias(true); |
| paint.setStyle(SkPaint::kFill_Style); |
| + static const int arrow_width = 6; |
| + static const int arrow_height = 6; |
|
sadrul
2015/06/16 14:25:52
This should be like:
const int kArrowWidth = 6;
|
| + |
| + gfx::Rect arrow( |
| + menu_list.arrow_x, |
| + menu_list.arrow_y - (arrow_height / 2), |
| + arrow_width, |
| + arrow_height); |
| + |
| + // Constrain to the paint rect. |
| + arrow.Intersect(rect); |
| + |
| SkPath path; |
| - path.moveTo(menu_list.arrow_x, menu_list.arrow_y - 3); |
| - path.rLineTo(6, 0); |
| - path.rLineTo(-3, 6); |
| + path.moveTo(arrow.x(), arrow.y()); |
| + path.lineTo(arrow.right(), arrow.y()); |
| + path.lineTo(arrow.x() + arrow.width() / 2, arrow.bottom()); |
| path.close(); |
| canvas->drawPath(path, paint); |
| } |