Commit 0793fe08 authored by Simonas Leleiva's avatar Simonas Leleiva

Merge pull request #4 from locusf/notifications

[glacierui] Notifications modified as per some of the specs
parents d6ce9ea7 3dc67f56
...@@ -53,7 +53,7 @@ Item { ...@@ -53,7 +53,7 @@ Item {
property int notificationHeight: 102 property int notificationHeight: 102
property int notificationMargin: 14 property int notificationMargin: 14
property int notificationIconSize: 60 property int notificationIconSize: 60
anchors.top: parent.top anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
width: isPortrait ? notificationWindow.height : notificationWindow.width width: isPortrait ? notificationWindow.height : notificationWindow.width
height: notificationArea.notificationHeight height: notificationArea.notificationHeight
...@@ -85,14 +85,9 @@ Item { ...@@ -85,14 +85,9 @@ Item {
id: notificationPreview id: notificationPreview
anchors { anchors {
fill: parent fill: parent
margins: 10
} }
color: "black" color: "transparent"
radius: 5 radius: 5
border {
color: "gray"
width: 2
}
opacity: 0 opacity: 0
...@@ -128,7 +123,20 @@ Item { ...@@ -128,7 +123,20 @@ Item {
} }
} }
] ]
Rectangle {
id: dimmer
height: 15
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
gradient: Gradient {
GradientStop { position: 0; color: "black" }
GradientStop { position: 1.0; color: "transparent" }
}
}
transitions: [ transitions: [
Transition { Transition {
to: "show" to: "show"
...@@ -158,21 +166,12 @@ Item { ...@@ -158,21 +166,12 @@ Item {
anchors { anchors {
top: parent.top top: parent.top
left: parent.left left: parent.left
topMargin: notificationArea.notificationMargin - 3 topMargin: notificationArea.notificationMargin
leftMargin: notificationArea.notificationMargin leftMargin: notificationArea.notificationMargin
} }
width: notificationArea.notificationIconSize width: notificationArea.notificationIconSize
height: width height: width
source: { source: "images/notification-circle.png"
var icon = ""
if (notificationPreviewPresenter.notification != null) {
icon = notificationPreviewPresenter.notification.previewIcon ? notificationPreviewPresenter.notification.previewIcon : notificationPreviewPresenter.notification.icon
if (icon) {
icon = ((icon.indexOf("/") == 0 ? "file://" : "image://theme/") + icon)
}
}
icon
}
} }
Text { Text {
...@@ -186,7 +185,7 @@ Item { ...@@ -186,7 +185,7 @@ Item {
rightMargin: notificationArea.notificationMargin rightMargin: notificationArea.notificationMargin
} }
font { font {
pixelSize: 22 pixelSize: 36
} }
text: notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewSummary : "" text: notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewSummary : ""
color: "white" color: "white"
...@@ -202,7 +201,8 @@ Item { ...@@ -202,7 +201,8 @@ Item {
right: summary.right right: summary.right
} }
font { font {
pixelSize: 22 pixelSize: 18
bold: true
} }
text: notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewBody : "" text: notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewBody : ""
color: "white" color: "white"
......
...@@ -33,5 +33,6 @@ ...@@ -33,5 +33,6 @@
<file>qml/compositor/WindowWrapperMystic.qml</file> <file>qml/compositor/WindowWrapperMystic.qml</file>
<file>qml/theme/icon-m-framework-close-thumbnail.png</file> <file>qml/theme/icon-m-framework-close-thumbnail.png</file>
<file>qml/NotificationPreview.qml</file> <file>qml/NotificationPreview.qml</file>
<file>qml/images/notification-circle.png</file>
</qresource> </qresource>
</RCC> </RCC>
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