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

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

Issue 10387121: Revert 136996 - ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
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_separator.h" 5 #include "ui/views/controls/menu/menu_separator.h"
6 6
7 #include "third_party/skia/include/core/SkColor.h" 7 #include "third_party/skia/include/core/SkColor.h"
8 #include "ui/base/native_theme/native_theme.h"
9 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "ui/gfx/native_theme.h"
10 #include "ui/views/controls/menu/menu_config.h" 10 #include "ui/views/controls/menu/menu_config.h"
11 11
12 namespace { 12 namespace {
13 13
14 const int kSeparatorHeight = 1; 14 const int kSeparatorHeight = 1;
15 15
16 } // namespace 16 } // namespace
17 17
18 namespace views { 18 namespace views {
19 19
20 void MenuSeparator::OnPaint(gfx::Canvas* canvas) { 20 void MenuSeparator::OnPaint(gfx::Canvas* canvas) {
21 canvas->FillRect(gfx::Rect(0, height() / 2, width(), kSeparatorHeight), 21 canvas->FillRect(gfx::Rect(0, height() / 2, width(), kSeparatorHeight),
22 ui::NativeTheme::instance()->GetSystemColor( 22 gfx::NativeTheme::instance()->GetSystemColor(
23 ui::NativeTheme::kColorId_MenuSeparatorColor)); 23 gfx::NativeTheme::kColorId_MenuSeparatorColor));
24 } 24 }
25 25
26 gfx::Size MenuSeparator::GetPreferredSize() { 26 gfx::Size MenuSeparator::GetPreferredSize() {
27 return gfx::Size(10, // Just in case we're the only item in a menu. 27 return gfx::Size(10, // Just in case we're the only item in a menu.
28 MenuConfig::instance().separator_height); 28 MenuConfig::instance().separator_height);
29 } 29 }
30 30
31 } // namespace views 31 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.cc ('k') | ui/views/controls/menu/menu_separator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698