From c34471994d7393cba9840feb04d250f179cf815a Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 7 Jul 2013 15:38:59 +0200 Subject: bump to 0.5.2 --- .../metawatch-digital-notification.qml | 54 ++++++++++++++++++---- 1 file changed, 44 insertions(+), 10 deletions(-) (limited to 'metawatchwatchlets') diff --git a/metawatchwatchlets/metawatch-digital-notification.qml b/metawatchwatchlets/metawatch-digital-notification.qml index 6856bac..616185b 100644 --- a/metawatchwatchlets/metawatch-digital-notification.qml +++ b/metawatchwatchlets/metawatch-digital-notification.qml @@ -20,7 +20,7 @@ MWPage { Column { id: defaultContainer - visible: false + visible: true anchors.left: parent.left anchors.leftMargin: 1 width: page.width - 3 @@ -36,6 +36,35 @@ MWPage { } } + Column { + id: callContainer + visible: false + anchors.top: parent.top + anchors.topMargin: 10 + anchors.left: parent.left + anchors.leftMargin: 1 + width: page.width - 5 + spacing: 2 + + Image { + source: "notification-phone.png" + anchors.horizontalCenter: parent.horizontalCenter + } + MWLabel { + text: curNotification ? curNotification.title : "" + font.pixelSize: 16 + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + width: parent.width + } + MWLabel { + text: curNotification ? curNotification.body : "" + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + width: parent.width + } + } + Column { id: emailContainer visible: false @@ -83,19 +112,24 @@ MWPage { states: [ State { - when: curNotification && curNotification.type === Notification.EmailNotification - PropertyChanges { target: emailContainer; visible: true; } + name: "CallNotification" + when: curNotification.type === Notification.CallNotification + PropertyChanges { target: defaultContainer; visible: false; } + PropertyChanges { target: callContainer; visible: true; } }, State { - when: curNotification && ( - curNotification.type === Notification.ImNotification || - curNotification.type === Notification.SmsNotification || - curNotification.type === Notification.MmsNotification) - PropertyChanges { target: chatContainer; visible: true; } + name: "EmailNotification" + when: curNotification.type === Notification.EmailNotification + PropertyChanges { target: defaultContainer; visible: false; } + PropertyChanges { target: emailContainer; visible: true; } }, State { - when: curNotification // Any other notification type - PropertyChanges { target: defaultContainer; visible: true; } + name: "ImNotification" + when: curNotification.type === Notification.ImNotification || + curNotification.type === Notification.SmsNotification || + curNotification.type === Notification.MmsNotification + PropertyChanges { target: defaultContainer; visible: false; } + PropertyChanges { target: chatContainer; visible: true; } } ] -- cgit v1.2.3