Use Animator for TabGroup transitions
This reduces stuttering when switching between lazyloaded pages CHANGELOG: TabGroup transitions now use Animators for smoother animations REVIEW: 123103
This commit is contained in:
parent
144a58c746
commit
f186b2938f
|
@ -38,7 +38,7 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick 2.2
|
||||
import "private/TabGroup.js" as Engine
|
||||
|
||||
import "." 2.0 as PlasmaComponents
|
||||
|
@ -207,16 +207,36 @@ FocusScope {
|
|||
transitions: [
|
||||
Transition {
|
||||
to: "Incoming"
|
||||
enabled: root.visible
|
||||
SequentialAnimation {
|
||||
ScriptAction { script: root.clip = true }
|
||||
PropertyAnimation { properties: "opacity,x"; easing.type: Easing.InQuad; duration: units.longDuration }
|
||||
ParallelAnimation {
|
||||
OpacityAnimator {
|
||||
easing.type: Easing.InQuad
|
||||
duration: units.longDuration
|
||||
}
|
||||
XAnimator {
|
||||
easing.type: Easing.InQuad
|
||||
duration: units.longDuration
|
||||
}
|
||||
}
|
||||
ScriptAction { script: {incomingDone(); root.clip = false} }
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
to: "OutgoingLeft,OutgoingRight"
|
||||
enabled: root.visible
|
||||
SequentialAnimation {
|
||||
PropertyAnimation { properties: "opacity,x"; easing.type: Easing.InQuad; duration: units.longDuration }
|
||||
ParallelAnimation {
|
||||
OpacityAnimator {
|
||||
easing.type: Easing.InQuad
|
||||
duration: units.longDuration
|
||||
}
|
||||
XAnimator {
|
||||
easing.type: Easing.InQuad
|
||||
duration: units.longDuration
|
||||
}
|
||||
}
|
||||
ScriptAction { script: outgoingDone() }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user