2020-07-15 21:04:14 +00:00
|
|
|
import QtQuick 2.3
|
2021-10-14 10:55:29 +00:00
|
|
|
import "../../shared/panels" as Shared
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-07-15 21:04:14 +00:00
|
|
|
|
2020-09-30 17:49:14 +00:00
|
|
|
Loader {
|
|
|
|
property color color
|
2020-12-07 23:38:53 +00:00
|
|
|
property int contentType: -1
|
2021-04-23 15:49:05 +00:00
|
|
|
property string stickerData: sticker
|
|
|
|
property int imageHeight: 140
|
|
|
|
property int imageWidth: 140
|
2021-08-30 12:42:11 +00:00
|
|
|
signal loaded()
|
2020-09-30 17:49:14 +00:00
|
|
|
|
|
|
|
id: root
|
|
|
|
active: contentType === Constants.stickerType
|
|
|
|
|
|
|
|
sourceComponent: Component {
|
|
|
|
Shared.ImageLoader {
|
|
|
|
color: root.color
|
2021-08-30 12:42:11 +00:00
|
|
|
onLoaded: root.loaded()
|
2020-10-20 14:15:04 +00:00
|
|
|
|
2021-04-23 15:49:05 +00:00
|
|
|
width: imageWidth
|
|
|
|
height: this.visible ? imageHeight : 0
|
|
|
|
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + stickerData) : ""
|
2020-09-30 17:49:14 +00:00
|
|
|
}
|
|
|
|
}
|
2020-07-15 21:04:14 +00:00
|
|
|
}
|