| Index: ui/views/controls/combobox/combobox.cc
|
| diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
|
| index 382c6db3ce101d65d28c70c697fb281a6a0fe20c..5b3e483f3511ef5e7ebb9c637d40cb617e8067fa 100644
|
| --- a/ui/views/controls/combobox/combobox.cc
|
| +++ b/ui/views/controls/combobox/combobox.cc
|
| @@ -625,6 +625,9 @@ void Combobox::OnPaint(gfx::Canvas* canvas) {
|
| switch (style_) {
|
| case STYLE_NORMAL: {
|
| OnPaintBackground(canvas);
|
| + // Painting the arrow background needs to happen before PaintText applies
|
| + // a clip rect to |canvas| so the background can touch the border.
|
| + PaintArrowBackground(canvas);
|
| PaintText(canvas);
|
| OnPaintBorder(canvas);
|
| break;
|
| @@ -813,6 +816,29 @@ void Combobox::PaintButtons(gfx::Canvas* canvas) {
|
| }
|
| }
|
|
|
| +void Combobox::PaintArrowBackground(gfx::Canvas* canvas) {
|
| + gfx::Canvas::ScopedState canvas_state(canvas);
|
| +
|
| + if (base::i18n::IsRTL()) {
|
| + canvas->Translate(gfx::Vector2d(width(), 0));
|
| + canvas->Scale(-1, 1);
|
| + }
|
| +
|
| + gfx::Rect bounds = GetLocalBounds();
|
| + gfx::Size arrow_size = ArrowSize();
|
| + int disclosure_arrow_offset = width() - arrow_size.width() -
|
| + GetDisclosureArrowLeftPadding() - GetDisclosureArrowRightPadding();
|
| + bounds.Inset(disclosure_arrow_offset, 0, 0, 0);
|
| +
|
| + ui::NativeTheme::State state =
|
| + HasFocus() ? ui::NativeTheme::kHovered : ui::NativeTheme::kNormal;
|
| + GetNativeTheme()->Paint(canvas->sk_canvas(),
|
| + ui::NativeTheme::kComboboxArrowBackground,
|
| + state,
|
| + bounds,
|
| + ui::NativeTheme::ExtraParams());
|
| +}
|
| +
|
| void Combobox::ShowDropDownMenu(ui::MenuSourceType source_type) {
|
| gfx::Rect lb = GetLocalBounds();
|
| gfx::Point menu_position(lb.origin());
|
|
|