mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 07:09:02 +08:00
Never animate progress bars if they are invisible
This is now the responsibility of the theme rather than the interface element, since the theme defines the animation itself. This makes it that the interface element doesn't need to worry about things like its style or animation. Contributes to issue CURA-2497.
This commit is contained in:
parent
a39cbb735b
commit
8644fb7113
@ -161,10 +161,6 @@ Rectangle
|
||||
visible: showProgress;
|
||||
indeterminate:
|
||||
{
|
||||
if(!showProgress)
|
||||
{
|
||||
return false; //Never be indeterminate when not visible, since that triggers a redraw of the screen.
|
||||
}
|
||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||
{
|
||||
case "pausing":
|
||||
|
@ -237,7 +237,7 @@ QtObject {
|
||||
SequentialAnimation on x {
|
||||
id: xAnim
|
||||
property int animEndPoint: Theme.getSize("message").width - (Theme.getSize("default_margin").width * 2) - Theme.getSize("progressbar_control").width
|
||||
running: control.indeterminate
|
||||
running: control.indeterminate && control.visible
|
||||
loops: Animation.Infinite
|
||||
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
|
||||
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user