aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/SwipeDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/material/SwipeDelegate.qml')
-rw-r--r--src/imports/controls/material/SwipeDelegate.qml26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml
index dec2d12f..329322e2 100644
--- a/src/imports/controls/material/SwipeDelegate.qml
+++ b/src/imports/controls/material/SwipeDelegate.qml
@@ -35,9 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import QtQuick.Templates 2.0 as T
-import QtQuick.Controls.Material 2.0
-import QtQuick.Controls.Material.impl 2.0
+import QtQuick.Templates 2.1 as T
+import QtQuick.Controls.Material 2.1
+import QtQuick.Controls.Material.impl 2.1
T.SwipeDelegate {
id: control
@@ -54,6 +54,8 @@ T.SwipeDelegate {
bottomPadding: 8
spacing: 16
+ hoverEnabled: Qt.styleHints.useHoverEffects
+
contentItem: Text {
leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
rightPadding: control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
@@ -83,10 +85,20 @@ T.SwipeDelegate {
Rectangle {
width: parent.width
height: parent.height
- visible: control.down || control.highlighted || control.visualFocus
- color: control.down ? control.Material.buttonPressColor :
- 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
+ pressed: control.pressed
+ anchor: control
+ active: control.down || control.visualFocus || control.hovered
+ color: control.Material.rippleColor
+ enabled: control.swipe.position === 0
}
Behavior on x {