| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 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_separator.h" | |
| 6 | |
| 7 #include "third_party/skia/include/core/SkColor.h" | |
| 8 #include "ui/gfx/canvas.h" | |
| 9 #include "views/controls/menu/menu_config.h" | |
| 10 | |
| 11 namespace views { | |
| 12 | |
| 13 static const SkColor kSeparatorColor = SkColorSetARGB(50, 00, 00, 00); | |
| 14 | |
| 15 void MenuSeparator::OnPaint(gfx::Canvas* canvas) { | |
| 16 canvas->DrawLineInt(kSeparatorColor, 0, height() / 2, width(), height() / 2); | |
| 17 } | |
| 18 | |
| 19 gfx::Size MenuSeparator::GetPreferredSize() { | |
| 20 return gfx::Size(10, // Just in case we're the only item in a menu. | |
| 21 MenuConfig::instance().separator_height); | |
| 22 } | |
| 23 | |
| 24 } // namespace views | |
| OLD | NEW |