Added board firmware update functionality
This commit is contained in:
38
qml/Controls/ProgressBar.qml
Normal file
38
qml/Controls/ProgressBar.qml
Normal file
@@ -0,0 +1,38 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user