PrinterTypeLabel.qml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.7
  4. import QtQuick.Controls 2.1
  5. import UM 1.1 as UM
  6. // This component creates a label with the abbreviated name of a printer, with a rectangle surrounding the label.
  7. // It is created in a separated place in order to be reused whenever needed.
  8. Item
  9. {
  10. property alias text: printerTypeLabel.text
  11. width: UM.Theme.getSize("printer_type_label").width
  12. height: UM.Theme.getSize("printer_type_label").height
  13. Rectangle
  14. {
  15. anchors.fill: parent
  16. color: UM.Theme.getColor("printer_type_label_background")
  17. radius: UM.Theme.getSize("checkbox_radius").width
  18. }
  19. Label
  20. {
  21. id: printerTypeLabel
  22. text: "CFFFP" // As an abbreviated name of the Custom FFF Printer
  23. anchors.verticalCenter: parent.verticalCenter
  24. anchors.horizontalCenter: parent.horizontalCenter
  25. renderType: Text.NativeRendering
  26. font: UM.Theme.getFont("default")
  27. color: UM.Theme.getColor("text")
  28. }
  29. }