From f47ddbc955a4542aa2fd93126f69997a693f5b77 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com> Date: Thu, 26 Aug 2021 15:04:47 +0300 Subject: [PATCH] fix(@desktop/chatMembersList) Increased minimum width in chat members list *Also removed redundant Rectangles Depends on: https://github.com/status-im/StatusQ/pull/348 Closes #3284 --- .../AppLayouts/Chat/ChatColumn/UserList.qml | 7 +--- .../CommunityComponents/CommunityUserList.qml | 33 +++++++++---------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml b/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml index c5d29bbb3e..34965a8087 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml @@ -25,18 +25,13 @@ Item { reactionModel: EmojiReactions { } } - Rectangle { - anchors.fill: parent - color: Style.current.secondaryMenuBackground - } - StyledText { id: titleText anchors.top: parent.top anchors.topMargin: Style.current.padding anchors.left: parent.left anchors.leftMargin: Style.current.padding - opacity: (root.width > 50) ? 1.0 : 0.0 + opacity: (root.width > 58) ? 1.0 : 0.0 visible: (opacity > 0.1) font.pixelSize: Style.current.primaryTextFontSize //% "Members" diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityUserList.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityUserList.qml index 762eab501b..adb48d2676 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityUserList.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityUserList.qml @@ -19,12 +19,6 @@ Item { anchors.fill: parent property var userList property var currentTime - - Rectangle { - anchors.fill: parent - color: Style.current.secondaryMenuBackground - } - property QtObject community: chatsModel.communities.activeCommunity StyledText { @@ -33,7 +27,7 @@ Item { anchors.topMargin: Style.current.padding anchors.left: parent.left anchors.leftMargin: Style.current.padding - opacity: (root.width > 50) ? 1.0 : 0.0 + opacity: (root.width > 58) ? 1.0 : 0.0 visible: (opacity > 0.1) font.pixelSize: Style.current.primaryTextFontSize font.bold: true @@ -50,23 +44,26 @@ Item { topMargin: Style.current.padding left: parent.left right: parent.right - rightMargin: Style.current.padding + rightMargin: Style.current.halfPadding bottom: parent.bottom bottomMargin: Style.current.bigPadding } boundsBehavior: Flickable.StopAtBounds model: userListDelegate section.property: "online" - section.delegate: Item { - width: parent.width - height: 24 - - StyledText { - anchors.fill: parent - anchors.leftMargin: Style.current.padding - font.pixelSize: Style.current.additionalTextSize - color: Style.current.darkGrey - text: section === 'true' ? qsTr("Online") : qsTr("Offline") + section.delegate: (root.width > 58) ? sectionDelegateComponent : null + Component { + id: sectionDelegateComponent + Item { + width: parent.width + height: 24 + StyledText { + anchors.fill: parent + anchors.leftMargin: Style.current.padding + font.pixelSize: Style.current.additionalTextSize + color: Style.current.darkGrey + text: section === 'true' ? qsTr("Online") : qsTr("Offline") + } } } }