diff --git a/ui/imports/shared/controls/ContactsListAndSearch.qml b/ui/imports/shared/controls/ContactsListAndSearch.qml index 5c12a68371..cbf30b69ee 100644 --- a/ui/imports/shared/controls/ContactsListAndSearch.qml +++ b/ui/imports/shared/controls/ContactsListAndSearch.qml @@ -15,7 +15,8 @@ import "." Item { id: root - height: childrenRect.height + 24 + height: (chatKey.height + message.height + existingContacts.height + + searchResults.height + noContactsRect.height + 24) property var rootStore property var contactsStore @@ -67,6 +68,7 @@ Item { //% "Enter ENS username or chat key" placeholderText: qsTrId("enter-contact-code") visible: showSearch + height: visible ? implicitHeight : 0 Keys.onReleased: { successMessage = ""; searchResults.pubKey = ""; @@ -165,6 +167,7 @@ Item { id: message text: root.validationError || successMessage visible: root.validationError !== "" || successMessage !== "" + height: visible ? contentHeight : 0 font.pixelSize: 13 color: !!root.validationError ? Style.current.danger : Style.current.success anchors.top: chatKey.bottom @@ -177,7 +180,6 @@ Item { contactsStore: root.contactsStore community: root.community - visible: showContactList hideCommunityMembers: root.hideCommunityMembers anchors.topMargin: this.height > 0 ? Style.current.halfPadding : 0 @@ -235,10 +237,7 @@ Item { NoFriendsRectangle { id: noContactsRect visible: showContactList - anchors.top: chatKey.bottom - anchors.topMargin: Style.current.xlPadding * 3 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + anchors.centerIn: parent rootStore: root.rootStore } } diff --git a/ui/imports/shared/views/ExistingContacts.qml b/ui/imports/shared/views/ExistingContacts.qml index 6094eace21..31cabd7f2d 100644 --- a/ui/imports/shared/views/ExistingContacts.qml +++ b/ui/imports/shared/views/ExistingContacts.qml @@ -12,6 +12,7 @@ Item { id: root anchors.left: parent.left anchors.right: parent.right + height: visible ? Math.min(contactListView.contentHeight, (expanded ? 320 : 192)) : 0 property var contactsStore property var community @@ -28,7 +29,6 @@ Item { return parts.some(p => p.startsWith(filter)) } - height: Math.min(contactListView.contentHeight, (expanded ? 320 : 192)) ScrollView { anchors.fill: parent diff --git a/ui/imports/shared/views/NoFriendsRectangle.qml b/ui/imports/shared/views/NoFriendsRectangle.qml index f457ca1cd4..a88a82ad41 100644 --- a/ui/imports/shared/views/NoFriendsRectangle.qml +++ b/ui/imports/shared/views/NoFriendsRectangle.qml @@ -11,13 +11,13 @@ import "../popups" Item { id: noContactsRect width: 260 + height: visible ? 120 : 0 //% "You don’t have any contacts yet. Invite your friends to start chatting." property string text: qsTrId("you-don-t-have-any-contacts-yet--invite-your-friends-to-start-chatting-") property alias textColor: noContacts.color property var rootStore - StatusBaseText { id: noContacts text: noContactsRect.text diff --git a/ui/imports/shared/views/SearchResults.qml b/ui/imports/shared/views/SearchResults.qml index c51f187581..a340a3f9da 100644 --- a/ui/imports/shared/views/SearchResults.qml +++ b/ui/imports/shared/views/SearchResults.qml @@ -16,8 +16,8 @@ import StatusQ.Components 0.1 Item { id: root - height: 64 width: parent.width + height: hasExistingContacts ? 64 : 0 property bool hasExistingContacts: false property bool showProfileNotFoundMessage: false