Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 2070623003: [MacViews] Show combobox menu popup at mouse press (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/style/platform_style.h » ('j') | ui/views/style/platform_style_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 3d7cfd1e26585dae22ab9fd8f8cfe5d876987304..51fcbe3a745fbf0bc211c9cc3c95d343d170f6c6 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -110,14 +110,11 @@ class TransparentButton : public CustomButton {
: CustomButton(listener) {
SetAnimationDuration(LabelButton::kHoverAnimationDurationMs);
SetFocusBehavior(FocusBehavior::NEVER);
+ set_notify_action(PlatformStyle::kMenuActivationAction);
+ set_request_focus_on_press(true);
tapted 2016/06/22 04:23:03 oh hang on a sec.. I just noticed the OnMousePress
}
~TransparentButton() override {}
- bool OnMousePressed(const ui::MouseEvent& mouse_event) override {
- parent()->RequestFocus();
- return true;
- }
-
double GetAnimationValue() const {
return hover_animation().GetCurrentValue();
}
« no previous file with comments | « no previous file | ui/views/style/platform_style.h » ('j') | ui/views/style/platform_style_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698