status-desktop/ui/imports/shared/status/StatusStickerPackIconWithIn...

53 lines
1.0 KiB
QML
Raw Normal View History

import QtQuick 2.15
import QtQuick.Controls 2.15
import StatusQ.Core.Theme 0.1
import utils 1.0
import shared.panels 1.0
Item {
id: root
property bool selected: false
property bool useIconInsteadOfImage: false
property url source: Theme.svg("history")
signal clicked
implicitHeight: 24
implicitWidth: 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: Theme.palette.darkGrey
source: root.source
onClicked: {
root.clicked()
}
}
Rectangle {
visible: root.selected
width: parent.width
height: 2
radius: 1
color: Theme.palette.primaryColor1
y: root.y + root.height + 6
}
}