diff --git a/ui/index.html b/ui/index.html
index ef16ec38..f3f0574d 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -524,7 +524,7 @@
-
+
diff --git a/ui/media/js/main.js b/ui/media/js/main.js
index 9259e6c8..3bba6a31 100644
--- a/ui/media/js/main.js
+++ b/ui/media/js/main.js
@@ -3244,13 +3244,15 @@ window.addEventListener("resize", layoutGallery)
function layoutGallery() {
let container = document.getElementById("imagecontainer")
- let thumbSize = parseInt(galleryThumbnailSize.value)
+ let thumbSize = parseFloat(galleryThumbnailSize.value)
+ thumbSize = (10*thumbSize*thumbSize)>>>0
let root = document.querySelector(':root')
root.style.setProperty('--gallery-width', thumbSize + "px")
let msnry = new Masonry( container, {
gutter: 10,
itemSelector: '.gallery-image',
- columnWidth: thumbSize
+ columnWidth: thumbSize,
+ fitWidth: true,
})
}