ToolboxInstalledPage.qml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Toolbox is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  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 UM 1.1 as UM
  9. ScrollView
  10. {
  11. id: page
  12. frameVisible: false
  13. width: parent.width
  14. height: parent.height
  15. style: UM.Theme.styles.scrollview
  16. flickableItem.flickableDirection: Flickable.VerticalFlick
  17. Column
  18. {
  19. spacing: UM.Theme.getSize("default_margin").height
  20. visible: toolbox.pluginsInstalledModel.items.length > 0
  21. height: childrenRect.height + 4 * UM.Theme.getSize("default_margin").height
  22. anchors
  23. {
  24. right: parent.right
  25. left: parent.left
  26. margins: UM.Theme.getSize("default_margin").width
  27. top: parent.top
  28. }
  29. Label
  30. {
  31. width: page.width
  32. text: catalog.i18nc("@title:tab", "Plugins")
  33. color: UM.Theme.getColor("text_medium")
  34. font: UM.Theme.getFont("large")
  35. renderType: Text.NativeRendering
  36. }
  37. Rectangle
  38. {
  39. id: installedPlugins
  40. color: "transparent"
  41. width: parent.width
  42. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  43. border.color: UM.Theme.getColor("lining")
  44. border.width: UM.Theme.getSize("default_lining").width
  45. Column
  46. {
  47. anchors
  48. {
  49. top: parent.top
  50. right: parent.right
  51. left: parent.left
  52. margins: UM.Theme.getSize("default_margin").width
  53. }
  54. Repeater
  55. {
  56. id: materialList
  57. model: toolbox.pluginsInstalledModel
  58. delegate: ToolboxInstalledTile {}
  59. }
  60. }
  61. }
  62. Label
  63. {
  64. text: catalog.i18nc("@title:tab", "Materials")
  65. color: UM.Theme.getColor("text_medium")
  66. font: UM.Theme.getFont("medium")
  67. renderType: Text.NativeRendering
  68. }
  69. Rectangle
  70. {
  71. id: installedMaterials
  72. color: "transparent"
  73. width: parent.width
  74. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  75. border.color: UM.Theme.getColor("lining")
  76. border.width: UM.Theme.getSize("default_lining").width
  77. Column
  78. {
  79. anchors
  80. {
  81. top: parent.top
  82. right: parent.right
  83. left: parent.left
  84. margins: UM.Theme.getSize("default_margin").width
  85. }
  86. Repeater
  87. {
  88. id: pluginList
  89. model: toolbox.materialsInstalledModel
  90. delegate: ToolboxInstalledTile {}
  91. }
  92. }
  93. }
  94. }
  95. }