aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialripple.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Styles: use C++11 default member initializationJ-P Nurmi2018-05-041-20/+8
| | | | | Change-Id: Ifd7521b8a7bfd7da91808dd00ebdcb59f2ba46dc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: round ripple translation to avoid artifactsJ-P Nurmi2018-03-011-2/+2
| | | | | | | | | 3b36c4e4 rounded translation of the ripple background node. Do the same for the ripple wave node. Task-number: QTBUG-58646 Change-Id: I455249603e5845a8790dcb374564744de4b880e2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: round ripple translation to avoid artifactsJ-P Nurmi2017-05-301-1/+1
| | | | | | Task-number: QTBUG-58646 Change-Id: Iae5777866099139ec850af8d2c6f5c095ef9f166 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: prevent ripples from getting stuck in disabled stateJ-P Nurmi2016-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | Ripples don't trigger when the ripple item itself is disabled. This is used in SwipeDelegate to prevent ripples when a swipe is open. Now that swipe.position is transitioned, a release event comes before the swipe position reaches 0, so we must ensure that the wave exits even if it's not yet enabled. Change-Id: Ib4d58ff974262331898db2133e06624eb890f9ed Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | qquickmaterialripple.cpp: cleanup unused variablesJ-P Nurmi2016-11-201-2/+0
| | | | | | | | | | | | | | Left overs from 1d8bf6d1f4ef0aa84ca7e4c1233bedeee0f606f9. Change-Id: I53a6916ab3cb8c4effd50ecee1b12662ff7c7402 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: rewrite the ripple animationJ-P Nurmi2016-10-201-163/+166
|/ | | | | | | | | Use animated nodes instead of using the private animator API. Task-number: QTBUG-55652 Task-number: QTBUG-56601 Change-Id: I69d9e6afbc2cb0af6a537553fc39f9871cdd8e97 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: fix ripple wave position on mouse ungrab / button cancelJ-P Nurmi2016-07-211-8/+2
| | | | | | | | | | | | | | | QQuickMaterialRipple compared the anchor item to QQuickWindow's mouseGrabberItem to ensure that only mouse-pressed buttons would use the press point, whereas key-pressed buttons would use the center point. However, this does not work in case the mouse grab was stolen: when first pressing an ItemDelegate and then dragging the containing ListView, the ripple wave would always appear from the center point, not from the press point as it should. Since QQuickAbstractButton::keyPressEvent() sets the press point as the center of the control, the mouseGrabberItem check can be simply removed. Change-Id: Ic24e5e80c9d849f3fe2684013dd40b004ef55b57 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: add missing ripple effect to SwipeDelegateJ-P Nurmi2016-07-201-0/+3
| | | | | | Task-number: QTBUG-54764 Change-Id: Ie04c93a823745b6d0a85e0c80c91d4e7f77f6fcd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: trigger ripple effects on release for some controlsJ-P Nurmi2016-07-131-5/+22
| | | | | | | | | | Android 5 used to trigger ripple effects on press, but Android 6 made ripple effects a bit more subtle. For check boxes, radio buttons, and switches it still triggers on press, but these controls where the wave is larger, it's triggered on release instead. Change-Id: Ib4d301d5ccf72d5db106bcc6ad6afee30cef0b1e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Ripple: use timer event for RIPPLE_ENTER_DELAYJ-P Nurmi2016-07-131-4/+28
| | | | | | | | | 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>
* QQuickAbstractButton: make the press point available via private APIJ-P Nurmi2016-07-111-10/+27
| | | | | | | | | | | | The Material style ripple effect needs it to be able to anchor waves at the press point. Export QQuickAbstractButtonPrivate to make it accessible, and update the press point before emitting pressedChanged() since that's what the ripple effect reacts to. Press point dependent ripple effects follow in separate commits. Change-Id: I63eb51eeabcbeb307dea9d0b1731bdb51b518ec7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: implement the ripple effectJ-P Nurmi2016-07-091-0/+396
Consequently, the controls that were previously using the old Ripple type have now gained hover effects (when hoverEnabled: true). The rest of the Material style controls will be adjusted to use the ripple effect in follow up commits. Task-number: QTBUG-50003 Change-Id: I436f3794411fe75de9ccbe3ecda71029130db613 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>