[vlc-commits] qt: ProgressBar: Use indeterminate mode during discovery/reload
Hugo Beauzée-Luyssen
git at videolan.org
Fri Jul 5 17:29:38 CEST 2019
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jun 26 18:10:12 2019 +0200| [993d6fd1fcebbf909dcaa0b4094df6ae3e7d2fae] | committer: Hugo Beauzée-Luyssen
qt: ProgressBar: Use indeterminate mode during discovery/reload
Otherwise the progress bar can flicker as more files are found
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=993d6fd1fcebbf909dcaa0b4094df6ae3e7d2fae
---
modules/gui/qt/qml/utils/ScanProgressBar.qml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/qml/utils/ScanProgressBar.qml b/modules/gui/qt/qml/utils/ScanProgressBar.qml
index 1e1bf1e22f..7b298110c4 100644
--- a/modules/gui/qt/qml/utils/ScanProgressBar.qml
+++ b/modules/gui/qt/qml/utils/ScanProgressBar.qml
@@ -35,10 +35,12 @@ ProgressBar {
progressText_id.text = entryPoint;
}
onDiscoveryStarted: discoveryDone = false
+ onReloadStarted: discoveryDone = false
onDiscoveryCompleted: discoveryDone = true
+ onReloadCompleted: discoveryDone = true
}
- visible: (progressPercent < 100) && (progressPercent != 0)
+ visible: ((progressPercent < 100) && (progressPercent != 0)) || !discoveryDone
id: progressBar_id
from: 0
to: 100
@@ -46,9 +48,12 @@ ProgressBar {
anchors.topMargin: 10
anchors.bottomMargin: 10
value: progressPercent
+ indeterminate: !discoveryDone
Text {
id: progressText_id
color: VLCStyle.colors.text
+ z: progressBar_id.z + 1
anchors.horizontalCenter: parent.horizontalCenter
+ visible: true
}
}
More information about the vlc-commits
mailing list