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 24c51702b2d11798c62274c4add4f29ea5629a8b..3e908d1a92c112841ff015bd5289524f0d8d8799 100644 |
| --- a/ui/views/controls/combobox/combobox.cc |
| +++ b/ui/views/controls/combobox/combobox.cc |
| @@ -452,7 +452,8 @@ Combobox::Combobox(ui::ComboboxModel* model, Style style) |
| SetPaintToLayer(); |
| layer()->SetFillsBoundsOpaquely(false); |
| } else { |
| - arrow_image_ = PlatformStyle::CreateComboboxArrow(enabled(), style); |
| + arrow_image_ = *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| + IDR_MENU_DROPARROW); |
| } |
| } |
| @@ -550,12 +551,6 @@ void Combobox::Layout() { |
| arrow_button_->SetBounds(arrow_button_x, 0, arrow_button_width, height()); |
| } |
| -void Combobox::OnEnabledChanged() { |
| - View::OnEnabledChanged(); |
| - if (!UseMd()) |
| - arrow_image_ = PlatformStyle::CreateComboboxArrow(enabled(), style_); |
| -} |
| - |
| void Combobox::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| if (!UseMd()) |
| return; |
| @@ -1014,8 +1009,8 @@ PrefixSelector* Combobox::GetPrefixSelector() { |
| int Combobox::GetArrowContainerWidth() const { |
| const int kMdPaddingWidth = 8; |
|
tapted
2017/04/21 00:31:10
nit: constexpr for these
Elly Fong-Jones
2017/04/21 15:23:24
Done.
|
| - int arrow_pad = UseMd() ? kMdPaddingWidth |
| - : PlatformStyle::kComboboxNormalArrowPadding; |
| + const int kNormalPaddingWidth = 7; |
| + int arrow_pad = UseMd() ? kMdPaddingWidth : kNormalPaddingWidth; |
| int padding = style_ == STYLE_NORMAL |
| ? arrow_pad * 2 |
| : kActionLeftPadding + kActionRightPadding; |