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

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

Issue 11088037: Revert 160886 - Added MenuConfig setter to MenuItemView, updated rest of the code to use set MenuCo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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_views.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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/base/layout.h" 8 #include "ui/base/layout.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 show_accelerators(true), 44 show_accelerators(true),
45 always_use_icon_to_label_padding(false), 45 always_use_icon_to_label_padding(false),
46 align_arrow_and_shortcut(false), 46 align_arrow_and_shortcut(false),
47 offset_context_menus(false) { 47 offset_context_menus(false) {
48 // Use 40px tall menu items when running in touch optimized mode. 48 // Use 40px tall menu items when running in touch optimized mode.
49 // For Windows use 40px tall menu items when running in touch optimized mode. 49 // For Windows use 40px tall menu items when running in touch optimized mode.
50 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { 50 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
51 item_top_margin = item_no_icon_top_margin = 12; 51 item_top_margin = item_no_icon_top_margin = 12;
52 item_bottom_margin = item_no_icon_bottom_margin = 13; 52 item_bottom_margin = item_no_icon_bottom_margin = 13;
53 } 53 }
54 Init();
55 } 54 }
56 55
57 MenuConfig::~MenuConfig() {} 56 MenuConfig::~MenuConfig() {}
58 57
59 void MenuConfig::Reset() { 58 void MenuConfig::Reset() {
60 delete config_instance; 59 delete config_instance;
61 config_instance = NULL; 60 config_instance = NULL;
62 } 61 }
63 62
64 // static 63 // static
65 const MenuConfig& MenuConfig::instance() { 64 const MenuConfig& MenuConfig::instance() {
66 if (!config_instance) 65 if (!config_instance)
67 config_instance = new MenuConfig(); 66 config_instance = Create();
68 return *config_instance; 67 return *config_instance;
69 } 68 }
70 69
71 } // namespace views 70 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698