🐛 Bug fixes on iOS native image

This commit is contained in:
2024-12-21 16:10:53 +08:00
parent d6d60e60a9
commit f5c06bc89c
7 changed files with 67 additions and 65 deletions

View File

@ -76,13 +76,18 @@ struct RandomPostWidgetEntryView : View {
KFImage.url(URL(string: avatarUrl))
.resizable()
.setProcessor(ResizingImageProcessor(referenceSize: CGSize(width: size, height: size), mode: .aspectFit))
.setProcessor(DownsamplingImageProcessor(size: CGSize(width: size, height: size)))
.transition(.opacity)
.aspectRatio(contentMode: .fit)
.frame(width: size, height: size)
.cornerRadius(size / 2)
.frame(width: size, height: size, alignment: .center)
}
Text(randomPost.publisher.nick)
.font(.system(size: 15))
.opacity(0.9)
Text("@\(randomPost.publisher.name)")
.font(.system(size: 13, design: .monospaced))
.opacity(0.9)