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