Warning, /frameworks/qqc2-desktop-style/org.kde.desktop/StackView.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2017 The Qt Company Ltd. 0003 SPDX-FileCopyrightText: 2022 Fushan Wen <qydwhotmail@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later 0006 */ 0007 0008 import QtQuick 0009 import QtQuick.Controls 0010 import QtQuick.Templates as T 0011 import org.kde.kirigami as Kirigami 0012 0013 T.StackView { 0014 id: control 0015 0016 // Using NumberAnimation instead of XAnimator because the latter wasn't always smooth enough. 0017 pushEnter: Transition { 0018 NumberAnimation { 0019 property: "x" 0020 from: (control.mirrored ? -0.5 : 0.5) * control.width 0021 to: 0 0022 duration: Kirigami.Units.longDuration 0023 easing.type: Easing.OutCubic 0024 } 0025 NumberAnimation { 0026 property: "opacity" 0027 from: 0.0; to: 1.0 0028 duration: Kirigami.Units.longDuration 0029 easing.type: Easing.OutCubic 0030 } 0031 } 0032 pushExit: Transition { 0033 NumberAnimation { 0034 property: "x" 0035 from: 0 0036 to: (control.mirrored ? -0.5 : 0.5) * -control.width 0037 duration: Kirigami.Units.longDuration 0038 easing.type: Easing.OutCubic 0039 } 0040 NumberAnimation { 0041 property: "opacity" 0042 from: 1.0; to: 0.0 0043 duration: Kirigami.Units.longDuration 0044 easing.type: Easing.OutCubic 0045 } 0046 } 0047 popEnter: Transition { 0048 NumberAnimation { 0049 property: "x" 0050 from: (control.mirrored ? -0.5 : 0.5) * -control.width 0051 to: 0 0052 duration: Kirigami.Units.longDuration 0053 easing.type: Easing.OutCubic 0054 } 0055 NumberAnimation { 0056 property: "opacity" 0057 from: 0.0; to: 1.0 0058 duration: Kirigami.Units.longDuration 0059 easing.type: Easing.OutCubic 0060 } 0061 } 0062 popExit: Transition { 0063 NumberAnimation { 0064 property: "x" 0065 from: 0 0066 to: (control.mirrored ? -0.5 : 0.5) * control.width 0067 duration: Kirigami.Units.longDuration 0068 easing.type: Easing.OutCubic 0069 } 0070 NumberAnimation { 0071 property: "opacity" 0072 from: 1.0; to: 0.0 0073 duration: Kirigami.Units.longDuration 0074 easing.type: Easing.OutCubic 0075 } 0076 } 0077 replaceEnter: Transition { 0078 NumberAnimation { 0079 property: "x" 0080 from: (control.mirrored ? -0.5 : 0.5) * control.width 0081 to: 0 0082 duration: Kirigami.Units.longDuration 0083 easing.type: Easing.OutCubic 0084 } 0085 NumberAnimation { 0086 property: "opacity" 0087 from: 0.0; to: 1.0 0088 duration: Kirigami.Units.longDuration 0089 easing.type: Easing.OutCubic 0090 } 0091 } 0092 replaceExit: Transition { 0093 NumberAnimation { 0094 property: "x" 0095 from: 0 0096 to: (control.mirrored ? -0.5 : 0.5) * -control.width 0097 duration: Kirigami.Units.longDuration 0098 easing.type: Easing.OutCubic 0099 } 0100 NumberAnimation { 0101 property: "opacity" 0102 from: 1.0; to: 0.0 0103 duration: Kirigami.Units.longDuration 0104 easing.type: Easing.OutCubic 0105 } 0106 } 0107 }