22 lines
675 B
QML
Raw Normal View History

2019-03-21 23:28:14 -04:00
import QtQuick 2.7
import "../base" as Base
2019-03-21 23:28:14 -04:00
Base.HLabel {
2019-04-21 20:55:24 -04:00
property bool isToday: {
const today = new Date()
return dateTime.getDate() == today.getDate() &&
dateTime.getMonth() == today.getMonth() &&
dateTime.getFullYear() == today.getFullYear()
}
width: messageDelegate.width
topPadding: messageDelegate.isFirstMessage ?
0 : messageDelegate.standardSpacing
bottomPadding: messageDelegate.standardSpacing
2019-04-21 20:55:24 -04:00
text: dateTime.toLocaleDateString() + (isToday ? qsTr(" (Today)") : "")
horizontalAlignment: Text.AlignHCenter
2019-04-26 16:02:20 -04:00
font.pixelSize: Base.HStyle.fontSize.big
2019-03-21 23:28:14 -04:00
color: "darkolivegreen"
}