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

Side by Side Diff: ui/views/controls/menu/menu_config_mac.mm

Issue 1310903004: Use a ui::MenuModel in views::Combobox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +curlies Created 5 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/menu/menu_config.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include "ui/gfx/image/image_skia.h" 9 #include "ui/gfx/image/image_skia.h"
10 #include "ui/native_theme/native_theme_mac.h" 10 #include "ui/native_theme/native_theme_mac.h"
11 #include "ui/views/controls/menu/menu_image_util.h" 11 #include "ui/views/controls/menu/menu_image_util.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 void MenuConfig::Init(const ui::NativeTheme* theme) { 15 void MenuConfig::Init(const ui::NativeTheme* theme) {
16 font_list = gfx::FontList(gfx::Font([NSFont menuFontOfSize:0.0])); 16 font_list = gfx::FontList(gfx::Font([NSFont menuFontOfSize:0.0]));
17 menu_vertical_border_size = 4; 17 menu_vertical_border_size = 4;
18 item_top_margin = item_no_icon_top_margin = 1; 18 item_top_margin = item_no_icon_top_margin = 1;
19 item_bottom_margin = item_no_icon_bottom_margin = 1; 19 item_bottom_margin = item_no_icon_bottom_margin = 1;
20 item_left_margin = 2; 20 item_left_margin = 2;
21 arrow_to_edge_padding = 12; 21 arrow_to_edge_padding = 12;
22 icon_to_label_padding = 4; 22 icon_to_label_padding = 4;
23 check_width = 19; 23 check_width = 19;
24 check_height = 11; 24 check_height = 11;
25 separator_height = 13; 25 separator_height = 13;
26 separator_upper_height = 7; 26 separator_upper_height = 7;
27 separator_lower_height = 6; 27 separator_lower_height = 6;
28 align_arrow_and_shortcut = true; 28 align_arrow_and_shortcut = true;
29 icons_in_label = true; 29 icons_in_label = true;
30 check_selected_combobox_item = true;
30 corner_radius = 5; 31 corner_radius = 5;
31 use_outer_border = false; 32 use_outer_border = false;
32 } 33 }
33 34
34 // static 35 // static
35 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { 36 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
36 CR_DEFINE_STATIC_LOCAL(MenuConfig, mac_instance, 37 CR_DEFINE_STATIC_LOCAL(MenuConfig, mac_instance,
37 (theme ? theme : ui::NativeTheme::instance())); 38 (theme ? theme : ui::NativeTheme::instance()));
38 return mac_instance; 39 return mac_instance;
39 } 40 }
40 41
41 } // namespace views 42 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_config.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698