~mzanetti/unity8/fix-preview-collapsing

« back to all changes in this revision

Viewing changes to Notifications/Notifications.qml

merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import QtQuick 2.0
18
18
import Ubuntu.Components 0.1
19
19
import "../Components"
20
 
import "timings.js" as Timings
21
20
 
22
21
ListView {
23
22
    id: notificationList
40
39
        actions: model.actions
41
40
        notificationId: model.id
42
41
        notification: notificationList.model.getRaw(notificationId)
 
42
 
 
43
        // make sure there's no opacity-difference between the several
 
44
        // elements in a notification
 
45
        layer.enabled: add.running || remove.running || populate.running
43
46
    }
44
47
 
45
48
    populate: Transition {
46
 
        NumberAnimation {
 
49
        UbuntuNumberAnimation {
47
50
            property: "opacity"
48
51
            to: 1
49
 
            duration: Timings.snapBeat
50
 
            easing.type: Timings.easing
 
52
            duration: UbuntuAnimation.SnapDuration
51
53
        }
52
54
    }
53
55
 
54
56
    add: Transition {
55
 
        NumberAnimation {
 
57
        UbuntuNumberAnimation {
56
58
            property: "opacity"
57
59
            to: 1
58
 
            duration: Timings.snapBeat
59
 
            easing.type: Timings.easing
 
60
            duration: UbuntuAnimation.SnapDuration
60
61
        }
61
62
    }
62
63
 
63
64
    remove: Transition {
64
 
        NumberAnimation {
 
65
        UbuntuNumberAnimation {
65
66
            property: "opacity"
66
67
            to: 0
67
 
            duration: Timings.fastBeat
68
 
            easing.type: Timings.easing
69
68
        }
70
69
    }
71
70
 
72
71
    displaced: Transition {
73
 
        NumberAnimation {
 
72
        UbuntuNumberAnimation {
74
73
            properties: "x,y"
75
 
            duration: Timings.fastBeat
76
 
            easing.type: Timings.easing
77
74
        }
78
75
    }
79
76
}