From b3e3fd7bc6be11da1397f54f1829017312d86810 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 16 Dec 2019 18:28:51 -0400 Subject: [PATCH] EventFile: be as tall as the message avatars --- TODO.md | 11 +++++------ src/qml/Base/HTile.qml | 3 +++ src/qml/Chat/Timeline/EventFile.qml | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 2a22b2cf..a0705593 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,5 @@ # TODO -- some way to show name and date on EventFile -- sentinel func to report path if already cached without having to click -- verify eventfile height - Make dark bar extend down pane - Verify default size @@ -13,12 +10,15 @@ - Send the monitor PR - nio ClientTimeout -- clicking on encrypted images opens the thumbnail - Handle set avatar upload errors -- Support encrypted m.file - Confirmation box after picking file to upload - Show real progression for mxc thumbnail loadings +- Some way to show name and date on EventFile +- Sentinel function to report download file path if already cached, + without having to click & try downloading first +- EventFile download UI & Save as... in context menu + - Show reason under broken thumbnail icons - Support m.file thumbnails - Generate video thumbnails @@ -30,7 +30,6 @@ - Audio: online playback is buggy, must download+play file - EventLink - Special treatment for matrix.to URLs? -- EventFile & Downloading (right click on media > save as...) - Prevent using upload keybinds in rooms with no perms ## Refactoring diff --git a/src/qml/Base/HTile.qml b/src/qml/Base/HTile.qml index 99cbb8b8..3a619010 100644 --- a/src/qml/Base/HTile.qml +++ b/src/qml/Base/HTile.qml @@ -41,6 +41,7 @@ HButton { verticalAlignment: Qt.AlignVCenter Layout.fillWidth: true + Layout.fillHeight: true } HRowLayout { @@ -54,6 +55,7 @@ HButton { color: theme.colors.halfDimText visible: Layout.maximumWidth > 0 + Layout.fillHeight: true Layout.maximumWidth: text && tile.width >= 160 * theme.uiScale ? implicitWidth : 0 @@ -72,6 +74,7 @@ HButton { visible: Layout.maximumHeight > 0 Layout.maximumHeight: text ? implicitWidth : 0 Layout.fillWidth: true + Layout.fillHeight: true Behavior on Layout.maximumHeight { HNumberAnimation {} } } diff --git a/src/qml/Chat/Timeline/EventFile.qml b/src/qml/Chat/Timeline/EventFile.qml index 54c69c03..7ad0d39b 100644 --- a/src/qml/Chat/Timeline/EventFile.qml +++ b/src/qml/Chat/Timeline/EventFile.qml @@ -10,6 +10,7 @@ HTile { theme.chat.message.fileMinWidth), Math.min(eventContent.messageBodyWidth, implicitWidth), ) + height: Math.max(theme.chat.message.avatarSize, implicitHeight) title.text: loader.singleMediaInfo.media_title || qsTr("Untitled file") title.elide: Text.ElideMiddle