Browse Source

Resize images in imageviewer to fill the space

Changelog-Fixed: Resize images to fill the space
profile-edit
Paul Miller 2 years ago
committed by William Casarin
parent
commit
1615671dfb
  1. 4
      damus/Components/ImageCarousel.swift

4
damus/Components/ImageCarousel.swift

@ -21,6 +21,8 @@ struct ImageViewer: View {
.loadDiskFileSynchronously() .loadDiskFileSynchronously()
.scaleFactor(UIScreen.main.scale) .scaleFactor(UIScreen.main.scale)
.fade(duration: 0.1) .fade(duration: 0.1)
.resizable()
.aspectRatio(contentMode: .fit)
.tabItem { .tabItem {
Text(url.absoluteString) Text(url.absoluteString)
} }
@ -45,6 +47,8 @@ struct ImageCarousel: View {
.loadDiskFileSynchronously() .loadDiskFileSynchronously()
.scaleFactor(UIScreen.main.scale) .scaleFactor(UIScreen.main.scale)
.fade(duration: 0.1) .fade(duration: 0.1)
.resizable()
.aspectRatio(contentMode: .fit)
.tabItem { .tabItem {
Text(url.absoluteString) Text(url.absoluteString)
} }

Loading…
Cancel
Save