Resize images in imageviewer to fill the space

Changelog-Fixed: Resize images to fill the space
This commit is contained in:
Paul Miller
2022-12-19 23:41:53 -06:00
committed by William Casarin
parent d002654624
commit 1615671dfb

View File

@@ -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)
}