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

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

Issue 12041085: Fix menu corners: the menu background was being painted as a rect when in fact, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 11 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
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 "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "ui/base/layout.h" 8 #include "ui/base/layout.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
(...skipping 29 matching lines...) Expand all
40 separator_height = 15; 40 separator_height = 15;
41 separator_spacing_height = 7; 41 separator_spacing_height = 7;
42 separator_lower_height = 8; 42 separator_lower_height = 8;
43 separator_upper_height = 8; 43 separator_upper_height = 8;
44 font = rb.GetFont(ResourceBundle::BaseFont); 44 font = rb.GetFont(ResourceBundle::BaseFont);
45 label_to_arrow_padding = 20; 45 label_to_arrow_padding = 20;
46 label_to_accelerator_padding = 20; 46 label_to_accelerator_padding = 20;
47 always_use_icon_to_label_padding = true; 47 always_use_icon_to_label_padding = true;
48 align_arrow_and_shortcut = true; 48 align_arrow_and_shortcut = true;
49 offset_context_menus = true; 49 offset_context_menus = true;
50 has_rounded_corners = true;
50 } 51 }
51 52
52 #if !defined(OS_WIN) 53 #if !defined(OS_WIN)
53 // static 54 // static
54 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) { 55 const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
55 static MenuConfig* views_instance = NULL; 56 static MenuConfig* views_instance = NULL;
56 if (!views_instance) 57 if (!views_instance)
57 views_instance = new MenuConfig(ui::NativeTheme::instance()); 58 views_instance = new MenuConfig(ui::NativeTheme::instance());
58 return *views_instance; 59 return *views_instance;
59 } 60 }
60 #endif 61 #endif
61 62
62 } // namespace views 63 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698