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

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

Issue 25144002: views: Make sure menu checks and submenu arrows have high contrast even when selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 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
« no previous file with comments | « ui/views/controls/menu/menu_image_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 040cd898616e2c8993299abe6b005721ad1391e7..4d28f25e3e54f6ee8484d192c89f875175f2f303 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -822,23 +822,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
// Render the check.
if (type_ == CHECKBOX && delegate->IsItemChecked(GetCommand())) {
- const gfx::ImageSkia* check = GetMenuCheckImage();
+ gfx::ImageSkia check = GetMenuCheckImage(IsSelected());
// Don't use config.check_width here as it's padded
// to force more padding (AURA).
- gfx::Rect check_bounds(icon_x, icon_y, check->width(), icon_height);
+ gfx::Rect check_bounds(icon_x, icon_y, check.width(), icon_height);
AdjustBoundsForRTLUI(&check_bounds);
- canvas->DrawImageInt(*check, check_bounds.x(), check_bounds.y());
+ canvas->DrawImageInt(check, check_bounds.x(), check_bounds.y());
} else if (type_ == RADIO) {
- const gfx::ImageSkia* image =
+ gfx::ImageSkia image =
GetRadioButtonImage(delegate->IsItemChecked(GetCommand()));
gfx::Rect radio_bounds(icon_x,
top_margin +
(height() - top_margin - bottom_margin -
- image->height()) / 2,
- image->width(),
- image->height());
+ image.height()) / 2,
+ image.width(),
+ image.height());
AdjustBoundsForRTLUI(&radio_bounds);
- canvas->DrawImageInt(*image, radio_bounds.x(), radio_bounds.y());
+ canvas->DrawImageInt(image, radio_bounds.x(), radio_bounds.y());
}
// Render the foreground.
@@ -897,7 +897,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
config.arrow_width) / 2,
config.arrow_width, height());
AdjustBoundsForRTLUI(&arrow_bounds);
- canvas->DrawImageInt(*GetSubmenuArrowImage(),
+ canvas->DrawImageInt(GetSubmenuArrowImage(IsSelected()),
arrow_bounds.x(), arrow_bounds.y());
}
}
« no previous file with comments | « ui/views/controls/menu/menu_image_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698