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

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

Issue 2335513002: Adding ripple effect for clicks on MD slider (Closed)
Patch Set: add disallow_copy_and_assign to testslider Created 4 years, 2 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') | no next file with comments »
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..9a534f5736f13107a3e007a6f17b70adfd7c67ea 100644
--- a/ui/views/controls/md_slider.h
+++ b/ui/views/controls/md_slider.h
@@ -10,10 +10,14 @@
#include "ui/views/view.h"
#include "ui/views/views_export.h"
+namespace gfx {
+class SlideAnimation;
+}
+
namespace views {
// TODO(yiyix): When material design is enabled by default, use
-// MaterialDesignSlider as the default slider implementation. (crbug.com/614453)
+// MdSlider as the default slider implementation. (crbug.com/614453)
class VIEWS_EXPORT MdSlider : public Slider {
public:
explicit MdSlider(SliderListener* listener);
@@ -29,10 +33,22 @@ class VIEWS_EXPORT MdSlider : public Slider {
protected:
// ui::Slider:
int GetThumbWidth() override;
+ void SetHighlighted(bool is_highlighted) override;
private:
+ // gfx::AnimationDelegate:
+ void AnimationProgressed(const gfx::Animation* animation) override;
+ void AnimationEnded(const gfx::Animation* animation) override;
+
// Record whether the slider is in the active state or the disabled state.
bool is_active_;
+
+ // Animating value of the current radius of the thumb's highlight.
+ float thumb_highlight_radius_;
+
+ std::unique_ptr<gfx::SlideAnimation> highlight_animation_;
+
+ DISALLOW_COPY_AND_ASSIGN(MdSlider);
};
} // namespace views
« no previous file with comments | « no previous file | ui/views/controls/md_slider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698