diff options
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r-- | src/imports/controls/material/SwipeDelegate.qml | 18 | ||||
-rw-r--r-- | src/imports/controls/material/qquickmaterialripple.cpp | 3 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml index 28fc6c2e..4acf4524 100644 --- a/src/imports/controls/material/SwipeDelegate.qml +++ b/src/imports/controls/material/SwipeDelegate.qml @@ -83,9 +83,21 @@ T.SwipeDelegate { Rectangle { width: parent.width height: parent.height - visible: control.down || control.highlighted || control.visualFocus - color: control.visualFocus || control.hovered ? control.Material.swipeDelegateHoverColor : - control.Material.listHighlightColor + visible: control.highlighted + color: control.Material.listHighlightColor + } + + Ripple { + width: parent.width + height: parent.height + + clip: visible + trigger: Ripple.Release + pressed: control.pressed + anchor: control + active: control.down || control.visualFocus || control.hovered + color: control.Material.checkBoxUncheckedRippleColor + enabled: control.swipe.position === 0 } Behavior on x { diff --git a/src/imports/controls/material/qquickmaterialripple.cpp b/src/imports/controls/material/qquickmaterialripple.cpp index 2cb80f1b..f3bc465c 100644 --- a/src/imports/controls/material/qquickmaterialripple.cpp +++ b/src/imports/controls/material/qquickmaterialripple.cpp @@ -275,6 +275,9 @@ void QQuickMaterialRipple::setPressed(bool pressed) m_pressed = pressed; + if (!isEnabled()) + return; + if (pressed) { if (m_trigger == Press) prepareWave(); |