Commit 95eae2c6 authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

explore, add animation to display the description

parent 69d9382c
......@@ -119,12 +119,4 @@ Rectangle {
}
}
}
SequentialAnimation {
running: true
NumberAnimation { target: rectangleDesc; property: "x"; to: 0; duration: 800 }
NumberAnimation { target: rectangleDesc; property: "x"; to: 50 ; duration: 100 }
NumberAnimation { target: rectangleDesc; property: "x"; to: 0; duration: 400 }
}
}
......@@ -36,6 +36,7 @@ Item {
property real animalWidth: animalWidth
property real animalHeight: animalHeight
property alias starVisible: star.visible
property bool horizontalLayout: background.width > background.height
property string title
property string description
......@@ -119,11 +120,28 @@ Item {
AnimalDescription {
id: description
parent: background
anchors.fill: parent
width: parent.width
height: parent.height
title: animal.title
description: animal.description
imageSource: animal.imageSource
visible: false
onVisibleChanged: {
if(visible) {
animDescription.start()
}
}
NumberAnimation {
id: animDescription
target: description
property: horizontalLayout ? "x" : "y"
from: horizontalLayout ? -background.width : -background.height
to: 0
duration: 1200
easing.type: Easing.OutBack
}
}
SequentialAnimation {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment