Skip to content

Commit 5e45c8e

Browse files
committed
Adjust chat bubble style
1 parent d7b3bb0 commit 5e45c8e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Core/Sources/SuggestionWidget/SuggestionPanelContent/ChatPanel.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,22 @@ struct ChatPanelMessages: View {
129129
.markdownCodeSyntaxHighlighter(
130130
ChatCodeSyntaxHighlighter(brightMode: colorScheme != .dark)
131131
)
132-
.frame(maxWidth: .infinity, alignment: .leading)
132+
.frame(alignment: .trailing)
133133
.padding()
134134
.background {
135-
RoundedCorners(tl: r, tr: r, bl: r)
135+
RoundedCorners(tl: r, bl: r, br: r * 1.5)
136136
.fill(Color.userChatContentBackground)
137137
}
138138
.overlay {
139-
RoundedCorners(tl: r, tr: r, bl: r)
139+
RoundedCorners(tl: r, bl: r, br: r * 1.5)
140140
.stroke(Color(nsColor: .separatorColor), lineWidth: 1)
141141
}
142142
.padding(.leading)
143143
.padding(.trailing, 4)
144144
.rotationEffect(Angle(degrees: 180))
145145
.scaleEffect(x: -1, y: 1, anchor: .center)
146146
.shadow(color: .black.opacity(0.1), radius: 2)
147+
.frame(maxWidth: .infinity, alignment: .trailing)
147148
} else {
148149
Markdown(text)
149150
.textSelection(.enabled)
@@ -153,21 +154,22 @@ struct ChatPanelMessages: View {
153154
.markdownCodeSyntaxHighlighter(
154155
ChatCodeSyntaxHighlighter(brightMode: colorScheme != .dark)
155156
)
156-
.frame(maxWidth: .infinity, alignment: .leading)
157+
.frame(alignment: .leading)
157158
.padding()
158159
.background {
159-
RoundedCorners(tl: r, tr: r, br: r)
160+
RoundedCorners(tr: r, bl: r * 1.5, br: r)
160161
.fill(Color.contentBackground)
161162
}
162163
.overlay {
163-
RoundedCorners(tl: r, tr: r, br: r)
164+
RoundedCorners(tr: r, bl: r * 1.5, br: r)
164165
.stroke(Color(nsColor: .separatorColor), lineWidth: 1)
165166
}
166167
.padding(.leading, 4)
167168
.padding(.trailing)
168169
.rotationEffect(Angle(degrees: 180))
169170
.scaleEffect(x: -1, y: 1, anchor: .center)
170171
.shadow(color: .black.opacity(0.1), radius: 2)
172+
.frame(maxWidth: .infinity, alignment: .leading)
171173
}
172174
}
173175

0 commit comments

Comments
 (0)