ToolboxDownloadsGrid.qml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // PluginBrowser is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Dialogs 1.1
  5. import QtQuick.Window 2.2
  6. import QtQuick.Controls 1.4
  7. import QtQuick.Controls.Styles 1.4
  8. import QtQuick.Layouts 1.3
  9. import UM 1.1 as UM
  10. // TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
  11. Column
  12. {
  13. id: base
  14. height: childrenRect.height
  15. spacing: UM.Theme.getSize("base_unit").height
  16. Label
  17. {
  18. id: heading
  19. text: "Community Plugins"
  20. width: parent.width
  21. color: UM.Theme.getColor("text_medium")
  22. font: UM.Theme.getFont("medium")
  23. }
  24. GridLayout
  25. {
  26. id: grid
  27. width: parent.width
  28. columns: 3
  29. columnSpacing: UM.Theme.getSize("base_unit").width
  30. rowSpacing: UM.Theme.getSize("base_unit").height
  31. Repeater
  32. {
  33. model: manager.packagesModel
  34. delegate: ToolboxDownloadsGridTile
  35. {
  36. Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns
  37. }
  38. }
  39. }
  40. }