From 210130de43dce7217dc887a2dea177aa12f12fa1 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 6 Jun 2026 16:53:35 +1000 Subject: [PATCH] fix: first wall row sizing when < max Pad number of wallpapers to the number of walls in a row so when < they dont expand to fill the entire row --- .../pages/wallandstyle/WallpaperCategory.qml | 15 ++++++++++++--- .../nexus/pages/wallandstyle/WallpaperSelect.qml | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) 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);