WhatsNewContent.qml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. }
  51. }
  52. Cura.PrimaryButton
  53. {
  54. id: getStartedButton
  55. anchors.right: parent.right
  56. anchors.bottom: parent.bottom
  57. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  58. text: catalog.i18nc("@button", "Next")
  59. width: UM.Theme.getSize("welcome_pages_button").width
  60. fixedWidthMode: true
  61. onClicked: base.showNextPage()
  62. }
  63. }