From 2e05a9784e36c4e0bc2baa54e0ede7489895e318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Tue, 25 Oct 2022 11:06:18 +0200 Subject: [PATCH] fix(InviteFriendsToCommunityPopup): invite candidates list made scrollable Additionally, bottom padding is fixed to avoid cutting-off the list too early. Closes: #7603 --- ...ommunityProfilePopupInviteMessagePanel.qml | 1 - .../InviteFriendsToCommunityPopup.qml | 34 +++++++++++++------ ui/imports/shared/views/PickedContacts.qml | 5 ++- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupInviteMessagePanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupInviteMessagePanel.qml index 5472431b30..f5b60076bf 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupInviteMessagePanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupInviteMessagePanel.qml @@ -58,7 +58,6 @@ ColumnLayout { PickedContacts { id: existingContacts - enabled: false contactsStore: root.contactsStore pubKeys: root.pubKeys Layout.fillWidth: true diff --git a/ui/app/AppLayouts/Chat/popups/community/InviteFriendsToCommunityPopup.qml b/ui/app/AppLayouts/Chat/popups/community/InviteFriendsToCommunityPopup.qml index fbd1bdaeac..953e601206 100644 --- a/ui/app/AppLayouts/Chat/popups/community/InviteFriendsToCommunityPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/InviteFriendsToCommunityPopup.qml @@ -52,6 +52,8 @@ StatusStackModal { stackTitle: qsTr("Invite Contacts to %1").arg(community.name) width: 640 implicitHeight: 700 + + padding: 0 leftPadding: 0 rightPadding: 0 @@ -82,18 +84,28 @@ StatusStackModal { } stackItems: [ - CommunityProfilePopupInviteFriendsPanel { - width: parent.width - rootStore: root.rootStore - contactsStore: root.contactsStore - community: root.community - onPubKeysChanged: root.pubKeys = pubKeys + Item { + CommunityProfilePopupInviteFriendsPanel { + anchors.fill: parent + anchors.topMargin: 16 + anchors.bottomMargin: 16 + + rootStore: root.rootStore + contactsStore: root.contactsStore + community: root.community + onPubKeysChanged: root.pubKeys = pubKeys + } }, - CommunityProfilePopupInviteMessagePanel { - width: parent.width - contactsStore: root.contactsStore - pubKeys: root.pubKeys - onInviteMessageChanged: root.inviteMessage = inviteMessage + + Item { + CommunityProfilePopupInviteMessagePanel { + anchors.fill: parent + anchors.topMargin: 16 + + contactsStore: root.contactsStore + pubKeys: root.pubKeys + onInviteMessageChanged: root.inviteMessage = inviteMessage + } } ] } diff --git a/ui/imports/shared/views/PickedContacts.qml b/ui/imports/shared/views/PickedContacts.qml index 2c86181b40..4932ecf8d1 100644 --- a/ui/imports/shared/views/PickedContacts.qml +++ b/ui/imports/shared/views/PickedContacts.qml @@ -30,9 +30,6 @@ Item { return parts.some(p => p.startsWith(filter)) } - implicitWidth: contactGridView.implicitWidth + contactGridView.margins - implicitHeight: visible ? contactGridView.contentHeight : 0 - StatusGridView { id: contactGridView anchors.fill: parent @@ -65,6 +62,8 @@ Item { statusListItemIcon.badge.border.color: Theme.palette.baseColor4 statusListItemIcon.badge.implicitHeight: 14 // 10 px + 2 px * 2 borders statusListItemIcon.badge.implicitWidth: 14 // 10 px + 2 px * 2 borders + + sensor.enabled: false } } }