CuraProgressBar.qml 899 B

1234567891011121314151617181920212223242526272829303132333435363738
  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.0 as Cura
  7. //
  8. // Cura-style progress bar, with a grey background and a blue indication bar.
  9. //
  10. ProgressBar
  11. {
  12. id: progressBar
  13. width: parent.width
  14. height: UM.Theme.getSize("progressbar").height
  15. background: Rectangle
  16. {
  17. anchors.fill: parent
  18. radius: UM.Theme.getSize("progressbar_radius").width
  19. color: UM.Theme.getColor("progressbar_background")
  20. }
  21. contentItem: Item
  22. {
  23. anchors.fill: parent
  24. Rectangle
  25. {
  26. width: progressBar.visualPosition * parent.width
  27. height: parent.height
  28. radius: UM.Theme.getSize("progressbar_radius").width
  29. color: UM.Theme.getColor("progressbar_control")
  30. }
  31. }
  32. }