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

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

Issue 2741004: Makes it so child views of menuitemview can be traversed with the (Closed)
Patch Set: Tweaks Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "grit/app_resources.h" 8 #include "grit/app_resources.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.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 config->font = rb.GetFont(ResourceBundle::BaseFont); 17 config->font = rb.GetFont(ResourceBundle::BaseFont);
18 config->font_with_controls = config->font.DeriveFont(0, gfx::Font::BOLD);
18 config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); 19 config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width();
19 // Add 4 to force some padding between check and label. 20 // Add 4 to force some padding between check and label.
20 config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; 21 config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4;
21 config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); 22 config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height();
22 return config; 23 return config;
23 } 24 }
24 25
25 } // namespace views 26 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698