aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialripple_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-11 12:52:59 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-13 18:57:40 +0000
commitf4a42a914ce2718259e683f860a86449d4aaff83 (patch)
tree7a6b5b6cc3c9c148ae824b0528cd7afff48ea144 /src/imports/controls/material/qquickmaterialripple_p.h
parentd6b2c606b27227ffb3d86615d1c0c54a866e3b99 (diff)
Ripple: use timer event for RIPPLE_ENTER_DELAY
Instead of creating a ripple wave item right away and handling the delay inside the animation, use a timer event to postpone the wave creation until it's necessary. Change-Id: Ie8b6aa2e4ae148a51b0ae17f4d0ee50e20ddb321 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialripple_p.h')
-rw-r--r--src/imports/controls/material/qquickmaterialripple_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialripple_p.h b/src/imports/controls/material/qquickmaterialripple_p.h
index 14e31aa6..80a562cf 100644
--- a/src/imports/controls/material/qquickmaterialripple_p.h
+++ b/src/imports/controls/material/qquickmaterialripple_p.h
@@ -87,13 +87,16 @@ public:
protected:
void itemChange(ItemChange change, const ItemChangeData &data) override;
QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
+ void timerEvent(QTimerEvent *event) override;
+ void prepareWave();
void enterWave();
void exitWave();
private:
bool m_active;
bool m_pressed;
+ int m_enterDelay;
qreal m_clipRadius;
QColor m_color;
QQuickItem *m_anchor;