status-desktop/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatTime.qml

24 lines
621 B
QML
Raw Normal View History

import QtQuick 2.14
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
2021-02-10 12:45:56 +00:00
StyledText {
property bool formatAge: false
id: chatTime
2020-07-20 17:34:20 +00:00
visible: isMessage
color: Style.current.secondaryText
text: formatAge ? Utils.formatAgeFromTime(timestamp) : Utils.formatTime(timestamp)
font.pixelSize: Style.current.asideTextFontSize
2021-02-10 12:45:56 +00:00
StatusToolTip {
visible: hhandler.hovered
text: new Date(parseInt(timestamp, 10)).toLocaleString(Qt.locale(globalSettings.locale))
maxWidth: 350
}
HoverHandler {
id: hhandler
}
}