diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-11 14:51:29 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-11 14:51:29 +0200 |
commit | 8d2d8dc26727a5b46613d83522490f568aef7cad (patch) | |
tree | 1007bc7030db1bd8de8bca4438118ba622d72364 /resources | |
parent | Render community items (diff) | |
download | nheko-8d2d8dc26727a5b46613d83522490f568aef7cad.tar.xz |
Enable toggling tags
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/Avatar.qml | 1 | ||||
-rw-r--r-- | resources/qml/ChatPage.qml | 5 | ||||
-rw-r--r-- | resources/qml/CommunitiesList.qml | 25 |
3 files changed, 21 insertions, 10 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index 9eb3380e..6c12952a 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -28,6 +28,7 @@ Rectangle { Label { id: label + anchors.fill: parent text: TimelineManager.escapeEmoji(displayName ? String.fromCodePoint(displayName.codePointAt(0)) : "") textFormat: Text.RichText diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml index 5ccdd9f1..6cd48788 100644 --- a/resources/qml/ChatPage.qml +++ b/resources/qml/ChatPage.qml @@ -24,12 +24,13 @@ Rectangle { id: communityListC minimumWidth: communitiesList.avatarSize * 4 + Nheko.paddingMedium * 2 - collapsedWidth: communitiesList.avatarSize + 2* Nheko.paddingMedium + collapsedWidth: communitiesList.avatarSize + 2 * Nheko.paddingMedium preferredWidth: collapsedWidth - maximumWidth: communitiesList.avatarSize * 10 + 2* Nheko.paddingMedium + maximumWidth: communitiesList.avatarSize * 10 + 2 * Nheko.paddingMedium CommunitiesList { id: communitiesList + collapsed: parent.collapsed } diff --git a/resources/qml/CommunitiesList.qml b/resources/qml/CommunitiesList.qml index 6ca619c4..0ccd7e82 100644 --- a/resources/qml/CommunitiesList.qml +++ b/resources/qml/CommunitiesList.qml @@ -10,7 +10,6 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.3 import im.nheko 1.0 - Page { //leftPadding: Nheko.paddingSmall //rightPadding: Nheko.paddingSmall @@ -97,8 +96,7 @@ Page { TapHandler { margin: -Nheko.paddingSmall acceptedButtons: Qt.RightButton - onSingleTapped: communityContextMenu.show(model.id); - + onSingleTapped: communityContextMenu.show(model.id) gesturePolicy: TapHandler.ReleaseWithinBounds } @@ -127,15 +125,26 @@ Page { height: avatarSize width: avatarSize url: { - if (model.avatarUrl.startsWith("mxc://")) { - return model.avatarUrl.replace("mxc://", "image://MxcImage/") - } else { - return "image://colorimage/"+model.avatarUrl+"?" + communityItem.unimportantText - } + if (model.avatarUrl.startsWith("mxc://")) + return model.avatarUrl.replace("mxc://", "image://MxcImage/"); + else + return "image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText; } displayName: model.displayName color: communityItem.background + } + + ElidedLabel { + visible: !collapsed + Layout.alignment: Qt.AlignVCenter + color: communityItem.importantText + elideWidth: parent.width - avatar.width - Nheko.paddingMedium + fullText: model.displayName + textFormat: Text.PlainText + } + Item { + Layout.fillWidth: true } } |