From: kokkiemouse Date: Sat, 10 Oct 2020 02:45:48 +0000 (+0900) Subject: fixed animation X-Git-Tag: 2020-11-20-a~35 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ff7fc6660287689f133e1524810ffc02c7c329f9;p=alterlinux%2FLFBS.git fixed animation Signed-off-by: kokkiemouse --- diff --git a/channels/share/airootfs/usr/share/calamares/branding/serene/show.qml b/channels/share/airootfs/usr/share/calamares/branding/serene/show.qml index 61ee0e2..1c2c8d6 100644 --- a/channels/share/airootfs/usr/share/calamares/branding/serene/show.qml +++ b/channels/share/airootfs/usr/share/calamares/branding/serene/show.qml @@ -32,6 +32,15 @@ Presentation */ // slide1 + function switchSlides(from, to, forward) { + + to.stop_animation() + from.visible = false + + to.start_animation() + to.visible = true + return true + } Slide { id: slide_1 Image { @@ -56,11 +65,13 @@ Presentation wrapMode: Text.WordWrap } Rectangle{ + id:slide_1_rect_1 width : slide_1.width height: slide_1.height color: "#FFFFFFFF" SequentialAnimation on color{ + id:slide_1_color_animation PauseAnimation { duration:2000 } ColorAnimation { to : "#00FFFFFF" @@ -79,6 +90,7 @@ Presentation wrapMode: Text.WordWrap width: presentation.width SequentialAnimation on x { + id:slide_1_text_1_animation PauseAnimation{ duration: 500 } XAnimator{ from:-800 @@ -88,6 +100,17 @@ Presentation } } } + function stop_animation(){ + slide_1_color_animation.stop() + slide_1_rect_1.color="#FFFFFFFF" + text_1.x=-800 + slide_1_text_1_animation.stop() + } + function start_animation(){ + slide_1_color_animation.start() + slide_1_text_1_animation.start() + + } } // slide2 @@ -115,11 +138,13 @@ Presentation wrapMode: Text.WordWrap } Rectangle{ + id:slide_2_rect width : slide_2.width height: slide_2.height color: "#FFFFFFFF" SequentialAnimation on color{ + id:slide_2_color_anim PauseAnimation { duration:2000 } ColorAnimation { to : "#00FFFFFF" @@ -138,6 +163,7 @@ Presentation wrapMode: Text.WordWrap width: presentation.width SequentialAnimation on x { + id: text_2_animation PauseAnimation{ duration: 500 } XAnimator{ from:-800 @@ -147,6 +173,16 @@ Presentation } } } + function stop_animation(){ + text_2_animation.stop() + slide_2_color_anim.stop() + text_2.x=-800 + slide_2_rect.color="#FFFFFFFF" + } + function start_animation(){ + text_2_animation.start() + slide_2_color_anim.start() + } } // logo