2023-02-15 11:12:12 +00:00
|
|
|
import QtQuick 2.14
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2023-02-15 11:12:12 +00:00
|
|
|
import shared.panels 1.0
|
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-10-01 15:58:36 +00:00
|
|
|
property string stickerData: ""
|
2021-04-23 15:49:05 +00:00
|
|
|
property int imageHeight: 140
|
|
|
|
property int imageWidth: 140
|
2023-02-15 11:12:12 +00:00
|
|
|
|
|
|
|
signal stickerLoaded()
|
2020-09-30 17:49:14 +00:00
|
|
|
|
|
|
|
id: root
|
2021-12-09 12:53:40 +00:00
|
|
|
active: contentType === Constants.messageContentType.stickerType
|
2020-09-30 17:49:14 +00:00
|
|
|
|
|
|
|
sourceComponent: Component {
|
2021-10-27 21:27:49 +00:00
|
|
|
ImageLoader {
|
2020-09-30 17:49:14 +00:00
|
|
|
color: root.color
|
2023-02-15 11:12:12 +00:00
|
|
|
onLoaded: root.stickerLoaded()
|
2020-10-20 14:15:04 +00:00
|
|
|
|
2021-04-23 15:49:05 +00:00
|
|
|
width: imageWidth
|
|
|
|
height: this.visible ? imageHeight : 0
|
2022-02-14 23:27:23 +00:00
|
|
|
source: this.visible ? stickerData : ""
|
2020-09-30 17:49:14 +00:00
|
|
|
}
|
|
|
|
}
|
2020-07-15 21:04:14 +00:00
|
|
|
}
|