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.
This commit is contained in:
Noelia 2022-12-21 14:59:43 +01:00 committed by Noelia
parent 73b2fb2271
commit 265b0b5a8f
2 changed files with 15 additions and 3 deletions

View File

@ -100,6 +100,13 @@ Rectangle {
an image or an icon. an image or an icon.
*/ */
property bool useIcons: false property bool useIcons: false
property StatusAssetSettings asset: StatusAssetSettings {
height: 20
width: 20
bgColor: "transparent"
isImage: !root.useIcons
}
property int tagLeftPadding: 6
/*! /*!
\qmlsignal StatusItemSelector::itemClicked \qmlsignal StatusItemSelector::itemClicked
This signal is emitted when the item is clicked. This signal is emitted when the item is clicked.
@ -184,9 +191,11 @@ Rectangle {
StatusListItemTag { StatusListItemTag {
title: model.text title: model.text
asset.name: model.imageSource asset.name: model.imageSource
asset.isImage: !root.useIcons asset.isImage: root.asset.isImage
asset.bgColor: "transparent" asset.bgColor: root.asset.bgColor
color: Theme.palette.primaryColor3 asset.height: root.asset.height
asset.width: root.asset.width
leftPadding: root.tagLeftPadding
closeButtonVisible: false closeButtonVisible: false
titleText.color: Theme.palette.primaryColor1 titleText.color: Theme.palette.primaryColor1
titleText.font.pixelSize: 15 titleText.font.pixelSize: 15

View File

@ -187,6 +187,9 @@ StatusScrollView {
icon: Style.svg("contact_verified") icon: Style.svg("contact_verified")
title: qsTr("Who holds") title: qsTr("Who holds")
defaultItemText: qsTr("Example: 10 SNT") defaultItemText: qsTr("Example: 10 SNT")
tagLeftPadding: 2
asset.height: 28
asset.width: asset.height
property int editedIndex property int editedIndex
itemsModel: SortFilterProxyModel { itemsModel: SortFilterProxyModel {