ImageTile.qml 775 B

123456789101112131415161718192021222324252627282930313233343536
  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.5 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. UM.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. }
  25. Image
  26. {
  27. id: image
  28. source: ""
  29. }
  30. }