ProgressBar.qml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2017 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. // Qt-Security score:significant reason:default
  4. import QtQuick
  5. import QtQuick.Templates as T
  6. import QtQuick.Controls.Basic.impl
  7. T.ProgressBar {
  8. id: control
  9. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  10. implicitContentWidth + leftPadding + rightPadding)
  11. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  12. implicitContentHeight + topPadding + bottomPadding)
  13. contentItem: ProgressBarImpl {
  14. implicitHeight: 6
  15. implicitWidth: 116
  16. scale: control.mirrored ? -1 : 1
  17. progress: control.position
  18. indeterminate: control.visible && control.indeterminate
  19. color: control.palette.dark
  20. }
  21. background: Rectangle {
  22. implicitWidth: 200
  23. implicitHeight: 6
  24. y: (control.height - height) / 2
  25. height: 6
  26. color: control.palette.midlight
  27. }
  28. }