This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Michael Zanetti 6566896d79 some cleanups
2019-03-10 14:09:33 +01:00

34 lines
792 B
QML

import QtQuick 2.9
Item {
id: root
implicitHeight: app.iconSize * .8
implicitWidth: height
// TODO: Convert to enum once we have Qt 5.10
// on, off, green, orange, red
property string state: "off"
Rectangle {
height: Math.min(parent.height, parent.height)
width: height
radius: width / 2
color: {
switch (root.state) {
case "on":
return app.accentColor
case "green":
return "#73c0b3";
case "off":
return "lightgray";
case "orange":
return "#fedf6f";
case "red":
return "#dd7777"
}
}
border.width: 1
border.color: app.foregroundColor
}
}