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,56 +152,25 @@ QtObject {
}
property Component progressbar_regular: Component{
ProgressBarStyle {
background: Rectangle {
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
}
}
}
progress: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_control
}
}
}
property Component progressbar_indeterminate: Component{
property Component progressbar: Component{
ProgressBarStyle {
background: UM.AngledCornerRectangle {
anchors.fill: parent
anchors.left: parent.left
cornerSize: UM.Theme.sizes.progressbar_control.height
implicitWidth: UM.Theme.sizes.progressbar.width
implicitHeight: UM.Theme.sizes.progressbar.height
color: "transparent"
color: UM.Theme.colors.progressbar_background
}
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 {
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
}
model: 1
}
visible: control.indeterminate
SequentialAnimation on x {
id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width
@ -214,7 +183,8 @@ QtObject {
}
}
}
}
property Component sidebar_category: Component {
ButtonStyle {