Skip to content

Commit

Permalink
🚑️ Fix aspect ratio handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Dec 19, 2024
1 parent 239f177 commit 1e10d9c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/Luminare/Utilities/Extensions/View+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,19 @@ public extension View {
}

@ViewBuilder func luminareAspectRatio(
_ aspectRatio: CGFloat? = nil, contentMode: ContentMode, hasFixedHeight: Bool? = nil
_ aspectRatio: CGFloat?, contentMode: ContentMode, hasFixedHeight: Bool? = nil
) -> some View {
environment(\.luminareAspectRatio, aspectRatio)
environment(\.luminareAspectRatioContentMode, contentMode)
.assigning(\.luminareAspectRatioHasFixedHeight, hasFixedHeight)
}

Check warning on line 261 in Sources/Luminare/Utilities/Extensions/View+Extensions.swift

View workflow job for this annotation

GitHub Actions / Lint

Remove trailing space at end of a line. (trailingSpace)
@ViewBuilder func luminareAspectRatio(
contentMode: ContentMode, hasFixedHeight: Bool? = nil
) -> some View {
environment(\.luminareAspectRatioContentMode, contentMode)
.assigning(\.luminareAspectRatioHasFixedHeight, hasFixedHeight)
}

@ViewBuilder func luminareAspectRatio(
_ aspectRatio: CGSize, contentMode: ContentMode, hasFixedHeight: Bool? = nil
Expand Down

0 comments on commit 1e10d9c

Please sign in to comment.