diff --git a/src/Qt5/imports/FluentUI/Controls/FluChart.qml b/src/Qt5/imports/FluentUI/Controls/FluChart.qml index f47bd20d..457da42e 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluChart.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluChart.qml @@ -15,7 +15,9 @@ Canvas { function animateToNewData() { chartAnimationProgress = 0.1; - d.jsChart?.update(); + if (d.jsChart) { + d.jsChart.update(); + } chartAnimator.restart(); } QtObject{ diff --git a/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml b/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml index c89ba6fb..e75b47ba 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml @@ -41,13 +41,15 @@ ProgressBar{ height: parent.height radius: d._radius color: control.color - PropertyAnimation on x { - id:animator_x + SequentialAnimation on x { + id: animator_x running: control.indeterminate && control.visible - from: -rect_progress.width - to:control.width+rect_progress.width loops: Animation.Infinite - duration: control.duration + PropertyAnimation { + from: -rect_progress.width + to: control.width + rect_progress.width + duration: control.duration + } } } } diff --git a/src/Qt6/imports/FluentUI/Controls/FluChart.qml b/src/Qt6/imports/FluentUI/Controls/FluChart.qml index 30af5ab3..8153c3d8 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluChart.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluChart.qml @@ -14,7 +14,9 @@ Canvas { function animateToNewData() { chartAnimationProgress = 0.1; - d.jsChart?.update(); + if (d.jsChart) { + d.jsChart.update(); + } chartAnimator.restart(); } QtObject{ diff --git a/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml b/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml index bca37cea..9c2c6123 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml @@ -42,13 +42,15 @@ ProgressBar{ height: parent.height radius: d._radius color: control.color - PropertyAnimation on x { - id:animator_x + SequentialAnimation on x { + id: animator_x running: control.indeterminate && control.visible - from: -rect_progress.width - to:control.width+rect_progress.width loops: Animation.Infinite - duration: control.duration + PropertyAnimation { + from: -rect_progress.width + to: control.width + rect_progress.width + duration: control.duration + } } } }