Libplasma

StackView.qml
1/*
2 SPDX-FileCopyrightText: 2024 Marco Martin
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7import QtQuick
8import QtQuick.Templates as T
9
10import org.kde.kirigami as Kirigami
11
12T.StackView {
13 id: control
14
15 property real __leading: mirrored ? -width / 4 : width - width / 4
16 property real __trailing: mirrored ? width - width / 4 : -width / 4
17
18 pushEnter: Transition {
19 NumberAnimation {
20 property: "opacity"
21 from: 0
22 to: 1
23 duration: Kirigami.Units.longDuration
24 easing.type: Easing.OutQuad
25 }
26 NumberAnimation {
27 property: "x"
28 from: __trailing
29 to: 0
30 duration: Kirigami.Units.longDuration
31 easing.type: Easing.OutQuad
32 }
33 }
34 pushExit: Transition {
35 NumberAnimation {
36 property: "opacity"
37 from: 1
38 to: 0
39 duration: Kirigami.Units.longDuration
40 easing.type: Easing.InQuad
41 }
42 NumberAnimation {
43 property: "x"
44 from: 0
45 to: __leading
46 duration: Kirigami.Units.longDuration
47 easing.type: Easing.InQuad
48 }
49 }
50
51 popEnter: Transition {
52 NumberAnimation {
53 property: "opacity"
54 from: 0
55 to: 1
56 duration: Kirigami.Units.longDuration
57 easing.type: Easing.OutQuad
58 }
59 NumberAnimation {
60 property: "x"
61 from: __leading
62 to: 0
63 duration: Kirigami.Units.longDuration
64 easing.type: Easing.OutQuad
65 }
66 }
67 popExit: Transition {
68 NumberAnimation {
69 property: "opacity"
70 from: 1
71 to: 0
72 duration: Kirigami.Units.longDuration
73 easing.type: Easing.InQuad
74 }
75 NumberAnimation {
76 property: "x"
77 from: 0
78 to: __trailing
79 duration: Kirigami.Units.longDuration
80 easing.type: Easing.InQuad
81 }
82 }
83
84 replaceEnter: Transition {
85 NumberAnimation {
86 property: "opacity"
87 from: 0
88 to: 1
89 duration: Kirigami.Units.longDuration
90 easing.type: Easing.OutQuad
91 }
92 NumberAnimation {
93 property: "x"
94 from: __trailing
95 to: 0
96 duration: Kirigami.Units.longDuration
97 easing.type: Easing.OutQuad
98 }
99 }
100 replaceExit: Transition {
101 NumberAnimation {
102 property: "opacity"
103 from: 1
104 to: 0
105 duration: Kirigami.Units.longDuration
106 easing.type: Easing.InQuad
107 }
108 NumberAnimation {
109 property: "x"
110 from: 0
111 to: __leading
112 duration: Kirigami.Units.longDuration
113 easing.type: Easing.InQuad
114 }
115 }
116}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.