From 1615671dfbe0a9250be8745511f2d12457747342 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Mon, 19 Dec 2022 23:41:53 -0600 Subject: [PATCH] Resize images in imageviewer to fill the space Changelog-Fixed: Resize images to fill the space --- damus/Components/ImageCarousel.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/damus/Components/ImageCarousel.swift b/damus/Components/ImageCarousel.swift index 43c2b2e..9cd0f7b 100644 --- a/damus/Components/ImageCarousel.swift +++ b/damus/Components/ImageCarousel.swift @@ -21,6 +21,8 @@ struct ImageViewer: View { .loadDiskFileSynchronously() .scaleFactor(UIScreen.main.scale) .fade(duration: 0.1) + .resizable() + .aspectRatio(contentMode: .fit) .tabItem { Text(url.absoluteString) } @@ -45,6 +47,8 @@ struct ImageCarousel: View { .loadDiskFileSynchronously() .scaleFactor(UIScreen.main.scale) .fade(duration: 0.1) + .resizable() + .aspectRatio(contentMode: .fit) .tabItem { Text(url.absoluteString) }