PackageDetails.qml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright (c) 2021 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.15
  4. import QtQuick.Controls 2.15
  5. import QtQuick.Layouts 1.3
  6. import Cura 1.0 as Cura
  7. import UM 1.0 as UM
  8. Item
  9. {
  10. id: detailPage
  11. property var packageData: packages.selectedPackage
  12. RowLayout
  13. {
  14. id: header
  15. anchors
  16. {
  17. top: parent.top
  18. topMargin: UM.Theme.getSize("default_margin").height
  19. left: parent.left
  20. leftMargin: UM.Theme.getSize("default_margin").width
  21. right: parent.right
  22. rightMargin: anchors.leftMargin
  23. }
  24. spacing: UM.Theme.getSize("default_margin").width
  25. Cura.SecondaryButton
  26. {
  27. Layout.alignment: Qt.AlignVCenter
  28. Layout.preferredHeight: UM.Theme.getSize("action_button").height
  29. Layout.preferredWidth: height
  30. onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it.
  31. tooltip: catalog.i18nc("@button:tooltip", "Back")
  32. toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight
  33. leftPadding: UM.Theme.getSize("narrow_margin").width
  34. rightPadding: leftPadding
  35. iconSource: UM.Theme.getIcon("ArrowLeft")
  36. iconSize: height - leftPadding * 2
  37. }
  38. Label
  39. {
  40. Layout.alignment: Qt.AlignVCenter
  41. Layout.fillWidth: true
  42. text: "Install Plug-ins" //TODO: Depend on package type, and translate.
  43. font: UM.Theme.getFont("large")
  44. color: UM.Theme.getColor("text")
  45. }
  46. }
  47. Rectangle
  48. {
  49. anchors
  50. {
  51. top: header.bottom
  52. topMargin: UM.Theme.getSize("default_margin").height
  53. left: parent.left
  54. right: parent.right
  55. bottom: parent.bottom
  56. }
  57. color: UM.Theme.getColor("detail_background")
  58. PackageCard
  59. {
  60. packageData: detailPage.packageData
  61. }
  62. }
  63. }