Fix progress bar indeterminate ←→ normal switching
This commit is contained in:
parent
7e5bd5299e
commit
f727645342
|
@ -25,11 +25,17 @@ ProgressBar {
|
||||||
color: foregroundColor
|
color: foregroundColor
|
||||||
|
|
||||||
XAnimator on x {
|
XAnimator on x {
|
||||||
running: indeterminate
|
running: bar.indeterminate
|
||||||
duration: theme.animationDuration * 8
|
duration: theme.animationDuration * 8
|
||||||
from: 0
|
from: 0
|
||||||
to: bar.width - indicator.width
|
to: bar.width - indicator.width
|
||||||
onStopped: {[from, to] = [to, from]; start()}
|
|
||||||
|
onStopped: if (bar.indeterminate) {
|
||||||
|
[from, to] = [to, from];
|
||||||
|
start()
|
||||||
|
} else {
|
||||||
|
indicator.x = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user