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

Unified Diff: ui/views/controls/menu/menu_config_views.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: Only change for normal layout mode. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_config_views.cc
diff --git a/ui/views/controls/menu/menu_config_views.cc b/ui/views/controls/menu/menu_config_views.cc
index 7ae2b67f4c1d6a5351d2a5df5091bca70f63dcc8..92df3fafd0351fc989eb0db1e9ab70fe6510f01a 100644
--- a/ui/views/controls/menu/menu_config_views.cc
+++ b/ui/views/controls/menu/menu_config_views.cc
@@ -29,15 +29,15 @@ MenuConfig* MenuConfig::Create() {
// Add 4 to force some padding between check and label.
config->check_width = check->width() + 4;
config->check_height = check->height();
- if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
+ config->item_left_margin = 4;
+ config->item_min_height = 29;
+ // TODO(skuhne): Separators in menus should have the same padding in touch
+ // mode but currently the touch wrench menu relies on separators having no
+ // padding to implement full-height buttons.
Mr4D (OOO till 08-26) 2012/08/13 21:04:11 Since the upper / lower button line *is* the separ
flackr 2012/08/13 21:08:51 I understand the difficulties involved but the met
+ if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH)
config->separator_height = 1;
- config->item_min_height = 40;
- config->item_left_margin = 4;
- } else {
- config->separator_height = 5;
- config->item_min_height = 30;
- config->item_left_margin = 8;
- }
+ else
+ config->separator_height = 15;
config->font = rb.GetFont(ResourceBundle::BaseFont);
config->label_to_arrow_padding = 20;
config->label_to_accelerator_padding = 20;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698