damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 1615671dfbe0a9250be8745511f2d12457747342
parent d002654624abd591977cf1549befcc0e17e280ee
Author: Paul Miller <paul@paul.lol>
Date:   Mon, 19 Dec 2022 23:41:53 -0600

Resize images in imageviewer to fill the space

Changelog-Fixed: Resize images to fill the space

Diffstat:
Mdamus/Components/ImageCarousel.swift | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git 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) }