From d0608ada900a048f28ebf48cc80326e9a7eef1d5 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Sat, 24 Jan 2015 10:42:57 +0100 Subject: [PATCH] Added loop property to Presentation in calamares.slideshow QML module. --- src/qml/calamares/slideshow/Presentation.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qml/calamares/slideshow/Presentation.qml b/src/qml/calamares/slideshow/Presentation.qml index 086e9071c..eafeca3f8 100644 --- a/src/qml/calamares/slideshow/Presentation.qml +++ b/src/qml/calamares/slideshow/Presentation.qml @@ -51,6 +51,7 @@ Item { property bool showNotes: false; property bool allowDelay: true; + property bool loop: true; property color titleColor: textColor; property color textColor: "black" @@ -103,6 +104,16 @@ Item { root.focus = true; } } + else { + if (root.loop) { + var from = slides[currentSlide] + var to = slides[0] + if (switchSlides(from, to, true)) { + currentSlide = 0; + root.focus = true; + } + } + } } function goToPreviousSlide() {