From fa47c6778cc370b25b4056fdf9ba7f4e253cd3f3 Mon Sep 17 00:00:00 2001 From: vaguesyntax Date: Sat, 6 Dec 2025 00:26:36 +0300 Subject: [PATCH] wallpaper selector: add thumbnail loading indicator --- .../ii/wallpaperSelector/WallpaperDirectoryItem.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperDirectoryItem.qml b/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperDirectoryItem.qml index 23f7915ef..f0a53bf39 100644 --- a/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperDirectoryItem.qml +++ b/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperDirectoryItem.qml @@ -11,6 +11,7 @@ MouseArea { required property var fileModelData property bool isDirectory: fileModelData.fileIsDir property bool useThumbnail: Images.isValidImageByName(fileModelData.fileName) + property bool showLoadingIndicator: false property alias colBackground: background.color property alias colText: wallpaperItemName.color @@ -69,6 +70,8 @@ MouseArea { sourceSize.width: wallpaperItemColumnLayout.width sourceSize.height: wallpaperItemColumnLayout.height - wallpaperItemColumnLayout.spacing - wallpaperItemName.height + onVisibleChanged: root.showLoadingIndicator = !thumbnailImage.visible + Connections { target: Wallpapers function onThumbnailGenerated(directory) { @@ -106,6 +109,15 @@ MouseArea { sourceSize.height: wallpaperItemColumnLayout.height - wallpaperItemColumnLayout.spacing - wallpaperItemName.height } } + + FadeLoader { + id: loadingIndicatorLoader + shown: root.showLoadingIndicator + anchors.centerIn: parent + sourceComponent: MaterialLoadingIndicator { + loading: true + } + } } StyledText {