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

Side by Side Diff: views/controls/menu/menu_config_linux.cc

Issue 7825024: For Touch: remove some menu items for experimentation, adjust sizes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/menu/menu_config.cc ('k') | views/controls/menu/menu_item_view.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/menu/menu_config.h" 5 #include "views/controls/menu/menu_config.h"
6 6
7 #include "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 // static 13 // static
14 MenuConfig* MenuConfig::Create() { 14 MenuConfig* MenuConfig::Create() {
15 MenuConfig* config = new MenuConfig(); 15 MenuConfig* config = new MenuConfig();
16 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 16 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
17 #if defined(TOUCH_UI) 17 #if defined(TOUCH_UI)
18 config->font = rb.GetFont(ResourceBundle::LargeFont); 18 config->font = rb.GetFont(ResourceBundle::LargeFont);
19 config->show_accelerators = false;
19 #else 20 #else
20 config->font = rb.GetFont(ResourceBundle::BaseFont); 21 config->font = rb.GetFont(ResourceBundle::BaseFont);
21 #endif 22 #endif
22 config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); 23 config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width();
23 // Add 4 to force some padding between check and label. 24 // Add 4 to force some padding between check and label.
24 config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; 25 config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4;
25 config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); 26 config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height();
26 return config; 27 return config;
27 } 28 }
28 29
29 } // namespace views 30 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_config.cc ('k') | views/controls/menu/menu_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698