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

Unified Diff: ui/views/controls/md_slider.h

Issue 2335513002: Adding ripple effect for clicks on MD slider (Closed)
Patch Set: Created 4 years, 3 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/controls/md_slider.cc » ('j') | ui/views/controls/md_slider.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/md_slider.h
diff --git a/ui/views/controls/md_slider.h b/ui/views/controls/md_slider.h
index d9ceeecf0ca3785f5792e88e933e70acd777d052..e4d1c92dfcefb003c8fe1dbaca44546e8b4924dd 100644
--- a/ui/views/controls/md_slider.h
+++ b/ui/views/controls/md_slider.h
@@ -31,8 +31,16 @@ class VIEWS_EXPORT MdSlider : public Slider {
int GetThumbWidth() override;
private:
+ // views::View:
+ bool OnMousePressed(const ui::MouseEvent& event) override;
bruthig 2016/09/12 17:16:48 What about touch and keyboard interactions? I ass
yiyix 2016/09/20 20:25:46 Instead of override functions, I created a new fun
+ void OnMouseReleased(const ui::MouseEvent& event) override;
+
// Record whether the slider is in the active state or the disabled state.
bool is_active_;
+
+ // It is true if there is a press event or a touch event in this view
+ // currently; otherwise, it is false.
+ bool is_pressed_;
};
} // namespace views
« no previous file with comments | « no previous file | ui/views/controls/md_slider.cc » ('j') | ui/views/controls/md_slider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698