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