Kirigami2

PrivateSwipeStack.qml
1 /*
2  * SPDX-FileCopyrightText: 2020 Carson Black <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.12
8 import QtQuick.Controls 2.12 as QQC2
9 import org.kde.kirigami 2.12 as Kirigami
10 
11 QQC2.StackView {
12  popEnter: Transition {
13  OpacityAnimator {
14  from: 0
15  to: 1
16  duration: Kirigami.Units.longDuration
17  easing.type: Easing.InOutCubic
18  }
19  }
20  popExit: Transition {
21  ParallelAnimation {
22  OpacityAnimator {
23  from: 1
24  to: 0
25  duration: Kirigami.Units.longDuration
26  easing.type: Easing.InOutCubic
27  }
28  YAnimator {
29  from: 0
30  to: height/2
31  duration: Kirigami.Units.longDuration
32  easing.type: Easing.InCubic
33  }
34  }
35  }
36 
37  pushEnter: Transition {
38  ParallelAnimation {
39  // NOTE: It's a PropertyAnimation instead of an Animator because with an animator the item will be visible for an instant before starting to fade
40  PropertyAnimation {
41  property: "opacity"
42  from: 0
43  to: 1
44  duration: Kirigami.Units.longDuration
45  easing.type: Easing.InOutCubic
46  }
47  YAnimator {
48  from: height/2
49  to: 0
50  duration: Kirigami.Units.longDuration
51  easing.type: Easing.OutCubic
52  }
53  }
54  }
55 
56 
57  pushExit: Transition {
58  OpacityAnimator {
59  from: 1
60  to: 0
61  duration: Kirigami.Units.longDuration
62  easing.type: Easing.InOutCubic
63  }
64  }
65 
66  replaceEnter: Transition {
67  ParallelAnimation {
68  OpacityAnimator {
69  from: 0
70  to: 1
71  duration: Kirigami.Units.longDuration
72  easing.type: Easing.InOutCubic
73  }
74  YAnimator {
75  from: height/2
76  to: 0
77  duration: Kirigami.Units.longDuration
78  easing.type: Easing.OutCubic
79  }
80  }
81  }
82 
83  replaceExit: Transition {
84  ParallelAnimation {
85  OpacityAnimator {
86  from: 1
87  to: 0
88  duration: Kirigami.Units.longDuration
89  easing.type: Easing.InCubic
90  }
91  YAnimator {
92  from: 0
93  to: -height/2
94  duration: Kirigami.Units.longDuration
95  easing.type: Easing.InOutCubic
96  }
97  }
98  }
99 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:14:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.