Skip to content

Commit c667517

Browse files
committed
Refine images
1 parent 98bb4be commit c667517

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Packages/Features/Sources/DesignSystem/Base/GlowingRoundedRectangle.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public struct GlowingRoundedRectangle: ViewModifier {
1717
endPoint: .bottomTrailing),
1818
lineWidth: 1)
1919
}
20-
.clipShape(RoundedRectangle(cornerRadius: cornerRadius))
20+
.clipShape(.rect(cornerRadius: cornerRadius))
2121
.shadow(color: .indigo.opacity(0.3), radius: 2)
2222
}
2323
}

Packages/Features/Sources/PostUI/Row/PostRowImagesView.swift

+11-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ struct PostRowImagesView: View {
6868
.resizable()
6969
.scaledToFill()
7070
.aspectRatio(contentMode: index == images.images.indices.first ? .fit : .fill)
71-
.clipped()
7271
} else {
7372
RoundedRectangle(cornerRadius: 8)
7473
.fill(.thinMaterial)
@@ -77,8 +76,17 @@ struct PostRowImagesView: View {
7776
.processors([.resize(size: .init(width: finalWidth, height: finalHeight))])
7877
.frame(width: finalWidth, height: finalHeight)
7978
.matchedTransitionSource(id: image.fullSizeImageURL, in: namespace)
80-
.glowingRoundedRectangle()
81-
.shadow(color: images.images.count > 1 ? .black.opacity(0.3) : .clear, radius: 3)
79+
.clipShape(.rect(cornerRadius: 8))
80+
.overlay {
81+
RoundedRectangle(cornerRadius: 8)
82+
.stroke(
83+
LinearGradient(
84+
colors: [.shadowPrimary.opacity(0.3), .indigo.opacity(0.5)],
85+
startPoint: .topLeading,
86+
endPoint: .bottomTrailing),
87+
lineWidth: 1)
88+
}
89+
.shadow(color: .indigo.opacity(0.3), radius: 3)
8290
.onAppear {
8391
if index == images.images.indices.first {
8492
self.firstImageSize = CGSize(width: displayWidth, height: displayHeight)

0 commit comments

Comments
 (0)