ToolboxFooter.qml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. anchors
  20. {
  21. top: restartButton.top
  22. left: parent.left
  23. leftMargin: UM.Theme.getSize("wide_margin").width
  24. right: restartButton.right
  25. rightMargin: UM.Theme.getSize("default_margin").width
  26. }
  27. renderType: Text.NativeRendering
  28. }
  29. Cura.PrimaryButton
  30. {
  31. id: restartButton
  32. anchors
  33. {
  34. top: parent.top
  35. topMargin: UM.Theme.getSize("default_margin").height
  36. right: parent.right
  37. rightMargin: UM.Theme.getSize("wide_margin").width
  38. }
  39. height: UM.Theme.getSize("toolbox_footer_button").height
  40. text: catalog.i18nc("@info:button", "Quit Cura")
  41. onClicked: toolbox.restart()
  42. }
  43. ToolboxShadow
  44. {
  45. visible: footer.visible
  46. anchors.bottom: footer.top
  47. reversed: true
  48. }
  49. }