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

Side by Side Diff: ui/views/controls/menu/menu_config_views.cc

Issue 117903006: Refactor: Makes menus use gfx::FontList instead of gfx::Font. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_win.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 (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 "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "ui/base/layout.h" 8 #include "ui/base/layout.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
(...skipping 25 matching lines...) Expand all
36 arrow_to_edge_padding = 20; 36 arrow_to_edge_padding = 20;
37 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 37 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
38 arrow_width = 38 arrow_width =
39 rb.GetImageNamed(IDR_MENU_HIERARCHY_ARROW).ToImageSkia()->width(); 39 rb.GetImageNamed(IDR_MENU_HIERARCHY_ARROW).ToImageSkia()->width();
40 gfx::ImageSkia check = GetMenuCheckImage(false); 40 gfx::ImageSkia check = GetMenuCheckImage(false);
41 check_height = check.height(); 41 check_height = check.height();
42 item_min_height = 29; 42 item_min_height = 29;
43 separator_spacing_height = 7; 43 separator_spacing_height = 7;
44 separator_lower_height = 8; 44 separator_lower_height = 8;
45 separator_upper_height = 8; 45 separator_upper_height = 8;
46 font = rb.GetFont(ResourceBundle::BaseFont);
sky 2014/01/07 17:14:32 I'm assuming this is the same as the default const
Yuki 2014/01/08 06:35:03 Yes, this is the same as the default constructor.
47 label_to_arrow_padding = 20; 46 label_to_arrow_padding = 20;
48 label_to_minor_text_padding = 20; 47 label_to_minor_text_padding = 20;
49 always_use_icon_to_label_padding = true; 48 always_use_icon_to_label_padding = true;
50 align_arrow_and_shortcut = true; 49 align_arrow_and_shortcut = true;
51 offset_context_menus = true; 50 offset_context_menus = true;
52 corner_radius = kMenuCornerRadiusForAura; 51 corner_radius = kMenuCornerRadiusForAura;
53 } 52 }
54 53
55 #if !defined(OS_WIN) 54 #if !defined(OS_WIN)
56 // static 55 // static
57 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { 56 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
58 static MenuConfig* views_instance = NULL; 57 static MenuConfig* views_instance = NULL;
59 if (!views_instance) 58 if (!views_instance)
60 views_instance = new MenuConfig(theme ? 59 views_instance = new MenuConfig(theme ?
61 theme : ui::NativeTheme::instance()); 60 theme : ui::NativeTheme::instance());
62 return *views_instance; 61 return *views_instance;
63 } 62 }
64 #endif 63 #endif
65 64
66 } // namespace views 65 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698