Allow to switch off pagestack transitions

This commit is contained in:
Sebastian Kügler 2013-12-28 06:44:58 +01:00
parent a50398f433
commit 682affabf8

View File

@ -78,6 +78,11 @@ Item {
*/ */
property Item toolBar property Item toolBar
/**
* Should page transitions be animated? Default is true.
*/
property bool animate: true
/** /**
* The page to be automatically loaded when this PageStack component gets * The page to be automatically loaded when this PageStack component gets
* instantiated. * instantiated.
@ -259,7 +264,7 @@ Item {
property int stackWidth: Math.max(root.width, root.height) property int stackWidth: Math.max(root.width, root.height)
// Duration of transition animation (in ms) // Duration of transition animation (in ms)
property int transitionDuration: 250 property int transitionDuration: root.animate ? 250 : 0
// Flag that indicates the container should be cleaned up after the transition has ended. // Flag that indicates the container should be cleaned up after the transition has ended.
property bool cleanupAfterTransition: false property bool cleanupAfterTransition: false