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

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

Issue 10270021: Make all the menu UI consitent with the new chromeos menu spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Give back the text_color initialization in menu_config.cc. Created 8 years, 7 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 | « ui/views/controls/label.cc ('k') | no next file » | 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) 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 "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 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
11 #include "ui/gfx/native_theme_aura.h"
11 12
12 namespace views { 13 namespace views {
13 14
14 // static 15 // static
15 MenuConfig* MenuConfig::Create() { 16 MenuConfig* MenuConfig::Create() {
16 MenuConfig* config = new MenuConfig(); 17 MenuConfig* config = new MenuConfig();
18 config->text_color = gfx::NativeTheme::instance()->GetSystemColor(
19 gfx::NativeTheme::kColorId_EnabledMenuItemForegroundColor);
17 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 20 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
18 config->font = rb.GetFont(ResourceBundle::BaseFont); 21 config->font = rb.GetFont(ResourceBundle::BaseFont);
19 config->arrow_width = rb.GetImageNamed(IDR_MENU_ARROW).ToSkBitmap()->width(); 22 config->arrow_width = rb.GetImageNamed(IDR_MENU_ARROW).ToSkBitmap()->width();
20 const SkBitmap* check = rb.GetImageNamed(IDR_MENU_CHECK).ToSkBitmap(); 23 const SkBitmap* check = rb.GetImageNamed(IDR_MENU_CHECK).ToSkBitmap();
21 // Add 4 to force some padding between check and label. 24 // Add 4 to force some padding between check and label.
22 config->check_width = check->width() + 4; 25 config->check_width = check->width() + 4;
23 config->check_height = check->height(); 26 config->check_height = check->height();
24 27
25 return config; 28 return config;
26 } 29 }
27 30
28 } // namespace views 31 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/label.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698