ToolboxInstalledPage.qml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. color: "transparent"
  40. width: parent.width
  41. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  42. border.color: UM.Theme.getColor("lining")
  43. border.width: UM.Theme.getSize("default_lining").width
  44. Column
  45. {
  46. anchors
  47. {
  48. top: parent.top
  49. right: parent.right
  50. left: parent.left
  51. margins: UM.Theme.getSize("default_margin").width
  52. }
  53. Repeater
  54. {
  55. id: materialList
  56. model: toolbox.pluginsInstalledModel
  57. delegate: ToolboxInstalledTile {}
  58. }
  59. }
  60. }
  61. Label
  62. {
  63. text: catalog.i18nc("@title:tab", "Materials")
  64. color: UM.Theme.getColor("text_medium")
  65. font: UM.Theme.getFont("medium")
  66. renderType: Text.NativeRendering
  67. }
  68. Rectangle
  69. {
  70. color: "transparent"
  71. width: parent.width
  72. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  73. border.color: UM.Theme.getColor("lining")
  74. border.width: UM.Theme.getSize("default_lining").width
  75. Column
  76. {
  77. anchors
  78. {
  79. top: parent.top
  80. right: parent.right
  81. left: parent.left
  82. margins: UM.Theme.getSize("default_margin").width
  83. }
  84. Repeater
  85. {
  86. id: pluginList
  87. model: toolbox.materialsInstalledModel
  88. delegate: ToolboxInstalledTile {}
  89. }
  90. }
  91. }
  92. }
  93. }