LicenseDialog.qml 1011 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (c) 2023 UltiMaker
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.4
  4. import QtQuick.Controls 2.9
  5. import QtQuick.Layouts 1.3
  6. import UM 1.6 as UM
  7. import Cura 1.6 as Cura
  8. UM.Dialog
  9. {
  10. readonly property UM.I18nCatalog catalog: UM.I18nCatalog { name: "cura" }
  11. property var name
  12. property var version
  13. property var license
  14. id: base
  15. title: catalog.i18nc("@title:window The argument is a package name, and the second is the version.", "License for %1 %2").arg(name).arg(version)
  16. minimumWidth: 500 * screenScaleFactor
  17. Flickable
  18. {
  19. anchors.fill: parent
  20. contentHeight: labelLicense.height
  21. ScrollBar.vertical: UM.ScrollBar { }
  22. UM.Label
  23. {
  24. id: labelLicense
  25. width: parent.width
  26. text: license
  27. }
  28. }
  29. rightButtons: Cura.TertiaryButton
  30. {
  31. id: closeButton
  32. text: catalog.i18nc("@action:button", "Close")
  33. onClicked: reject()
  34. }
  35. }