adds styling for both the regular as the indeterminate progressbar

Commits to #44
This commit is contained in:
Tamara Hogenhout 2015-06-16 14:42:37 +02:00
parent e3a9386fdf
commit 15e66a7a18

View File

@ -152,69 +152,39 @@ QtObject {
}
property Component progressbar_regular: Component{
property Component progressbar: Component{
ProgressBarStyle {
background: Rectangle {
background: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
implicitWidth: UM.Theme.sizes.progressbar.width
implicitHeight: UM.Theme.sizes.progressbar.height
color: "transparent"
Item {
anchors.fill: parent
UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_background
width: UM.Theme.sizes.progressbar.width
height: UM.Theme.sizes.progressbar.height
}
}
color: UM.Theme.colors.progressbar_background
}
progress: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_control
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
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
visible: control.indeterminate
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 progressbar_indeterminate: 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
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 {