ToolboxDownloadsShowcase.qml 1.5 KB

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