ToolboxDetailsPage.qml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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.Controls 1.4
  6. import QtQuick.Controls.Styles 1.4
  7. import UM 1.1 as UM
  8. // TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
  9. Item
  10. {
  11. id: base
  12. anchors.fill: parent
  13. Item
  14. {
  15. id: sidebar
  16. height: parent.height
  17. width: UM.Theme.getSize("base_unit").width * 6
  18. anchors
  19. {
  20. top: parent.top
  21. left: parent.left
  22. topMargin: UM.Theme.getSize("double_margin").height
  23. leftMargin: UM.Theme.getSize("default_margin").width
  24. rightMargin: UM.Theme.getSize("default_margin").width
  25. }
  26. Button
  27. {
  28. text: "Back"
  29. UM.RecolorImage
  30. {
  31. id: backArrow
  32. anchors.verticalCenter: parent.verticalCenter
  33. anchors.left: parent.left
  34. anchors.rightMargin: UM.Theme.getSize("default_margin").width
  35. width: UM.Theme.getSize("standard_arrow").width
  36. height: UM.Theme.getSize("standard_arrow").height
  37. sourceSize.width: width
  38. sourceSize.height: height
  39. color: UM.Theme.getColor("text")
  40. source: UM.Theme.getIcon("arrow_left")
  41. }
  42. width: UM.Theme.getSize("base_unit").width * 4
  43. height: UM.Theme.getSize("base_unit").height * 2
  44. onClicked: manager.detailView = ""
  45. style: ButtonStyle
  46. {
  47. background: Rectangle
  48. {
  49. color: "transparent"
  50. }
  51. label: Label
  52. {
  53. text: control.text
  54. color: UM.Theme.getColor("text")
  55. font: UM.Theme.getFont("default_bold")
  56. horizontalAlignment: Text.AlignRight
  57. width: control.width
  58. }
  59. }
  60. }
  61. }
  62. Rectangle
  63. {
  64. id: header
  65. anchors
  66. {
  67. left: sidebar.right
  68. right: parent.right
  69. }
  70. height: UM.Theme.getSize("base_unit").height * 12
  71. Rectangle
  72. {
  73. id: thumbnail
  74. width: UM.Theme.getSize("toolbox_thumbnail_medium").width
  75. height: UM.Theme.getSize("toolbox_thumbnail_medium").height
  76. color: "grey"
  77. anchors
  78. {
  79. top: parent.top
  80. left: parent.left
  81. leftMargin: UM.Theme.getSize("double_margin").width
  82. topMargin: UM.Theme.getSize("double_margin").height
  83. }
  84. }
  85. Column
  86. {
  87. anchors
  88. {
  89. top: thumbnail.top
  90. left: thumbnail.right
  91. leftMargin: UM.Theme.getSize("default_margin").width
  92. right: parent.right
  93. rightMargin: UM.Theme.getSize("double_margin").width
  94. }
  95. spacing: Math.floor(UM.Theme.getSize("default_margin").height/2)
  96. Label
  97. {
  98. text: "DSM"
  99. font: UM.Theme.getFont("large")
  100. wrapMode: Text.WordWrap
  101. width: parent.width
  102. }
  103. Label
  104. {
  105. text: "Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is vertically aligned to the top."
  106. font: UM.Theme.getFont("default")
  107. wrapMode: Text.WordWrap
  108. width: parent.width
  109. }
  110. Label
  111. {
  112. text: "Author: " + "DSM"
  113. font: UM.Theme.getFont("small")
  114. wrapMode: Text.WordWrap
  115. width: parent.width
  116. // TODO: Add mail icon.
  117. }
  118. }
  119. }
  120. ScrollView
  121. {
  122. id: scroll
  123. frameVisible: true
  124. anchors
  125. {
  126. right: header.right
  127. top: header.bottom
  128. left: header.left
  129. bottom: base.bottom
  130. }
  131. height: parent.height
  132. style: UM.Theme.styles.scrollview
  133. /*
  134. ListView
  135. {
  136. id: contentColumn
  137. spacing: UM.Theme.getSize("base_unit").height
  138. height: childrenRect.height + (UM.Theme.getSize("double_margin").height * 2)
  139. anchors
  140. {
  141. left: scroll.left
  142. right: scroll.right
  143. top: scroll.top
  144. topMargin: UM.Theme.getSize("double_margin").height
  145. bottomMargin: UM.Theme.getSize("double_margin").height
  146. leftMargin: UM.Theme.getSize("double_margin").width
  147. rightMargin: UM.Theme.getSize("double_margin").width
  148. }
  149. ToolboxDetailsTile {}
  150. ToolboxDetailsTile {}
  151. ToolboxDetailsTile {}
  152. ToolboxDetailsTile {}
  153. ToolboxDetailsTile {}
  154. ToolboxDetailsTile {}
  155. ToolboxDetailsTile {}
  156. ToolboxDetailsTile {}
  157. ToolboxDetailsTile {}
  158. ToolboxDetailsTile {}
  159. ToolboxDetailsTile {}
  160. }
  161. */
  162. }
  163. }