1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-01-20 21:00:36 +01:00

Add a thin white border

This commit is contained in:
Jed Fox 2022-12-20 12:36:57 -05:00
parent 7235ba3fb2
commit 1461b314ff
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1

View File

@ -44,6 +44,12 @@ struct MediaAltTextOverlay: View {
.tint(.white)
.background(Color.black.opacity(0.85))
.cornerRadius(4)
.overlay(
.white.opacity(0.5),
in: RoundedRectangle(cornerRadius: 4)
.inset(by: -0.5)
.stroke(lineWidth: 0.5)
)
.animation(.spring(response: 0.25), value: showingAlt)
.frame(width: geom.size.width, height: geom.size.height, alignment: .bottomLeading)
}