Give CustomButton a focus painter.

https://chromium-review.googlesource.com/c/chromium/src/+/516824
This commit is contained in:
Aleksei Kuzmin 2017-09-14 00:04:52 +03:00 committed by Cheng Zhao
parent e0d7b7d0fc
commit 14eb2af876
2 changed files with 3 additions and 3 deletions

View file

@ -77,8 +77,8 @@ void SubmenuButton::SetUnderlineColor(SkColor color) {
underline_color_ = color; underline_color_ = color;
} }
void SubmenuButton::OnPaint(gfx::Canvas* canvas) { void SubmenuButton::PaintButtonContents(gfx::Canvas* canvas) {
views::MenuButton::OnPaint(canvas); views::MenuButton::PaintButtonContents(canvas);
if (show_underline_ && (underline_start_ != underline_end_)) { if (show_underline_ && (underline_start_ != underline_end_)) {
int padding = (width() - text_width_) / 2; int padding = (width() - text_width_) / 2;

View file

@ -27,7 +27,7 @@ class SubmenuButton : public views::MenuButton {
base::char16 accelerator() const { return accelerator_; } base::char16 accelerator() const { return accelerator_; }
// views::MenuButton: // views::MenuButton:
void OnPaint(gfx::Canvas* canvas) override; void PaintButtonContents(gfx::Canvas* canvas) override;
// views::InkDropHostView: // views::InkDropHostView:
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;