forked from Shinonome/dots-hyprland
wallpaper selector: progress indicator for thumbnail generation
This commit is contained in:
@@ -80,6 +80,12 @@ MouseArea {
|
||||
thumbnailImage.source = "";
|
||||
thumbnailImage.source = thumbnailImage.thumbnailPath;
|
||||
}
|
||||
function onThumbnailGeneratedFile(filePath) {
|
||||
if (thumbnailImage.status !== Image.Error) return;
|
||||
if (Qt.resolvedUrl(thumbnailImage.sourcePath) !== Qt.resolvedUrl(filePath)) return;
|
||||
thumbnailImage.source = "";
|
||||
thumbnailImage.source = thumbnailImage.thumbnailPath;
|
||||
}
|
||||
}
|
||||
|
||||
layer.enabled: true
|
||||
|
||||
@@ -205,7 +205,9 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
StyledProgressBar {
|
||||
StyledIndeterminateProgressBar {
|
||||
id: indeterminateProgressBar
|
||||
visible: Wallpapers.thumbnailGenerationRunning && value == 0
|
||||
anchors {
|
||||
bottom: parent.top
|
||||
left: parent.left
|
||||
@@ -213,7 +215,12 @@ Item {
|
||||
leftMargin: 4
|
||||
rightMargin: 4
|
||||
}
|
||||
indeterminate: true
|
||||
}
|
||||
|
||||
StyledProgressBar {
|
||||
visible: Wallpapers.thumbnailGenerationRunning && value > 0
|
||||
value: Wallpapers.thumbnailGenerationProgress
|
||||
anchors.fill: indeterminateProgressBar
|
||||
}
|
||||
|
||||
GridView {
|
||||
|
||||
Reference in New Issue
Block a user