aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/SwipeDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/SwipeDelegate.qml')
-rw-r--r--src/imports/controls/SwipeDelegate.qml26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index 7a3e65a0..d9f72da9 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.8
-import QtQuick.Controls 2.1
-import QtQuick.Controls.impl 2.1
-import QtQuick.Templates 2.1 as T
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+import QtQuick.Controls.impl 2.2
+import QtQuick.Templates 2.2 as T
T.SwipeDelegate {
id: control
@@ -52,6 +52,8 @@ T.SwipeDelegate {
padding: 12
spacing: 12
+ swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
+
contentItem: Text {
leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
@@ -63,27 +65,11 @@ T.SwipeDelegate {
visible: control.text
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
-
- Behavior on x {
- enabled: !control.down
- NumberAnimation {
- easing.type: Easing.InOutCubic
- duration: 400
- }
- }
}
background: Rectangle {
color: control.visualFocus
? (control.down ? Default.focusPressedColor : Default.delegateFocusColor)
: (control.down ? Default.delegatePressedColor : Default.backgroundColor)
-
- Behavior on x {
- enabled: !control.down
- NumberAnimation {
- easing.type: Easing.InOutCubic
- duration: 400
- }
- }
}
}