From 0f44178c85badc031d77827764c9e27cfb17dbdc Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 9 Feb 2021 17:09:25 -0400 Subject: [PATCH] feat: add tooltip with the message timestamp when hovering the chat time --- .../Chat/ChatColumn/MessageComponents/ChatTime.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatTime.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatTime.qml index afc69e0476..158f823de1 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatTime.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatTime.qml @@ -1,5 +1,6 @@ -import QtQuick 2.3 +import QtQuick 2.14 import "../../../../../shared" +import "../../../../../shared/status" import "../../../../../imports" StyledTextEdit { @@ -11,4 +12,14 @@ StyledTextEdit { 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 + } }