~mhr3/unity8/fix-1297246

« back to all changes in this revision

Viewing changes to Notifications/Notifications.qml

  • Committer: Michał Sawicz
  • Date: 2013-06-05 22:03:08 UTC
  • Revision ID: michal.sawicz@canonical.com-20130605220308-yny8fv3futtr04fg
Inital unity8 commit.

Previous history can be found at https://code.launchpad.net/~unity-team/unity/phablet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
import QtQuick 2.0
 
18
import Ubuntu.Components 0.1
 
19
import "../Components"
 
20
import "timings.js" as Timings
 
21
 
 
22
ListView {
 
23
    id: notificationRenderer
 
24
 
 
25
    objectName: "notificationRenderer"
 
26
    interactive: false
 
27
 
 
28
    spacing: units.gu(.5)
 
29
    delegate: Notification {
 
30
        objectName: "notification" + index
 
31
        anchors {
 
32
            left: parent.left
 
33
            right: parent.right
 
34
        }
 
35
        type: model.type
 
36
        iconSource: model.icon
 
37
        secondaryIconSource: model.secondaryIcon
 
38
        summary: model.summary
 
39
        body: model.body
 
40
        actions: model.actions
 
41
    }
 
42
 
 
43
    populate: Transition {
 
44
        NumberAnimation {
 
45
            property: "opacity"
 
46
            to: 1
 
47
            duration: Timings.snapBeat
 
48
            easing.type: Timings.easing
 
49
        }
 
50
    }
 
51
 
 
52
    add: Transition {
 
53
        NumberAnimation {
 
54
            property: "opacity"
 
55
            to: 1
 
56
            duration: Timings.snapBeat
 
57
            easing.type: Timings.easing
 
58
        }
 
59
    }
 
60
 
 
61
    remove: Transition {
 
62
        NumberAnimation {
 
63
            property: "opacity"
 
64
            to: 0
 
65
            duration: Timings.fastBeat
 
66
            easing.type: Timings.easing
 
67
        }
 
68
    }
 
69
 
 
70
    displaced: Transition {
 
71
        NumberAnimation {
 
72
            properties: "x,y"
 
73
            duration: Timings.fastBeat
 
74
            easing.type: Timings.easing
 
75
        }
 
76
    }
 
77
}