From 2252f0a1342e9d75518bd5a20dd8856fbbcc3c6f Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 19 Aug 2024 16:50:40 -0400 Subject: [PATCH] Resize large image to fit into window for Image Gallery (#539) --- src/components/sidebar/tabs/queue/ResultGallery.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/sidebar/tabs/queue/ResultGallery.vue b/src/components/sidebar/tabs/queue/ResultGallery.vue index 47fd185ae4..63a6390786 100644 --- a/src/components/sidebar/tabs/queue/ResultGallery.vue +++ b/src/components/sidebar/tabs/queue/ResultGallery.vue @@ -91,8 +91,8 @@ onUnmounted(() => { /* PrimeVue's galleria teleports the fullscreen gallery out of subtree so we cannot use scoped style here. */ img.galleria-image { - max-width: 100%; - max-height: 100%; + max-width: 100vw; + max-height: 100vh; object-fit: contain; /* Set z-index so the close button doesn't get hidden behind the image when image is large */ z-index: -1;