ToolboxDownloadsShowcase.qml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. Grid
  21. {
  22. height: childrenRect.height
  23. spacing: UM.Theme.getSize("wide_margin").width
  24. columns: 3
  25. anchors
  26. {
  27. horizontalCenter: parent.horizontalCenter
  28. }
  29. Repeater
  30. {
  31. model: {
  32. if ( toolbox.viewCategory == "plugin" )
  33. {
  34. return toolbox.pluginsShowcaseModel
  35. }
  36. if ( toolbox.viewCategory == "material" )
  37. {
  38. return toolbox.materialsShowcaseModel
  39. }
  40. }
  41. delegate: ToolboxDownloadsShowcaseTile {}
  42. }
  43. }
  44. }