diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-03 16:05:28 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-03 17:50:15 +0000 |
commit | dc78d00db6128ee53953b0cf01dcbfe236a849c3 (patch) | |
tree | 0449f383ba64213504bf443e0723bb4cdf0d85d0 /src/imports/controls/universal/StackView.qml | |
parent | d77d00b17c203fc08dcd34978ff35dbf154d2411 (diff) |
StackView: use control as root id like in all other controls
This makes it 100% clear in the doc snippets that the transitions are
referring to the stackview control.
Change-Id: I7c56b3669917f2f581972342c6b632738e0eb4fc
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/universal/StackView.qml')
-rw-r--r-- | src/imports/controls/universal/StackView.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/controls/universal/StackView.qml b/src/imports/controls/universal/StackView.qml index b49c2dbb..cbc5665d 100644 --- a/src/imports/controls/universal/StackView.qml +++ b/src/imports/controls/universal/StackView.qml @@ -39,13 +39,13 @@ import Qt.labs.templates 1.0 as T import Qt.labs.controls.universal 1.0 T.StackView { - id: root + id: control //! [popEnter] popEnter: Transition { ParallelAnimation { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint } - NumberAnimation { property: "x"; from: (root.mirrored ? -0.3 : 0.3) * -root.width; to: 0; duration: 400; easing.type: Easing.OutCubic } + NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic } } } //! [popEnter] @@ -60,7 +60,7 @@ T.StackView { pushEnter: Transition { ParallelAnimation { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint } - NumberAnimation { property: "x"; from: (root.mirrored ? -0.3 : 0.3) * root.width; to: 0; duration: 400; easing.type: Easing.OutCubic } + NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic } } } //! [pushEnter] @@ -75,7 +75,7 @@ T.StackView { replaceEnter: Transition { ParallelAnimation { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint } - NumberAnimation { property: "x"; from: (root.mirrored ? -0.3 : 0.3) * root.width; to: 0; duration: 400; easing.type: Easing.OutCubic } + NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic } } } //! [replaceEnter] |