2020-06-24 13:23:49 +10:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtGraphicalEffects 1.0
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-14 13:58:04 +02:00
|
|
|
import "./"
|
2020-06-24 13:23:49 +10:00
|
|
|
|
|
|
|
Rectangle {
|
2020-09-23 18:18:23 +10:00
|
|
|
id: root
|
2020-06-24 13:23:49 +10:00
|
|
|
signal clicked
|
2021-02-17 11:31:59 -05:00
|
|
|
property bool noMouseArea: false
|
2020-11-30 12:03:52 -05:00
|
|
|
property bool noHover: false
|
2021-01-28 16:13:20 -04:00
|
|
|
property alias showLoadingIndicator: imgStickerPackThumb.showLoadingIndicator
|
2020-06-24 13:23:49 +10:00
|
|
|
property alias source: imgStickerPackThumb.source
|
2020-10-06 15:16:36 +11:00
|
|
|
property alias fillMode: imgStickerPackThumb.fillMode
|
2020-06-24 13:23:49 +10:00
|
|
|
|
|
|
|
radius: width / 2
|
|
|
|
|
|
|
|
width: 24
|
|
|
|
height: 24
|
2021-04-06 11:38:49 -04:00
|
|
|
color: Style.current.background
|
2020-06-24 13:23:49 +10:00
|
|
|
|
|
|
|
// 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 18:18:23 +10:00
|
|
|
ImageLoader {
|
2020-06-24 13:23:49 +10:00
|
|
|
id: imgStickerPackThumb
|
2021-02-17 11:31:59 -05:00
|
|
|
noMouseArea: root.noMouseArea
|
2020-11-30 12:03:52 -05:00
|
|
|
noHover: root.noHover
|
2020-06-24 13:23:49 +10:00
|
|
|
opacity: 1
|
|
|
|
smooth: false
|
2020-09-23 18:18:23 +10:00
|
|
|
radius: root.radius
|
2020-06-24 13:23:49 +10:00
|
|
|
anchors.fill: parent
|
2022-02-14 19:27:23 -04:00
|
|
|
source: thumbnail
|
2020-09-23 18:18:23 +10:00
|
|
|
onClicked: root.clicked()
|
2020-06-24 13:23:49 +10:00
|
|
|
}
|
2020-11-30 12:03:52 -05:00
|
|
|
}
|