Index: ui/views/controls/combobox/combobox.cc |
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc |
index bb8623a26f631e183c6b62289581e95a1336fc19..1cf54dc74132ab76625a6adc2ceb59d82e250fb0 100644 |
--- a/ui/views/controls/combobox/combobox.cc |
+++ b/ui/views/controls/combobox/combobox.cc |
@@ -114,11 +114,12 @@ gfx::Rect PositionArrowWithinContainer(const gfx::Rect& container_bounds, |
// The transparent button which holds a button state but is not rendered. |
class TransparentButton : public CustomButton { |
public: |
- TransparentButton(ButtonListener* listener) |
+ TransparentButton(ButtonListener* listener, bool animate_state_change) |
: CustomButton(listener) { |
SetAnimationDuration(LabelButton::kHoverAnimationDurationMs); |
Evan Stade
2016/09/13 22:03:17
could you make this conditional on the new paramet
|
SetFocusBehavior(FocusBehavior::NEVER); |
set_notify_action(PlatformStyle::kMenuNotifyActivationAction); |
+ set_animate_on_state_change(animate_state_change); |
if (UseMd()) { |
SetInkDropMode(PlatformStyle::kUseRipples ? InkDropMode::ON |
@@ -394,8 +395,8 @@ Combobox::Combobox(ui::ComboboxModel* model, Style style) |
selected_index_(style == STYLE_ACTION ? 0 : model_->GetDefaultIndex()), |
invalid_(false), |
menu_model_(new ComboboxMenuModel(this, model)), |
- text_button_(new TransparentButton(this)), |
- arrow_button_(new TransparentButton(this)), |
+ text_button_(new TransparentButton(this, style_ == STYLE_ACTION)), |
+ arrow_button_(new TransparentButton(this, style_ == STYLE_ACTION)), |
size_to_largest_label_(style_ == STYLE_NORMAL), |
weak_ptr_factory_(this) { |
ModelChanged(); |