From 265b0b5a8f39b3df94193c0dbf1f887e7ff2839f Mon Sep 17 00:00:00 2001 From: Noelia Date: Wed, 21 Dec 2022 14:59:43 +0100 Subject: [PATCH] fix(CommunityPermissions/NewPermissionsView): Holdings tags icon size/position didn't fit the design - Updated `StatusItemSelector` API to allow other asset sizes and leftPadding. - Applied different asset size in holdings tags in `NewPermissionView` to fit the design. --- .../src/StatusQ/Components/StatusItemSelector.qml | 15 ++++++++++++--- .../communities/CommunityNewPermissionView.qml | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusItemSelector.qml b/ui/StatusQ/src/StatusQ/Components/StatusItemSelector.qml index 252f197ca9..5f8815a04f 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusItemSelector.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusItemSelector.qml @@ -100,6 +100,13 @@ Rectangle { an image or an icon. */ property bool useIcons: false + property StatusAssetSettings asset: StatusAssetSettings { + height: 20 + width: 20 + bgColor: "transparent" + isImage: !root.useIcons + } + property int tagLeftPadding: 6 /*! \qmlsignal StatusItemSelector::itemClicked This signal is emitted when the item is clicked. @@ -184,9 +191,11 @@ Rectangle { StatusListItemTag { title: model.text asset.name: model.imageSource - asset.isImage: !root.useIcons - asset.bgColor: "transparent" - color: Theme.palette.primaryColor3 + asset.isImage: root.asset.isImage + asset.bgColor: root.asset.bgColor + asset.height: root.asset.height + asset.width: root.asset.width + leftPadding: root.tagLeftPadding closeButtonVisible: false titleText.color: Theme.palette.primaryColor1 titleText.font.pixelSize: 15 diff --git a/ui/app/AppLayouts/Chat/views/communities/CommunityNewPermissionView.qml b/ui/app/AppLayouts/Chat/views/communities/CommunityNewPermissionView.qml index 233f2edb50..8611d490a1 100644 --- a/ui/app/AppLayouts/Chat/views/communities/CommunityNewPermissionView.qml +++ b/ui/app/AppLayouts/Chat/views/communities/CommunityNewPermissionView.qml @@ -187,6 +187,9 @@ StatusScrollView { icon: Style.svg("contact_verified") title: qsTr("Who holds") defaultItemText: qsTr("Example: 10 SNT") + tagLeftPadding: 2 + asset.height: 28 + asset.width: asset.height property int editedIndex itemsModel: SortFilterProxyModel {