ToolboxDownloadsShowcase.qml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Toolbox is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Controls 1.4
  5. import QtQuick.Controls.Styles 1.4
  6. import UM 1.1 as UM
  7. Column
  8. {
  9. height: childrenRect.height
  10. spacing: UM.Theme.getSize("toolbox_showcase_spacing").width
  11. width: parent.width
  12. Label
  13. {
  14. id: heading
  15. text: catalog.i18nc("@label", "Featured")
  16. width: parent.width
  17. color: UM.Theme.getColor("text_medium")
  18. font: UM.Theme.getFont("medium")
  19. }
  20. Row
  21. {
  22. height: childrenRect.height
  23. spacing: UM.Theme.getSize("wide_margin").width
  24. anchors
  25. {
  26. horizontalCenter: parent.horizontalCenter
  27. }
  28. Repeater
  29. {
  30. model: {
  31. if ( toolbox.viewCategory == "plugin" )
  32. {
  33. return toolbox.pluginsShowcaseModel
  34. }
  35. if ( toolbox.viewCategory == "material" )
  36. {
  37. return toolbox.materialsShowcaseModel
  38. }
  39. }
  40. delegate: ToolboxDownloadsShowcaseTile {}
  41. }
  42. }
  43. }