vector-im/element-ios/issues/5298 - Added bottom padding on location markers so they point to the location instead of being centered on it.

This commit is contained in:
Stefan Ceriu
2022-01-19 11:48:44 +02:00
committed by Stefan Ceriu
parent c6e5d2ebc0
commit e4a978fdbe
2 changed files with 48 additions and 24 deletions
@@ -25,16 +25,20 @@ struct LocationSharingUserMarkerView: View {
@Environment(\.theme) private var theme: ThemeSwiftUI
@State var frame: CGRect = .zero
// MARK: Public
let avatarData: AvatarInputProtocol
var body: some View {
ZStack(alignment: .center) {
ZStack {
Image(uiImage: Asset.Images.locationUserMarker.image)
AvatarImage(avatarData: avatarData, size: .large)
.offset(.init(width: 0.0, height: -1.5))
}
.background(ViewFrameReader(frame: $frame))
.padding(.bottom, frame.height)
.accentColor(theme.colors.accent)
}
}