| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_config.h" | 5 #include "ui/views/controls/menu/menu_config.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <uxtheme.h> | 8 #include <uxtheme.h> |
| 9 #include <Vssym32.h> | 9 #include <Vssym32.h> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/win/scoped_gdi_object.h" | 12 #include "base/win/scoped_gdi_object.h" |
| 13 #include "base/win/win_util.h" | 13 #include "base/win/win_util.h" |
| 14 #include "ui/base/l10n/l10n_util_win.h" | 14 #include "ui/base/l10n/l10n_util_win.h" |
| 15 #include "ui/base/native_theme/native_theme_win.h" | 15 #include "ui/gfx/native_theme_win.h" |
| 16 | 16 |
| 17 using ui::NativeTheme; | 17 using gfx::NativeTheme; |
| 18 using ui::NativeThemeWin; | 18 using gfx::NativeThemeWin; |
| 19 | 19 |
| 20 namespace views { | 20 namespace views { |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 MenuConfig* MenuConfig::Create() { | 23 MenuConfig* MenuConfig::Create() { |
| 24 MenuConfig* config = new MenuConfig(); | 24 MenuConfig* config = new MenuConfig(); |
| 25 | 25 |
| 26 config->text_color = NativeThemeWin::instance()->GetThemeColorWithDefault( | 26 config->text_color = NativeThemeWin::instance()->GetThemeColorWithDefault( |
| 27 NativeThemeWin::MENU, MENU_POPUPITEM, MPI_NORMAL, TMT_TEXTCOLOR, | 27 NativeThemeWin::MENU, MENU_POPUPITEM, MPI_NORMAL, TMT_TEXTCOLOR, |
| 28 COLOR_MENUTEXT); | 28 COLOR_MENUTEXT); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 config->item_no_icon_top_margin = config->item_top_margin; | 95 config->item_no_icon_top_margin = config->item_top_margin; |
| 96 | 96 |
| 97 BOOL show_cues; | 97 BOOL show_cues; |
| 98 config->show_mnemonics = | 98 config->show_mnemonics = |
| 99 (SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &show_cues, 0) && | 99 (SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &show_cues, 0) && |
| 100 show_cues == TRUE); | 100 show_cues == TRUE); |
| 101 return config; | 101 return config; |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace views | 104 } // namespace views |
| OLD | NEW |