ToolboxFooter.qml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright (c) 2018 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. import Cura 1.0 as Cura
  7. Item
  8. {
  9. id: footer
  10. width: parent.width
  11. anchors.bottom: parent.bottom
  12. height: visible ? UM.Theme.getSize("toolbox_footer").height : 0
  13. Label
  14. {
  15. text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.")
  16. color: UM.Theme.getColor("text")
  17. height: UM.Theme.getSize("toolbox_footer_button").height
  18. verticalAlignment: Text.AlignVCenter
  19. wrapMode: Text.WordWrap
  20. anchors
  21. {
  22. top: restartButton.top
  23. left: parent.left
  24. leftMargin: UM.Theme.getSize("wide_margin").width
  25. right: restartButton.left
  26. rightMargin: UM.Theme.getSize("default_margin").width
  27. }
  28. renderType: Text.NativeRendering
  29. }
  30. Cura.PrimaryButton
  31. {
  32. id: restartButton
  33. anchors
  34. {
  35. top: parent.top
  36. topMargin: UM.Theme.getSize("default_margin").height
  37. right: parent.right
  38. rightMargin: UM.Theme.getSize("wide_margin").width
  39. }
  40. height: UM.Theme.getSize("toolbox_footer_button").height
  41. text: catalog.i18nc("@info:button, %1 is the application name", "Quit %1").arg(CuraApplication.applicationDisplayName)
  42. onClicked:
  43. {
  44. base.hide()
  45. toolbox.restart()
  46. }
  47. }
  48. ToolboxShadow
  49. {
  50. visible: footer.visible
  51. anchors.bottom: footer.top
  52. reversed: true
  53. }
  54. }