wallust integration

This commit is contained in:
Zacharias-Brohn
2025-11-13 01:56:43 +01:00
parent 374842b321
commit 52a382b0ad
5 changed files with 43 additions and 8 deletions
+7 -8
View File
@@ -259,20 +259,19 @@ Scope {
return 0;
// Screen width - 4x outer rounding - 2x max side thickness (cause centered)
const barMargins = 10;
let outerMargins = 0;
const maxWidth = screen.width - (barMargins + outerMargins) * 2;
const margins = 10;
const maxWidth = screen.width - margins * 2;
if (maxWidth <= 0)
if ( maxWidth <= 0 )
return 0;
const maxItemsOnScreen = Math.floor(maxWidth / itemWidth);
const visible = Math.min(maxItemsOnScreen, Config.maxWallpapers, wallpaperModel.values.length);
const maxItemsOnScreen = Math.floor( maxWidth / itemWidth );
const visible = Math.min( maxItemsOnScreen, Config.maxWallpapers, wallpaperModel.values.length );
if (visible === 2)
if ( visible === 2 )
return 1;
if (visible > 1 && visible % 2 === 0)
if ( visible > 1 && visible % 2 === 0 )
return visible - 1;
return visible;
}