status-desktop/ui/shared/RoundedIcon.qml
emizzle ac7deb3af0 feat: Un/install free sticker packs in sticker market
Sticker pack details retreived from contract:
 - pack data decoded from contract response
 - data contains contentHash which, once decoded, contains an IPFS identifier
 - futher pack data in EDN format is downloaded from IPFS
 - the EDN info is decoded in to a StickerPack

List of available packs from contract are obtained separately from list of installed contracts (stored as a setting in Status-go).

Sticker market contains dynamic list of sticker packs. The sticker button shown for each pack has all states defined (in the design) for all UI states (ie bought, free, installed, pending, etc)

Add modal popup showing sticker pack details and list of stickers to be un/installed. Contains a "larger" version of the sticker pack button with many differnt UI states defined.

Uninstallation of a sticker pack removes those sticker pack's stickers from the recent sticker list and persists the list

Simplify the view model by including stickers, instead of setting an "activeStickerPackId" property. This allowed for display of sticker pack stickers to be displayed in the modal popup separately from the sticker packs shown in the market.
2020-07-15 15:53:48 -04:00

52 lines
1.2 KiB
QML

import QtQuick 2.13
import QtGraphicalEffects 1.0
import "../imports"
Rectangle {
id: root
property alias source: roundedIconImage.source
default property alias content: content.children
property alias icon: roundedIconImage
signal clicked
width: 36
height: 36
property alias iconWidth: roundedIconImage.width
property alias iconHeight: roundedIconImage.height
property alias rotation: roundedIconImage.rotation
color: Style.current.blue
radius: width / 2
SVGImage {
id: roundedIconImage
width: 12
height: 12
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit
source: "../img/new_chat.svg"
}
Item {
id: content
anchors.left: roundedIconImage.right
anchors.leftMargin: 6 + (root.width - roundedIconImage.width)
}
MouseArea {
id: mouseArea
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
cursorShape: Qt.PointingHandCursor
onClicked: {
root.clicked()
}
}
}
/*##^##
Designer {
D{i:0;formeditorZoom:1.75}
}
##^##*/