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 ddf2128cbd446991458e4fe61cf35b84b6de1161..a545f0e80df4383593d9e444609d68c4118ec937 100644 |
| --- a/ui/native_theme/native_theme_base.cc |
| +++ b/ui/native_theme/native_theme_base.cc |
| @@ -184,6 +184,9 @@ void NativeThemeBase::Paint(SkCanvas* canvas, |
| case kMenuPopupBackground: |
| PaintMenuPopupBackground(canvas, rect.size(), extra.menu_background); |
| break; |
| + case kMenuPopupSeparator: |
| + PaintMenuSeparator(canvas, state, rect, extra.menu_separator); |
| + break; |
| case kMenuItemBackground: |
| PaintMenuItemBackground(canvas, state, rect, extra.menu_item); |
| break; |
| @@ -774,6 +777,16 @@ void NativeThemeBase::PaintMenuItemBackground( |
| // By default don't draw anything over the normal background. |
| } |
| +void NativeThemeBase::PaintMenuSeparator( |
| + SkCanvas* canvas, |
| + State state, |
| + const gfx::Rect& rect, |
| + const MenuSeparatorExtraParams& menu_separator) const { |
|
sky
2017/01/25 21:57:22
Why is there rect and menu_separator.paint_rect? A
Tom (Use chromium acct)
2017/01/25 22:25:44
rect is the region the paint context is clipped to
|
| + SkPaint paint; |
| + paint.setColor(GetSystemColor(ui::NativeTheme::kColorId_MenuSeparatorColor)); |
| + canvas->drawRect(gfx::RectToSkRect(*menu_separator.paint_rect), paint); |
| +} |
| + |
| void NativeThemeBase::PaintSliderTrack(SkCanvas* canvas, |
| State state, |
| const gfx::Rect& rect, |