blob: d0b7fbacd40bfb18b1deb12cf0f324b781f3b089 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "views/controls/menu/menu_separator.h"
#include "app/gfx/canvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "views/controls/menu/menu_config.h"
namespace views {
static const SkColor kSeparatorColor = SkColorSetARGB(50, 00, 00, 00);
void MenuSeparator::Paint(gfx::Canvas* canvas) {
canvas->DrawLineInt(kSeparatorColor, 0, height() / 2, width(), height() / 2);
}
gfx::Size MenuSeparator::GetPreferredSize() {
return gfx::Size(10, // Just in case we're the only item in a menu.
MenuConfig::instance().separator_height);
}
} // namespace views
|