PrinterStatusIcon.qml 633 B

12345678910111213141516171819202122232425
  1. // Copyright (c) 2017 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import UM 1.2 as UM
  5. import Cura 1.0 as Cura
  6. Item {
  7. property var status: "disconnected"
  8. width: childrenRect.width
  9. height: childrenRect.height
  10. UM.RecolorImage {
  11. id: statusIcon
  12. width: UM.Theme.getSize("printer_status_icon").width
  13. height: UM.Theme.getSize("printer_status_icon").height
  14. sourceSize.width: width
  15. sourceSize.height: width
  16. color: UM.Theme.getColor("tab_status_" + parent.status )
  17. source: UM.Theme.getIcon( parent.status )
  18. }
  19. }