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

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

Issue 10829283: Adjust menu item sizes for touch / non-touch according to spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | 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 23 matching lines...) Expand all
34 gutter_width(0), 34 gutter_width(0),
35 separator_height(6), 35 separator_height(6),
36 render_gutter(false), 36 render_gutter(false),
37 show_mnemonics(false), 37 show_mnemonics(false),
38 scroll_arrow_height(3), 38 scroll_arrow_height(3),
39 label_to_accelerator_padding(10), 39 label_to_accelerator_padding(10),
40 item_min_height(0), 40 item_min_height(0),
41 show_accelerators(true), 41 show_accelerators(true),
42 always_use_icon_to_label_padding(false), 42 always_use_icon_to_label_padding(false),
43 align_arrow_and_shortcut(false) { 43 align_arrow_and_shortcut(false) {
44 // Use 40px tall menu items when running in touch optimized mode.
45 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
sky 2012/08/10 22:17:25 This change effects windows too. Do we care?
Mr4D (OOO till 08-26) 2012/08/10 22:57:48 For Windows: I am under the impression that we wan
46 item_top_margin = item_no_icon_top_margin = 12;
47 item_bottom_margin = item_no_icon_bottom_margin = 13;
48 }
49 } 44 }
50 45
51 MenuConfig::~MenuConfig() {} 46 MenuConfig::~MenuConfig() {}
52 47
53 void MenuConfig::Reset() { 48 void MenuConfig::Reset() {
54 delete config_instance; 49 delete config_instance;
55 config_instance = NULL; 50 config_instance = NULL;
56 } 51 }
57 52
58 // static 53 // static
59 const MenuConfig& MenuConfig::instance() { 54 const MenuConfig& MenuConfig::instance() {
60 if (!config_instance) 55 if (!config_instance)
61 config_instance = Create(); 56 config_instance = Create();
62 return *config_instance; 57 return *config_instance;
63 } 58 }
64 59
65 } // namespace views 60 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_config_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698