From 73b2fb2271485d1de033da5efcbc01472ad43da7 Mon Sep 17 00:00:00 2001 From: Noelia Date: Wed, 21 Dec 2022 14:59:27 +0100 Subject: [PATCH] fix(CommunityPermissions/PermissionItem): The component allowed adding labels with long texts that exceed the content itself - Updated `PermissionItem` to avoid the `StatusListItemTag` exceeding the content itself. Fixes #8580 --- ui/app/AppLayouts/Chat/controls/community/PermissionItem.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/app/AppLayouts/Chat/controls/community/PermissionItem.qml b/ui/app/AppLayouts/Chat/controls/community/PermissionItem.qml index ed7569d9b6..5223628407 100644 --- a/ui/app/AppLayouts/Chat/controls/community/PermissionItem.qml +++ b/ui/app/AppLayouts/Chat/controls/community/PermissionItem.qml @@ -100,6 +100,7 @@ Control{ spacing: content.spacing StatusBaseText { + id: operatorText Layout.preferredHeight: d.flowRowHeight visible: model.operator !== OperatorsUtils.Operators.None Layout.alignment: Qt.AlignVCenter @@ -110,6 +111,7 @@ Control{ } StatusListItemTag { Layout.preferredHeight: d.flowRowHeight + Layout.maximumWidth: content.width - operatorText.width - spacing leftPadding: 2 title: model.text asset.name: model.imageSource @@ -156,6 +158,7 @@ Control{ spacing: content.spacing StatusBaseText { + id: operatorInText Layout.preferredHeight: d.flowRowHeight visible: model.index !== 0 Layout.alignment: Qt.AlignVCenter @@ -166,6 +169,7 @@ Control{ } StatusListItemTag { Layout.preferredHeight: d.flowRowHeight + Layout.maximumWidth: (model.index !== 0) ? (content.width - operatorInText.width - spacing) : content.width title: model.text asset.name: model.imageSource asset.isImage: true