Skip to content

Commit

Permalink
Fix the issues when using progress indicator, the width is always the…
Browse files Browse the repository at this point in the history
… image size but not its intrinsicContentSize
  • Loading branch information
dreampiggy committed Oct 25, 2019
1 parent f09878b commit 742d36a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions SDWebImageSwiftUI/Classes/ImageViewWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ public class ProgressIndicatorWrapper : PlatformView {
#if os(macOS)
public override func layout() {
super.layout()
wrapped.frame = self.bounds
wrapped.setFrameOrigin(CGPoint(x: (self.bounds.width - wrapped.frame.width) / 2, y: (self.bounds.height - wrapped.frame.height) / 2))
}
#else
public override func layoutSubviews() {
super.layoutSubviews()
wrapped.frame = self.bounds
wrapped.center = self.center
}
#endif
Expand Down

0 comments on commit 742d36a

Please sign in to comment.