Commit 874f0d56 authored by eekkelund's avatar eekkelund

[FeedsPage] Show default notification icon if no icon found. Fix date to fit to screen

parent f7197141
...@@ -57,13 +57,13 @@ Flickable { ...@@ -57,13 +57,13 @@ Flickable {
Label { Label {
id: displayDayOfWeek id: displayDayOfWeek
text: Qt.formatDateTime(wallClock.time, "dddd") + ", " text: Qt.formatDateTime(wallClock.time, "dddd")
color: Theme.textColor color: Theme.textColor
font.pixelSize: Theme.fontSizeExtraLarge font.pixelSize: Theme.fontSizeExtraLarge
font.weight: Font.Bold font.weight: Font.Bold
anchors { anchors {
top: parent.top top: parent.top
left: parent.left horizontalCenter: parent.horizontalCenter
} }
} }
...@@ -76,8 +76,8 @@ Flickable { ...@@ -76,8 +76,8 @@ Flickable {
font.weight: Font.Light font.weight: Font.Light
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
anchors { anchors {
left: displayDayOfWeek.right horizontalCenter: parent.horizontalCenter
top: parent.top top: displayDayOfWeek.bottom
} }
} }
} }
......
...@@ -40,7 +40,7 @@ Rectangle { ...@@ -40,7 +40,7 @@ Rectangle {
} }
Rectangle { Rectangle {
id: dateRow id: dateRow
height: weekdayDisplay.height height: childrenRect.height
width: weekdayDisplay.width + dateDisplay.width width: weekdayDisplay.width + dateDisplay.width
anchors { anchors {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
...@@ -56,10 +56,10 @@ Rectangle { ...@@ -56,10 +56,10 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.weight: Font.Bold font.weight: Font.Bold
anchors { anchors {
left: parent.left horizontalCenter: parent.horizontalCenter
} }
text: Qt.formatDateTime(wallClock.time, "dddd") + ", " text: Qt.formatDateTime(wallClock.time, "dddd")
} }
Label { Label {
...@@ -70,8 +70,8 @@ Rectangle { ...@@ -70,8 +70,8 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.weight: Font.Light font.weight: Font.Light
anchors { anchors {
left: weekdayDisplay.right horizontalCenter: parent.horizontalCenter
top: parent.top top: weekdayDisplay.bottom
} }
text: Qt.formatDate(wallClock.time, "d MMMM yyyy") text: Qt.formatDate(wallClock.time, "d MMMM yyyy")
......
...@@ -18,6 +18,7 @@ MouseArea { ...@@ -18,6 +18,7 @@ MouseArea {
id: appIcon id: appIcon
height: Theme.itemHeightExtraLarge height: Theme.itemHeightExtraLarge
width: height width: height
property string defaultIcon: "/usr/share/lipstick-glacier-home-qt5/qml/images/glacier.svg"
anchors{ anchors{
left: parent.left left: parent.left
...@@ -25,10 +26,16 @@ MouseArea { ...@@ -25,10 +26,16 @@ MouseArea {
} }
source: { source: {
console.log(modelData, modelData.icon)
if (modelData.icon) if (modelData.icon)
return "image://theme/" + modelData.icon return "image://theme/" + modelData.icon
else else
return "/usr/share/lipstick-glacier-home-qt5/qml/images/glacier.svg" return defaultIcon
}
onStatusChanged: {
if (appIcon.status == Image.Error) {
appIcon.source = defaultIcon
}
} }
} }
Label { Label {
......
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