status-desktop/ui/shared/status/core/StatusIcon.qml

32 lines
604 B
QML
Raw Normal View History

import QtQuick 2.13
import QtGraphicalEffects 1.13
Image {
property string icon: ""
property color color
id: root
width: 24
height: 24
sourceSize.width: width
sourceSize.height: height
fillMode: Image.PreserveAspectFit
onIconChanged: {
if (icon !== "") {
source = "../assets/img/icons/" + icon + ".svg";
}
}
ColorOverlay {
visible: root.color !== undefined
anchors.fill: root
source: root
color: root.color
antialiasing: true
smooth: true
rotation: root.rotation
}
}