Defines the style of the progressbar

Commits to #44
This commit is contained in:
Tamara Hogenhout 2015-06-15 16:44:43 +02:00
parent 6add467477
commit c11c80fa24
2 changed files with 50 additions and 0 deletions

View file

@ -151,6 +151,49 @@ QtObject {
}
}
property Component progressbar: Component{
ProgressBarStyle {
background: UM.AngledCornerRectangle {
anchors.fill: parent
anchors.left: parent.left
implicitWidth: UM.Theme.sizes.progressbar.width
implicitHeight: UM.Theme.sizes.progressbar.height
color: "transparent"
}
progress: UM.AngledCornerRectangle {
anchors.left: parent.left
anchors.fill: parent
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_background
Item {
anchors.fill: parent
anchors.margins: UM.Theme.sizes.progressbar_margin.width
visible: control.indeterminate
Row {
Repeater {
UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height
}
model: 1
}
SequentialAnimation on x {
id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width
running: control.indeterminate
loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
}
}
}
}
}
}
property Component sidebar_category: Component {
ButtonStyle {
background: UM.AngledCornerRectangle {