Chromium Code Reviews| Index: ui/views/controls/combobox/combobox.cc |
| diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc |
| index 88cd6efcd828144ff173e548ec2d958d3ce94dbf..c7d745a490ba2558c80443d52068bd05ddb001ad 100644 |
| --- a/ui/views/controls/combobox/combobox.cc |
| +++ b/ui/views/controls/combobox/combobox.cc |
| @@ -758,12 +758,12 @@ void Combobox::PaintText(gfx::Canvas* canvas) { |
| if (style_ == STYLE_ACTION) { |
| ui::CommonThemePaintComboboxArrow(canvas->sk_canvas(), arrow_bounds); |
|
tapted
2016/03/29 04:16:36
I think this is the only caller now, and the metho
Elly Fong-Jones
2016/04/04 17:09:55
Done.
|
| } else { |
| - ui::NativeTheme::ExtraParams ignored; |
| - GetNativeTheme()->Paint(canvas->sk_canvas(), |
| - ui::NativeTheme::kComboboxArrow, |
| - ui::NativeTheme::kNormal, |
| - arrow_bounds, |
| - ignored); |
| + gfx::ImageSkia arrow_image = PlatformStyle::CreateComboboxArrow( |
| + enabled()); |
| + gfx::Rect image_bounds(arrow_bounds); |
| + image_bounds.Inset((arrow_bounds.width() - arrow_image.width()) / 2, |
|
tapted
2016/03/29 04:16:36
I think this is the same as
image_bounds.ClampToC
Elly Fong-Jones
2016/04/04 17:09:55
Done.
|
| + (arrow_bounds.height() - arrow_image.height()) / 2); |
| + canvas->DrawImageInt(arrow_image, image_bounds.x(), image_bounds.y()); |
| } |
| } |
| @@ -905,21 +905,7 @@ int Combobox::GetDisclosureArrowRightPadding() const { |
| } |
| gfx::Size Combobox::ArrowSize() const { |
| -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| - // TODO(estade): hack alert! This should always use GetNativeTheme(). For now |
| - // STYLE_ACTION isn't properly themed so we have to override the NativeTheme |
| - // behavior. See crbug.com/384071 |
| - const ui::NativeTheme* native_theme_for_arrow = |
| - style_ == STYLE_ACTION ? ui::NativeThemeAura::instance() |
| - : GetNativeTheme(); |
| -#else |
| - const ui::NativeTheme* native_theme_for_arrow = GetNativeTheme(); |
| -#endif |
| - |
| - ui::NativeTheme::ExtraParams ignored; |
| - return native_theme_for_arrow->GetPartSize(ui::NativeTheme::kComboboxArrow, |
| - ui::NativeTheme::kNormal, |
| - ignored); |
| + return PlatformStyle::CreateComboboxArrow(enabled()).size(); |
| } |
| gfx::Size Combobox::GetContentSize() const { |