mirror of https://github.com/cutefishos/fishui
Add stackview style
parent
025fed5199
commit
feac04d441
@ -0,0 +1,17 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"optional": "cpp",
|
||||
"ostream": "cpp",
|
||||
"ratio": "cpp",
|
||||
"system_error": "cpp",
|
||||
"array": "cpp",
|
||||
"functional": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"utility": "cpp",
|
||||
"variant": "cpp",
|
||||
"string_view": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"ranges": "cpp"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Templates 2.3 as T
|
||||
|
||||
|
||||
T.StackView {
|
||||
id: control
|
||||
|
||||
popEnter: Transition {
|
||||
// slide_in_left
|
||||
NumberAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * -control.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
popExit: Transition {
|
||||
// slide_out_right
|
||||
NumberAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * control.width; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
pushEnter: Transition {
|
||||
// slide_in_right
|
||||
NumberAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * control.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
pushExit: Transition {
|
||||
// slide_out_left
|
||||
NumberAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * -control.width; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
replaceEnter: Transition {
|
||||
// slide_in_right
|
||||
NumberAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * control.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
replaceExit: Transition {
|
||||
// slide_out_left
|
||||
NumberAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * -control.width; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue