ImageTile.qml 896 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Controls 2.3
  5. import UM 1.3 as UM
  6. //
  7. // This component places a text on top of an image.
  8. //
  9. Column
  10. {
  11. leftPadding: UM.Theme.getSize("default_margin").width
  12. rightPadding: UM.Theme.getSize("default_margin").width
  13. spacing: UM.Theme.getSize("default_margin").height
  14. property alias text: label.text
  15. property alias imageSource: image.source
  16. Label
  17. {
  18. id: label
  19. width: image.width
  20. anchors.horizontalCenter: image.horizontalCenter
  21. horizontalAlignment: Text.AlignHCenter
  22. text: ""
  23. wrapMode: Text.WordWrap
  24. font: UM.Theme.getFont("default")
  25. color: UM.Theme.getColor("text")
  26. renderType: Text.NativeRendering
  27. }
  28. Image
  29. {
  30. id: image
  31. source: ""
  32. }
  33. }