Chromium Code Reviews| Index: ui/views/style/platform_style_mac.mm |
| diff --git a/ui/views/style/platform_style_mac.mm b/ui/views/style/platform_style_mac.mm |
| index 550d9b2d957931d4e1929235b8d62c5f6bd57970..cb725c912bdb65b8fdd95a471a8a33e52b727b09 100644 |
| --- a/ui/views/style/platform_style_mac.mm |
| +++ b/ui/views/style/platform_style_mac.mm |
| @@ -38,13 +38,32 @@ gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, |
| } |
| // static |
| +gfx::ImageSkia PlatformStyle::CreateMenuButtonArrow(bool is_enabled) { |
| + const int kComboboxArrowWidth = 13; |
|
tapted
2016/04/21 06:06:46
kMenuButtonArrowWidth
Elly Fong-Jones
2016/04/21 15:30:27
Done.
|
| + return gfx::CreateVectorIcon(gfx::VectorIconId::MENU_BUTTON_ARROW_MAC, |
| + kComboboxArrowWidth, |
| + is_enabled ? SK_ColorWHITE : SK_ColorBLACK); |
| +} |
| + |
| +// static |
| std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { |
| return base::WrapUnique(new FocusableRoundedBorder); |
| } |
| // static |
| std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground() { |
| - return base::WrapUnique(new ComboboxBackgroundMac); |
| + return base::WrapUnique( |
| + new ComboboxBackgroundMac(GetComboboxArrowWidth(Combobox::STYLE_NORMAL))); |
|
tapted
2016/04/21 06:06:46
comment above about why STYLE_NORMAL is right here
Elly Fong-Jones
2016/04/21 15:30:27
It's only okay because of an implementation detail
|
| +} |
| + |
| +// static |
| +std::unique_ptr<FocusableBorder> PlatformStyle::CreateMenuButtonBorder() { |
| + return base::WrapUnique(new FocusableRoundedBorder); |
| +} |
| + |
| +// static |
| +std::unique_ptr<Background> PlatformStyle::CreateMenuButtonBackground() { |
| + return base::WrapUnique(new ComboboxBackgroundMac(GetMenuButtonArrowWidth())); |
| } |
| // static |