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

26 lines
732 B
QML
Raw Normal View History

import QtQuick 2.14
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
StyledTextEdit {
property bool formatDateTime: false
id: chatTime
2020-07-20 17:34:20 +00:00
visible: isMessage
color: isImage ? Style.current.white : Style.current.darkGrey
2021-01-04 14:47:25 +00:00
text: formatDateTime ? Utils.formatDateTime(timestamp, appSettings.locale) : Utils.formatTime(timestamp, appSettings.locale)
font.pixelSize: Style.current.asideTextFontSize
readOnly: true
selectByMouse: true
StatusToolTip {
visible: hhandler.hovered
text: new Date(parseInt(timestamp, 10)).toLocaleString(Qt.locale(appSettings.locale))
width: 350
}
HoverHandler {
id: hhandler
}
}