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_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 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Sadly I didn't see a specify metrics for this. | 66 // Sadly I didn't see a specify metrics for this. |
67 arrow_width = GetSystemMetrics(SM_CXMENUCHECK); | 67 arrow_width = GetSystemMetrics(SM_CXMENUCHECK); |
68 } | 68 } |
69 | 69 |
70 BOOL show_cues; | 70 BOOL show_cues; |
71 show_mnemonics = | 71 show_mnemonics = |
72 (SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &show_cues, 0) && | 72 (SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &show_cues, 0) && |
73 show_cues == TRUE); | 73 show_cues == TRUE); |
74 | 74 |
75 SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &show_delay, 0); | 75 SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &show_delay, 0); |
| 76 |
| 77 separator_upper_height = 5; |
| 78 separator_lower_height = 7; |
76 } | 79 } |
77 | 80 |
78 // static | 81 // static |
79 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { | 82 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { |
80 // NOTE: |theme| may be NULL if used before the menu is running. | 83 // NOTE: |theme| may be NULL if used before the menu is running. |
81 if (!theme || theme == NativeThemeWin::instance()) { | 84 if (!theme || theme == NativeThemeWin::instance()) { |
82 static MenuConfig* win_instance = NULL; | 85 static MenuConfig* win_instance = NULL; |
83 if (!win_instance) | 86 if (!win_instance) |
84 win_instance = new MenuConfig(NativeThemeWin::instance()); | 87 win_instance = new MenuConfig(NativeThemeWin::instance()); |
85 return *win_instance; | 88 return *win_instance; |
86 } | 89 } |
87 static MenuConfig* views_instance = NULL; | 90 static MenuConfig* views_instance = NULL; |
88 if (!views_instance) | 91 if (!views_instance) |
89 views_instance = new MenuConfig(theme); | 92 views_instance = new MenuConfig(theme); |
90 return *views_instance; | 93 return *views_instance; |
91 } | 94 } |
92 | 95 |
93 } // namespace views | 96 } // namespace views |
OLD | NEW |