mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-07 05:51:47 +08:00
adds styling for both the regular as the indeterminate progressbar
Commits to #44
This commit is contained in:
parent
e3a9386fdf
commit
15e66a7a18
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user