WhatsNewContent.qml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Cura 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.3 as UM
  6. import Cura 1.1 as Cura
  7. //
  8. // This component contains the content for the "What's new in Ultimaker Cura" page of the welcome on-boarding process.
  9. //
  10. Item
  11. {
  12. UM.I18nCatalog { id: catalog; name: "cura" }
  13. Label
  14. {
  15. id: titleLabel
  16. anchors.top: parent.top
  17. anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height
  18. anchors.horizontalCenter: parent.horizontalCenter
  19. horizontalAlignment: Text.AlignHCenter
  20. text: catalog.i18nc("@label", "What's new in Ultimaker Cura")
  21. color: UM.Theme.getColor("primary_button")
  22. font: UM.Theme.getFont("large_bold")
  23. renderType: Text.NativeRendering
  24. }
  25. Rectangle
  26. {
  27. anchors.top: titleLabel.bottom
  28. anchors.bottom: getStartedButton.top
  29. anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height
  30. anchors.bottomMargin: UM.Theme.getSize("welcome_pages_default_margin").height
  31. anchors.horizontalCenter: parent.horizontalCenter
  32. width: (parent.width * 3 / 4) | 0
  33. border.color: "#dfdfdf"
  34. border.width: UM.Theme.getSize("default_lining").width
  35. ScrollView
  36. {
  37. anchors.fill: parent
  38. anchors.margins: UM.Theme.getSize("default_lining").width
  39. ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
  40. TextArea
  41. {
  42. id: whatsNewTextArea
  43. text: CuraApplication.getTextManager().getChangeLogText()
  44. textFormat: Text.RichText
  45. wrapMode: Text.WordWrap
  46. readOnly: true
  47. font: UM.Theme.getFont("default")
  48. renderType: Text.NativeRendering
  49. }
  50. Component.onCompleted:
  51. {
  52. Scrollbar.vertical.position = 0;
  53. }
  54. }
  55. }
  56. Cura.PrimaryButton
  57. {
  58. id: getStartedButton
  59. anchors.right: parent.right
  60. anchors.bottom: parent.bottom
  61. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  62. text: catalog.i18nc("@button", "Next")
  63. width: UM.Theme.getSize("welcome_pages_button").width
  64. fixedWidthMode: true
  65. onClicked: base.showNextPage()
  66. }
  67. }