| Index: ui/views/style/mac/combobox_background_mac.cc
|
| diff --git a/ui/views/style/mac/combobox_background_mac.cc b/ui/views/style/mac/combobox_background_mac.cc
|
| index 31997b15b781c824649b60f9cc7ae002ba5ee1e3..0e6eab06d4806b67338e234b056c547efaa944ff 100644
|
| --- a/ui/views/style/mac/combobox_background_mac.cc
|
| +++ b/ui/views/style/mac/combobox_background_mac.cc
|
| @@ -11,6 +11,8 @@
|
| #include "ui/views/controls/combobox/combobox.h"
|
| #include "ui/views/view.h"
|
|
|
| +using ui::NativeThemeMac;
|
| +
|
| namespace views {
|
|
|
| ComboboxBackgroundMac::ComboboxBackgroundMac() {}
|
| @@ -27,15 +29,17 @@ void ComboboxBackgroundMac::Paint(gfx::Canvas* canvas, View* view) const {
|
| // paint outside the border.
|
| bounds.Inset(bounds.width() - combobox->GetArrowButtonWidth(), 0.5, 0.5, 0.5);
|
|
|
| - ui::NativeTheme::State state = ui::NativeTheme::kNormal;
|
| + // TODO(tapted): Check whether the Widget is active, and use the NORMAL
|
| + // BackgroundType if it is inactive. Handling this properly also requires the
|
| + // control to observe the Widget for activation changes and invalidate.
|
| + NativeThemeMac::BackgroundType type =
|
| + NativeThemeMac::BackgroundType::HIGHLIGHTED;
|
| if (!combobox->enabled())
|
| - state = ui::NativeTheme::kDisabled;
|
| + type = NativeThemeMac::BackgroundType::DISABLED;
|
|
|
| SkPaint paint;
|
| paint.setShader(
|
| - ui::NativeThemeMac::GetButtonBackgroundShader(
|
| - state,
|
| - bounds.height()));
|
| + NativeThemeMac::GetButtonBackgroundShader(type, bounds.height()));
|
| paint.setStyle(SkPaint::kFill_Style);
|
| paint.setAntiAlias(true);
|
|
|
|
|