| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "views/controls/menu/menu_config.h" | |
| 6 | |
| 7 #include "grit/ui_resources.h" | |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | |
| 9 #include "ui/base/resource/resource_bundle.h" | |
| 10 | |
| 11 namespace views { | |
| 12 | |
| 13 // static | |
| 14 MenuConfig* MenuConfig::Create() { | |
| 15 MenuConfig* config = new MenuConfig(); | |
| 16 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | |
| 17 #if defined(TOUCH_UI) | |
| 18 config->font = rb.GetFont(ResourceBundle::LargeFont); | |
| 19 #else | |
| 20 config->font = rb.GetFont(ResourceBundle::BaseFont); | |
| 21 #endif | |
| 22 config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); | |
| 23 // Add 4 to force some padding between check and label. | |
| 24 config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; | |
| 25 config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); | |
| 26 return config; | |
| 27 } | |
| 28 | |
| 29 } // namespace views | |
| OLD | NEW |