diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-19 08:28:01 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-19 08:28:01 +0200 |
commit | 14fa7b91a07a942e70fc211c7a789754a7111ac1 (patch) | |
tree | 6ed82a7116d2e0ceae313dda0ffca1f27acb05e6 | |
parent | 678e7293edf8359410fa7e7a3c5789ead97d9d98 (diff) |
Rotated launchers and some fixes to tutorial
-rw-r--r-- | Qt/labs/presentation/Presentation.qml | 8 | ||||
-rw-r--r-- | examples/animatedbackground/SlideDeckRotated.qml | 15 | ||||
-rw-r--r-- | examples/customtransition/SlideDeckRotated.qml | 15 | ||||
-rw-r--r-- | examples/tutorial/SlideDeck.qml | 17 | ||||
-rw-r--r-- | examples/tutorial/SlideDeckRotated.qml | 15 |
5 files changed, 56 insertions, 14 deletions
diff --git a/Qt/labs/presentation/Presentation.qml b/Qt/labs/presentation/Presentation.qml index b985880..24863e3 100644 --- a/Qt/labs/presentation/Presentation.qml +++ b/Qt/labs/presentation/Presentation.qml @@ -39,8 +39,10 @@ Item { if (root.currentSlide + 1 < root.slides.length) { var from = slides[currentSlide] var to = slides[currentSlide + 1] - if (switchSlides(from, to)) + if (switchSlides(from, to)) { currentSlide = currentSlide + 1; + root.focus = true; + } } } @@ -50,8 +52,10 @@ Item { if (root.currentSlide - 1 >= 0) { var from = slides[currentSlide] var to = slides[currentSlide - 1] - if (switchSlides(from, to)) + if (switchSlides(from, to)) { currentSlide = currentSlide - 1; + root.focus = true; + } } } diff --git a/examples/animatedbackground/SlideDeckRotated.qml b/examples/animatedbackground/SlideDeckRotated.qml new file mode 100644 index 0000000..a688fc9 --- /dev/null +++ b/examples/animatedbackground/SlideDeckRotated.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item +{ + height: 640 + width: 360 + Item { + rotation: 90 + SlideDeck { + y: -360 + width: 640 + height: 360 + } + } +} diff --git a/examples/customtransition/SlideDeckRotated.qml b/examples/customtransition/SlideDeckRotated.qml new file mode 100644 index 0000000..a688fc9 --- /dev/null +++ b/examples/customtransition/SlideDeckRotated.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item +{ + height: 640 + width: 360 + Item { + rotation: 90 + SlideDeck { + y: -360 + width: 640 + height: 360 + } + } +} diff --git a/examples/tutorial/SlideDeck.qml b/examples/tutorial/SlideDeck.qml index f592751..b41a0da 100644 --- a/examples/tutorial/SlideDeck.qml +++ b/examples/tutorial/SlideDeck.qml @@ -20,32 +20,25 @@ Presentation ] CodeSection { - text: " -import Prezo 1.0 - -Presentation + text: "Presentation { width: 640 height: 360 - // Define a background... - // Default is white.. + // Define a background color... Rectangle { - id: backgroundColor anchors.fill: parent - color: \"blue\" + color: \"white\" } - // Set text color - property color textColor: \"white\" + property color textColor: \"black\" // Then define slide elements Slide { ... } Slide { ... } Slide { ... } ... -} - " +}" } } diff --git a/examples/tutorial/SlideDeckRotated.qml b/examples/tutorial/SlideDeckRotated.qml new file mode 100644 index 0000000..a688fc9 --- /dev/null +++ b/examples/tutorial/SlideDeckRotated.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item +{ + height: 640 + width: 360 + Item { + rotation: 90 + SlideDeck { + y: -360 + width: 640 + height: 360 + } + } +} |