| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/controls/menu/menu_item_view.h" | 5 #include "ui/views/controls/menu/menu_item_view.h" |
| 6 | 6 |
| 7 #include <uxtheme.h> | 7 #include <uxtheme.h> |
| 8 #include <Vssym32.h> | 8 #include <Vssym32.h> |
| 9 | 9 |
| 10 #include "grit/ui_strings.h" | 10 #include "grit/ui_strings.h" |
| 11 #include "ui/base/native_theme/native_theme_win.h" |
| 11 #include "ui/gfx/canvas.h" | 12 #include "ui/gfx/canvas.h" |
| 12 #include "ui/base/native_theme/native_theme_win.h" | |
| 13 #include "ui/views/controls/menu/menu_config.h" | 13 #include "ui/views/controls/menu/menu_config.h" |
| 14 #include "ui/views/controls/menu/submenu_view.h" | 14 #include "ui/views/controls/menu/submenu_view.h" |
| 15 | 15 |
| 16 using ui::NativeTheme; | 16 using ui::NativeTheme; |
| 17 | 17 |
| 18 namespace views { | 18 namespace views { |
| 19 | 19 |
| 20 void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { | 20 void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { |
| 21 const MenuConfig& config = MenuConfig::instance(); | 21 const MenuConfig& config = MenuConfig::instance(); |
| 22 bool render_selection = | 22 bool render_selection = |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 NativeTheme::kMenuCheckBackground, state, bg_bounds, extra); | 161 NativeTheme::kMenuCheckBackground, state, bg_bounds, extra); |
| 162 | 162 |
| 163 // And the check. | 163 // And the check. |
| 164 gfx::Rect icon_bounds(icon_x / 2, icon_y, icon_width, icon_height); | 164 gfx::Rect icon_bounds(icon_x / 2, icon_y, icon_width, icon_height); |
| 165 AdjustBoundsForRTLUI(&icon_bounds); | 165 AdjustBoundsForRTLUI(&icon_bounds); |
| 166 NativeTheme::instance()->Paint(canvas->sk_canvas(), | 166 NativeTheme::instance()->Paint(canvas->sk_canvas(), |
| 167 NativeTheme::kMenuCheck, state, bg_bounds, extra); | 167 NativeTheme::kMenuCheck, state, bg_bounds, extra); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace views | 170 } // namespace views |
| OLD | NEW |