diff --git a/modules/nexus/pages/wallandstyle/WallpaperCategory.qml b/modules/nexus/pages/wallandstyle/WallpaperCategory.qml index 884f8bbf..7b35fb3a 100644 --- a/modules/nexus/pages/wallandstyle/WallpaperCategory.qml +++ b/modules/nexus/pages/wallandstyle/WallpaperCategory.qml @@ -26,13 +26,22 @@ PageBase { columnSpacing: Tokens.spacing.large Repeater { - model: Wallpapers.list.filter(w => Wallpapers.getCategoryFor(w) === root.nState.selectedWallpaperCategory).sort((a, b) => a.name.localeCompare(b.name)) + model: { + const walls = Wallpapers.list.filter(w => Wallpapers.getCategoryFor(w) === root.nState.selectedWallpaperCategory).sort((a, b) => a.name.localeCompare(b.name)); + while (walls.length < Config.nexus.wallpapersPerRow) + walls.push(null); + return walls; + } WallItem { required property FileSystemEntry modelData - source: modelData.path - text: modelData.name + // Empty placeholders for sizing + opacity: modelData ? 1 : 0 + enabled: modelData + + source: String(modelData?.path ?? "") + text: modelData?.name ?? "" onClicked: { Wallpapers.setWallpaper(modelData.path); root.nState.closeSubPage(); diff --git a/modules/nexus/pages/wallandstyle/WallpaperSelect.qml b/modules/nexus/pages/wallandstyle/WallpaperSelect.qml index 1dd8c9bb..bf299379 100644 --- a/modules/nexus/pages/wallandstyle/WallpaperSelect.qml +++ b/modules/nexus/pages/wallandstyle/WallpaperSelect.qml @@ -109,14 +109,24 @@ PageBase { categories[category] = w; } } - return Object.values(categories); + const cats = Object.values(categories); + while (cats.length < Config.nexus.wallpapersPerRow) + cats.push(null); + return cats; } WallItem { required property FileSystemEntry modelData - source: modelData.path + // Empty placeholders for sizing + opacity: modelData ? 1 : 0 + enabled: modelData + + source: String(modelData?.path ?? "") text: { + if (!modelData) + return ""; + if (modelData.parentDir !== Paths.wallsdir) { const category = Wallpapers.getCategoryFor(modelData); return category.slice(0, 1).toUpperCase() + category.slice(1);