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

Unified Diff: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc

Issue 1661673004: Enables hot-tracking for overflow extension buttons in the app menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restores hot-tracking of extension buttons in app menu with MD (comments) Created 4 years, 10 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: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
index 371e13dd271ee0adf8075c54a0d265eb9965ac5f..daea0ab0cf356781875b240261259a4e07395684 100644
--- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
@@ -199,7 +199,7 @@ void NativeThemeGtk2::PaintMenuItemBackground(
SkCanvas* canvas,
State state,
const gfx::Rect& rect,
- const MenuListExtraParams& menu_list) const {
+ const MenuItemExtraParams& menu_item) const {
SkColor color;
SkPaint paint;
switch (state) {
@@ -217,6 +217,12 @@ void NativeThemeGtk2::PaintMenuItemBackground(
NOTREACHED() << "Invalid state " << state;
break;
}
+ if (menu_item.corner_radius > 0) {
+ canvas->drawRoundRect(gfx::RectToSkRect(rect),
+ SkIntToScalar(menu_item.corner_radius),
+ SkIntToScalar(menu_item.corner_radius), paint);
Peter Kasting 2016/02/16 21:36:15 Nit: Shorter: const SkScalar radius = SkIntTo
varkha 2016/02/17 17:52:00 Done.
+ return;
+ }
canvas->drawRect(gfx::RectToSkRect(rect), paint);
}

Powered by Google App Engine
This is Rietveld 408576698