From d1e1ed07ddc4b8a0e8d0b35f5562f071acdd127e Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 30 Nov 2019 11:15:54 -0400 Subject: [PATCH] Hide EventImage bubbles on hover --- TODO.md | 1 + src/qml/Chat/Timeline/EventImage.qml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/TODO.md b/TODO.md index 63328357..59ec7784 100644 --- a/TODO.md +++ b/TODO.md @@ -14,6 +14,7 @@ - Video: missing buttons and small size problems - Audio: online playback is buggy, must download+play file - EventLink + - Special treatment for matrix.to URLs? - EventFile & Downloading (right click on media > save as...) - Refactoring diff --git a/src/qml/Chat/Timeline/EventImage.qml b/src/qml/Chat/Timeline/EventImage.qml index a563059c..34d17498 100644 --- a/src/qml/Chat/Timeline/EventImage.qml +++ b/src/qml/Chat/Timeline/EventImage.qml @@ -85,6 +85,10 @@ HMxcImage { anchors.top: parent.top text: loader.showSender textFormat: Text.StyledText + opacity: hover.hovered ? 0 : 1 + visible: opacity > 0 + + Behavior on opacity { HNumberAnimation {} } } EventImageTextBubble { @@ -92,5 +96,9 @@ HMxcImage { anchors.bottom: parent.bottom text: [loader.showDate, loader.showLocalEcho].join(" ").trim() textFormat: Text.StyledText + opacity: hover.hovered ? 0 : 1 + visible: opacity > 0 + + Behavior on opacity { HNumberAnimation {} } } }