ToolboxInstalledPage.qml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Toolbox 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.1 as UM
  6. import "../components"
  7. ScrollView
  8. {
  9. id: page
  10. clip: true
  11. width: parent.width
  12. height: parent.height
  13. Column
  14. {
  15. width: page.width
  16. spacing: UM.Theme.getSize("default_margin").height
  17. padding: UM.Theme.getSize("wide_margin").width
  18. visible: toolbox.pluginsInstalledModel.items.length > 0
  19. height: childrenRect.height + 2 * UM.Theme.getSize("wide_margin").height
  20. Label
  21. {
  22. anchors
  23. {
  24. left: parent.left
  25. right: parent.right
  26. margins: parent.padding
  27. }
  28. text: catalog.i18nc("@title:tab", "Plugins")
  29. color: UM.Theme.getColor("text_medium")
  30. font: UM.Theme.getFont("large")
  31. renderType: Text.NativeRendering
  32. }
  33. Rectangle
  34. {
  35. anchors
  36. {
  37. left: parent.left
  38. right: parent.right
  39. margins: parent.padding
  40. }
  41. id: installedPlugins
  42. color: "transparent"
  43. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  44. border.color: UM.Theme.getColor("lining")
  45. border.width: UM.Theme.getSize("default_lining").width
  46. Column
  47. {
  48. anchors
  49. {
  50. top: parent.top
  51. right: parent.right
  52. left: parent.left
  53. margins: UM.Theme.getSize("default_margin").width
  54. }
  55. Repeater
  56. {
  57. id: materialList
  58. model: toolbox.pluginsInstalledModel
  59. delegate: ToolboxInstalledTile {}
  60. }
  61. }
  62. }
  63. Label
  64. {
  65. anchors
  66. {
  67. left: parent.left
  68. right: parent.right
  69. margins: parent.padding
  70. }
  71. text: catalog.i18nc("@title:tab", "Materials")
  72. color: UM.Theme.getColor("text_medium")
  73. font: UM.Theme.getFont("medium")
  74. renderType: Text.NativeRendering
  75. }
  76. Rectangle
  77. {
  78. anchors
  79. {
  80. left: parent.left
  81. right: parent.right
  82. margins: parent.padding
  83. }
  84. id: installedMaterials
  85. color: "transparent"
  86. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  87. border.color: UM.Theme.getColor("lining")
  88. border.width: UM.Theme.getSize("default_lining").width
  89. Column
  90. {
  91. anchors
  92. {
  93. top: parent.top
  94. right: parent.right
  95. left: parent.left
  96. margins: UM.Theme.getSize("default_margin").width
  97. }
  98. Repeater
  99. {
  100. id: pluginList
  101. model: toolbox.materialsInstalledModel
  102. delegate: ToolboxInstalledTile {}
  103. }
  104. }
  105. }
  106. }
  107. }