diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-22 17:08:32 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-23 20:07:15 +0100 |
commit | 9fd279c020bba2f433a0f9862277bc59fd621130 (patch) | |
tree | 69f901b0b4f51eee918d4d7d1822325090cd9485 /resources | |
parent | Wrap text in pre tags (diff) | |
download | nheko-9fd279c020bba2f433a0f9862277bc59fd621130.tar.xz |
Show encryption enabled and use a non zero size for zero size vide
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/TimelineView.qml | 2 | ||||
-rw-r--r-- | resources/qml/delegates/MessageDelegate.qml | 10 | ||||
-rw-r--r-- | resources/qml/delegates/Pill.qml (renamed from resources/qml/delegates/Redacted.qml) | 1 | ||||
-rw-r--r-- | resources/qml/delegates/PlayableMediaMessage.qml | 2 | ||||
-rw-r--r-- | resources/res.qrc | 2 |
5 files changed, 12 insertions, 5 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 3bbaa020..a5520031 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -79,7 +79,7 @@ Item { } } - onAtYBeginningChanged: if (atYBeginning) model.fetchHistory() + onAtYBeginningChanged: if (atYBeginning) { chat.model.currentIndex = 0; chat.currentIndex = 0; model.fetchHistory(); } function updatePosition() { for (var y = chat.contentY + chat.height; y > chat.height; y -= 9) { diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml index 49209f68..e31321f9 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml @@ -39,7 +39,15 @@ DelegateChooser { } DelegateChoice { roleValue: MtxEvent.Redacted - Redacted {} + Pill { + text: qsTr("redacted") + } + } + DelegateChoice { + roleValue: MtxEvent.Encryption + Pill { + text: qsTr("Encryption enabled") + } } DelegateChoice { Placeholder {} diff --git a/resources/qml/delegates/Redacted.qml b/resources/qml/delegates/Pill.qml index 42fb4835..53a9684e 100644 --- a/resources/qml/delegates/Redacted.qml +++ b/resources/qml/delegates/Pill.qml @@ -2,7 +2,6 @@ import QtQuick 2.5 import QtQuick.Controls 2.1 Label { - text: qsTr("redacted") color: inactiveColors.text horizontalAlignment: Text.AlignHCenter diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml index 68b09f7b..1207ac77 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml @@ -20,7 +20,7 @@ Rectangle { Rectangle { id: videoContainer visible: model.type == MtxEvent.VideoMessage - width: Math.min(parent.width, model.width) + width: Math.min(parent.width, model.width ? model.width : 400) // some media has 0 as size... height: width*model.proportionalHeight Image { anchors.fill: parent diff --git a/resources/res.qrc b/resources/res.qrc index c9938d57..53406c48 100644 --- a/resources/res.qrc +++ b/resources/res.qrc @@ -128,7 +128,7 @@ <file>qml/delegates/ImageMessage.qml</file> <file>qml/delegates/PlayableMediaMessage.qml</file> <file>qml/delegates/FileMessage.qml</file> - <file>qml/delegates/Redacted.qml</file> + <file>qml/delegates/Pill.qml</file> <file>qml/delegates/Placeholder.qml</file> </qresource> </RCC> |