ToolboxDetailTile.qml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. Item
  7. {
  8. id: tile
  9. width: detailList.width - UM.Theme.getSize("wide_margin").width
  10. height: normalData.height + 2 * UM.Theme.getSize("wide_margin").height
  11. Column
  12. {
  13. id: normalData
  14. anchors
  15. {
  16. top: parent.top
  17. left: parent.left
  18. right: controls.left
  19. rightMargin: UM.Theme.getSize("wide_margin").width
  20. }
  21. Label
  22. {
  23. width: parent.width
  24. height: UM.Theme.getSize("toolbox_property_label").height
  25. text: model.name
  26. wrapMode: Text.WordWrap
  27. color: UM.Theme.getColor("text")
  28. font: UM.Theme.getFont("medium_bold")
  29. renderType: Text.NativeRendering
  30. }
  31. Label
  32. {
  33. width: parent.width
  34. text: model.description
  35. maximumLineCount: 25
  36. elide: Text.ElideRight
  37. wrapMode: Text.WordWrap
  38. color: UM.Theme.getColor("text")
  39. font: UM.Theme.getFont("default")
  40. renderType: Text.NativeRendering
  41. }
  42. ToolboxCompatibilityChart
  43. {
  44. width: parent.width
  45. packageData: model
  46. }
  47. }
  48. ToolboxDetailTileActions
  49. {
  50. id: controls
  51. anchors.right: tile.right
  52. anchors.top: tile.top
  53. width: childrenRect.width
  54. height: childrenRect.height
  55. packageData: model
  56. }
  57. Rectangle
  58. {
  59. color: UM.Theme.getColor("lining")
  60. width: tile.width
  61. height: UM.Theme.getSize("default_lining").height
  62. anchors.top: normalData.bottom
  63. anchors.topMargin: UM.Theme.getSize("default_margin").height + UM.Theme.getSize("wide_margin").height //Normal margin for spacing after chart, wide margin between items.
  64. }
  65. }