2020-06-24 03:23:49 +00:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
|
|
|
|
Rectangle {
|
2020-09-23 08:18:23 +00:00
|
|
|
id: root
|
2020-06-24 03:23:49 +00:00
|
|
|
signal clicked
|
2021-02-17 16:31:59 +00:00
|
|
|
property bool noMouseArea: false
|
2020-11-30 17:03:52 +00:00
|
|
|
property bool noHover: false
|
2021-01-28 20:13:20 +00:00
|
|
|
property alias showLoadingIndicator: imgStickerPackThumb.showLoadingIndicator
|
2020-06-24 03:23:49 +00:00
|
|
|
property alias source: imgStickerPackThumb.source
|
2020-10-06 04:16:36 +00:00
|
|
|
property alias fillMode: imgStickerPackThumb.fillMode
|
2020-06-24 03:23:49 +00:00
|
|
|
|
|
|
|
radius: width / 2
|
|
|
|
|
|
|
|
width: 24
|
|
|
|
height: 24
|
|
|
|
|
|
|
|
// apply rounded corners mask
|
|
|
|
layer.enabled: true
|
|
|
|
layer.effect: OpacityMask {
|
|
|
|
maskSource: Rectangle {
|
|
|
|
x: root.x; y: root.y
|
|
|
|
width: root.width
|
|
|
|
height: root.height
|
|
|
|
radius: root.radius
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-23 08:18:23 +00:00
|
|
|
ImageLoader {
|
2020-06-24 03:23:49 +00:00
|
|
|
id: imgStickerPackThumb
|
2021-02-17 16:31:59 +00:00
|
|
|
noMouseArea: root.noMouseArea
|
2020-11-30 17:03:52 +00:00
|
|
|
noHover: root.noHover
|
2020-06-24 03:23:49 +00:00
|
|
|
opacity: 1
|
|
|
|
smooth: false
|
2020-09-23 08:18:23 +00:00
|
|
|
radius: root.radius
|
2020-06-24 03:23:49 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
source: "https://ipfs.infura.io/ipfs/" + thumbnail
|
2020-09-23 08:18:23 +00:00
|
|
|
onClicked: root.clicked()
|
2020-06-24 03:23:49 +00:00
|
|
|
}
|
2020-11-30 17:03:52 +00:00
|
|
|
}
|