From c25c35ebb3b6d20beda87494f4ce8963a406ff6b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 12 Feb 2026 10:15:00 +0000 Subject: [PATCH] live preview ui sizing Signed-off-by: Vladimir Mandic --- javascript/progressBar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/javascript/progressBar.js b/javascript/progressBar.js index c12d71346..287df9f44 100644 --- a/javascript/progressBar.js +++ b/javascript/progressBar.js @@ -108,7 +108,9 @@ function requestProgress(id_task, progressEl, galleryEl, atEnd = null, onProgres livePreview.appendChild(img); img.onload = () => { img.style.width = `min(100%, max(${img.naturalWidth}px, 512px))`; - parentGallery.style.minHeight = `${img.height}px`; + parentGallery.style.minHeight = `min(82vh, ${img.naturalWidth}px)`; + parentGallery.style.maxHeight = `min(82vh, ${img.naturalHeight}px)`; + parentGallery.style.overflow = 'hidden'; }; }; @@ -124,6 +126,8 @@ function requestProgress(id_task, progressEl, galleryEl, atEnd = null, onProgres if (parentGallery && livePreview) { parentGallery.removeChild(livePreview); parentGallery.style.minHeight = 'unset'; + parentGallery.style.maxHeight = 'unset'; + parentGallery.style.overflow = 'unset'; } } catch { /* ignore */ } checkPaused(true);