From 14eb2af876ec24473240b789352cfe1b9acc1f0a Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Thu, 14 Sep 2017 00:04:52 +0300 Subject: [PATCH] Give CustomButton a focus painter. https://chromium-review.googlesource.com/c/chromium/src/+/516824 --- atom/browser/ui/views/submenu_button.cc | 4 ++-- atom/browser/ui/views/submenu_button.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/browser/ui/views/submenu_button.cc b/atom/browser/ui/views/submenu_button.cc index aabed323d2b7..3c3cff3c6541 100644 --- a/atom/browser/ui/views/submenu_button.cc +++ b/atom/browser/ui/views/submenu_button.cc @@ -77,8 +77,8 @@ void SubmenuButton::SetUnderlineColor(SkColor color) { underline_color_ = color; } -void SubmenuButton::OnPaint(gfx::Canvas* canvas) { - views::MenuButton::OnPaint(canvas); +void SubmenuButton::PaintButtonContents(gfx::Canvas* canvas) { + views::MenuButton::PaintButtonContents(canvas); if (show_underline_ && (underline_start_ != underline_end_)) { int padding = (width() - text_width_) / 2; diff --git a/atom/browser/ui/views/submenu_button.h b/atom/browser/ui/views/submenu_button.h index 901234fdf54c..5c05481cbbfb 100644 --- a/atom/browser/ui/views/submenu_button.h +++ b/atom/browser/ui/views/submenu_button.h @@ -27,7 +27,7 @@ class SubmenuButton : public views::MenuButton { base::char16 accelerator() const { return accelerator_; } // views::MenuButton: - void OnPaint(gfx::Canvas* canvas) override; + void PaintButtonContents(gfx::Canvas* canvas) override; // views::InkDropHostView: std::unique_ptr CreateInkDropRipple() const override;