39 lines
853 B
QML
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
|
|
}
|
|
}
|
|
}
|