Files
CuboBmsTool/qml/Controls/ProgressBar.qml
2022-09-13 15:20:09 +03:00

39 lines
853 B
QML

import QtQuick 2.12
import QtQuick.Controls 2.12
import Utils 1.0
ProgressBar {
id: control
padding: 2
background: Rectangle {
implicitWidth: 250
implicitHeight: 26
border.width: 1
border.color: Palette.borderColor
color: Palette.screenBackgroundColor
radius: 5
}
contentItem: Item {
implicitWidth: 250
implicitHeight: 24
Rectangle {
width: control.visualPosition * parent.width
height: parent.height
radius: 5
color: Palette.alternativeBackgroundColor
}
Text {
text: Math.floor((control.value / control.to) * 100) + '%'
anchors.centerIn: parent
color: Palette.textColor
font.pixelSize: 18
font.weight: Font.Bold
}
}
}