fix(@desktop/wallet): ensure NFT background colors are rendered correctly

Also adjust margins of collectible items to adhere to designs.

Fixes: #3981
This commit is contained in:
Pascal Precht 2021-11-02 13:57:52 +01:00 committed by Iuri Matias
parent fdc8fea88e
commit 7fcd280fe0
3 changed files with 4 additions and 6 deletions

View File

@ -48,7 +48,7 @@ proc initItem*(
result.id = id
result.name = name
result.imageUrl = imageUrl
result.backgroundColor = backgroundColor
result.backgroundColor = if (backgroundColor == ""): "transparent" else: ("#" & backgroundColor)
result.permalink = permalink
result.properties = properties
result.rankings = rankings

View File

@ -58,18 +58,15 @@ Item {
id: collectionsRepeater
model: RootStore.collectionList
delegate: StatusExpandableItem {
width: parent.width - 156
anchors.horizontalCenter: parent.horizontalCenter
anchors.left: parent.left
anchors.right: parent.right
primaryText: model.name
image.source: model.imageUrl
type: StatusExpandableItem.Type.Secondary
expandableComponent: CollectibleCollectionView {
slug: model.slug
anchors.left: parent.left
anchors.leftMargin: Style.current.bigPadding
anchors.right: parent.right
anchors.rightMargin: Style.current.bigPadding
onCollectibleClicked: {
root.collectibleClicked();
}

View File

@ -29,6 +29,7 @@ Item {
id: contentLoader
width: parent.width
anchors.top: parent.top
anchors.topMargin: 16
anchors.horizontalCenter: parent.horizontalCenter
sourceComponent: root.collectiblesLoaded ? loaded : loading
}