Skip to content

Commit 4424fb1

Browse files
committed
Adjust style
1 parent 5e63323 commit 4424fb1

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

Core/Sources/SuggestionWidget/SuggestionPanelContent/ChatPanel.swift

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ struct ChatPanelMessages: View {
7373
var body: some View {
7474
ScrollView {
7575
vstack {
76+
let r = 6 as Double
77+
7678
Spacer()
7779

7880
if chat.isReceivingMessage {
@@ -87,10 +89,10 @@ struct ChatPanelMessages: View {
8789
.padding(8)
8890
.background(
8991
.regularMaterial,
90-
in: RoundedRectangle(cornerRadius: 8, style: .continuous)
92+
in: RoundedRectangle(cornerRadius: r, style: .continuous)
9193
)
9294
.overlay {
93-
RoundedRectangle(cornerRadius: 9, style: .continuous)
95+
RoundedRectangle(cornerRadius: r, style: .continuous)
9496
.stroke(Color(nsColor: .separatorColor), lineWidth: 1)
9597
}
9698
}
@@ -110,6 +112,7 @@ struct ChatPanelMessages: View {
110112
ForEach(chat.history.reversed(), id: \.id) { message in
111113
let text = message.text.isEmpty && !message.isUser ? "..." : message
112114
.text
115+
113116

114117
if message.isUser {
115118
Markdown(text)
@@ -123,17 +126,18 @@ struct ChatPanelMessages: View {
123126
.frame(maxWidth: .infinity, alignment: .leading)
124127
.padding()
125128
.background {
126-
RoundedCorners(tl: 12, tr: 12, bl: 12)
129+
RoundedCorners(tl: r, tr: r, bl: r)
127130
.fill(Color.userChatContentBackground)
128131
}
129132
.overlay {
130-
RoundedCorners(tl: 12, tr: 12, bl: 12)
133+
RoundedCorners(tl: r, tr: r, bl: r)
131134
.stroke(Color(nsColor: .separatorColor), lineWidth: 1)
132135
}
133136
.padding(.leading)
134137
.padding(.trailing, 4)
135138
.rotationEffect(Angle(degrees: 180))
136139
.scaleEffect(x: -1, y: 1, anchor: .center)
140+
.shadow(color: .black.opacity(0.1), radius: 2)
137141
} else {
138142
Markdown(text)
139143
.textSelection(.enabled)
@@ -146,17 +150,18 @@ struct ChatPanelMessages: View {
146150
.frame(maxWidth: .infinity, alignment: .leading)
147151
.padding()
148152
.background {
149-
RoundedCorners(tl: 12, tr: 12, br: 12)
153+
RoundedCorners(tl: r, tr: r, br: r)
150154
.fill(Color.contentBackground)
151155
}
152156
.overlay {
153-
RoundedCorners(tl: 12, tr: 12, br: 12)
157+
RoundedCorners(tl: r, tr: r, br: r)
154158
.stroke(Color(nsColor: .separatorColor), lineWidth: 1)
155159
}
156160
.padding(.leading, 4)
157161
.padding(.trailing)
158162
.rotationEffect(Angle(degrees: 180))
159163
.scaleEffect(x: -1, y: 1, anchor: .center)
164+
.shadow(color: .black.opacity(0.1), radius: 2)
160165
}
161166
}
162167

@@ -233,11 +238,11 @@ struct ChatPanelInputArea: View {
233238
}
234239
.frame(maxWidth: .infinity)
235240
.background {
236-
RoundedRectangle(cornerRadius: 8)
241+
RoundedRectangle(cornerRadius: 6)
237242
.fill(Color(nsColor: .controlBackgroundColor))
238243
}
239244
.overlay {
240-
RoundedRectangle(cornerRadius: 8)
245+
RoundedRectangle(cornerRadius: 6)
241246
.stroke(Color(nsColor: .controlColor), lineWidth: 1)
242247
}
243248
}

0 commit comments

Comments
 (0)