aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-12-20 15:32:58 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-12-21 12:07:29 +0000
commit5be4488fb15b544926af203feeffa5ced8184f1f (patch)
tree29e53c95d04fa1c041c28d2e220b63286612be78 /src/imports/controls
parentfed1476148399f4402ce2069874e7c66e834e764 (diff)
SwipeDelegate: rename swipe.rebound to swipe.transition
The "rebound" name originates from Flickable::rebound, but for swipe delegate the transition is not only applied on release, but also when calling swipe.open() or swipe.close(). Therefore the "rebound" name feels a bit off in this context. Furthermore, this patch adds the missing docs and a changelog entry. [ChangeLog][Controls][SwipeDelegate] Added a swipe.transition property that holds the transition that is applied when a swipe is released, or swipe.open() or swipe.close() is called. Change-Id: Ic38ec850c64dd21b8d9deb08609172c6cb0f6d71 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls')
-rw-r--r--src/imports/controls/SwipeDelegate.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml37
-rw-r--r--src/imports/controls/material/SwipeDelegate.qml2
-rw-r--r--src/imports/controls/universal/SwipeDelegate.qml2
4 files changed, 40 insertions, 3 deletions
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index 6249e2ca..3c8b62df 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -52,7 +52,7 @@ T.SwipeDelegate {
padding: 12
spacing: 12
- swipe.rebound: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
+ swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
contentItem: Text {
leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
new file mode 100644
index 00000000..a5e81ab7
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+
+//! [1]
+SwipeDelegate {
+ swipe.transition: Transition {
+ SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic }
+ }
+}
+//! [1]
diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml
index 3561b32d..053680b4 100644
--- a/src/imports/controls/material/SwipeDelegate.qml
+++ b/src/imports/controls/material/SwipeDelegate.qml
@@ -54,7 +54,7 @@ T.SwipeDelegate {
bottomPadding: 8
spacing: 16
- swipe.rebound: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
+ swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
contentItem: Text {
leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
diff --git a/src/imports/controls/universal/SwipeDelegate.qml b/src/imports/controls/universal/SwipeDelegate.qml
index 41a5a372..f1ecbc2b 100644
--- a/src/imports/controls/universal/SwipeDelegate.qml
+++ b/src/imports/controls/universal/SwipeDelegate.qml
@@ -54,7 +54,7 @@ T.SwipeDelegate {
topPadding: padding - 1
bottomPadding: padding + 1
- swipe.rebound: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
+ swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
contentItem: Text {
leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0