Cherry pick some missed Compound/layout changes that ended up in the Xcode 15 PR. (#2120)

Fix broken Settings screen snapshots.
This commit is contained in:
Doug
2023-11-20 11:06:24 +00:00
committed by GitHub
parent fc7b0038bc
commit f2391394a7
15 changed files with 31 additions and 62 deletions
@@ -34,6 +34,7 @@ struct MessageComposer: View {
@FocusState private var focused: Bool
@State private var composerTranslation: CGFloat = 0
private let composerShape = RoundedRectangle(cornerRadius: 21, style: .circular)
var body: some View {
VStack(spacing: 0) {
@@ -41,16 +42,14 @@ struct MessageComposer: View {
resizeGrabber
}
let borderRadius: CGFloat = 21
mainContent
.padding(.horizontal, 12.0)
.clipShape(RoundedRectangle(cornerRadius: borderRadius))
.clipShape(composerShape)
.background {
let roundedRectangle = RoundedRectangle(cornerRadius: borderRadius)
ZStack {
roundedRectangle
composerShape
.fill(Color.compound.bgSubtleSecondary)
roundedRectangle
composerShape
.stroke(Color.compound._borderTextFieldFocused, lineWidth: 0.5)
}
}
@@ -135,8 +134,7 @@ private struct MessageComposerReplyHeader: View {
TimelineReplyView(placement: .composer, timelineItemReplyDetails: replyDetails)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(4.0)
.background(Color.compound.bgCanvasDefault)
.cornerRadius(13.0)
.background(.compound.bgCanvasDefault, in: RoundedRectangle(cornerRadius: 13, style: .circular))
.overlay(alignment: .topTrailing) {
Button(action: action) {
CompoundIcon(\.close, size: .small, relativeTo: .compound.bodySMSemibold)