summaryrefslogtreecommitdiffstats
path: root/VSyncSlide.qml
blob: 4432bd89970f09699b6ffa3fc3f5381e59b2926d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import QtQuick 2.0
import Qt.labs.presentation 1.0

Slide { // Vsync animations / flickable..
    title: "Animations Synchronized to VBlank"
    content: [
        "Advance animations exactly once per frame",
        "No more jerkies",
        "It's Velvet!"
    ]
    contentWidth: width / 2

    Flickable {
        id: vsyncFlickable
        x: parent.width / 2 + parent.baseFontSize
        width: parent.width / 2 - parent.baseFontSize
        height: parent.height

        clip: true

        contentHeight: 25000
        contentWidth: 25000

        Image {
            id: flickImage
            anchors.fill: parent
            smooth: true
            source: "images/landscape.png"
            fillMode: Image.Tile
        }
    }

    Text {
        font.pixelSize: parent.baseFontSize * 0.3
        color: "white"
        text: "Must be experienced first hand, not via video capture"
        anchors.top: vsyncFlickable.bottom
        anchors.horizontalCenter: vsyncFlickable.horizontalCenter
    }
}