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

Unified Diff: ui/views/controls/menu/menu_item_view.cc

Issue 2387503002: Fix menu scroll indicators and highlights overlapping the menu border. (Closed)
Patch Set: change comments 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
Index: ui/views/controls/menu/menu_item_view.cc
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index d36350e12246dc611b8de88afb5a0ec8f7d6755a..a069c33d7bd5dc5304cd879c3295cd64c47633ce 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -32,6 +32,7 @@
#include "ui/views/controls/menu/menu_separator.h"
#include "ui/views/controls/menu/submenu_view.h"
#include "ui/views/resources/grit/views_resources.h"
+#include "ui/views/round_rect_painter.h"
#include "ui/views/widget/widget.h"
namespace views {
@@ -763,6 +764,8 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
canvas->DrawColor(override_color);
} else if (render_selection) {
gfx::Rect item_bounds(0, 0, width(), height());
+ // Avoids painting over the menu border.
sky 2016/09/30 02:46:42 Doesn't MenuScrollViewContainer::Layout inset by t
Bret 2016/09/30 18:27:53 Ok... I didn't notice that layout had some weird i
+ item_bounds.Inset(views::RoundRectPainter::kBorderWidth, 0);
AdjustBoundsForRTLUI(&item_bounds);
native_theme->Paint(canvas->sk_canvas(),

Powered by Google App Engine
This is Rietveld 408576698