status-desktop/ui/shared/status/StatusSticker.qml
Alexandra Betouni 4ee21ada05 feat(desktop) Added image function in Style
Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
2021-09-28 15:28:00 -04:00

28 lines
645 B
QML

import QtQuick 2.3
import "../../shared" as Shared
import utils 1.0
Loader {
property color color
property int contentType: -1
property string stickerData: sticker
property int imageHeight: 140
property int imageWidth: 140
signal loaded()
id: root
active: contentType === Constants.stickerType
sourceComponent: Component {
Shared.ImageLoader {
color: root.color
onLoaded: root.loaded()
width: imageWidth
height: this.visible ? imageHeight : 0
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + stickerData) : ""
}
}
}