status-desktop/ui/shared/status/StatusStickerPackIconWithIndicator.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

49 lines
1.0 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import utils 1.0
import "../../shared"
Item {
id: root
property bool selected: false
property bool useIconInsteadOfImage: false
property url source: Style.svg("history_icon")
signal clicked
height: 24
width: 24
RoundedImage {
visible: !useIconInsteadOfImage
id: iconImage
width: parent.width
height: parent.height
source: root.source
onClicked: {
root.clicked()
}
}
RoundedIcon {
id: iconIcon
visible: useIconInsteadOfImage
width: parent.width
height: parent.height
iconWidth: 6
color: Style.current.darkGrey
source: root.source
onClicked: {
root.clicked()
}
}
Rectangle {
id: packIndicator
visible: root.selected
border.color: Style.current.blue
border.width: 1
height: 2
width: 16
x: 4
y: root.y + root.height + 6
}
}