status-desktop/ui/imports/shared/status/StatusStickerPackIconWithIndicator.qml
Alexandra Betouni 426c116bac refactor(desktop) Made shared a QML module
Use it as import shared 1.0, import shared.controls 1.0
etc instead of import "../../../shared"

Closes #3934
2021-10-27 18:05:45 -04:00

50 lines
1.0 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import utils 1.0
import shared 1.0
import shared.panels 1.0
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
}
}