Skip to content

Commit 9a5471b

Browse files
committed
Update code block style
1 parent 56d4289 commit 9a5471b

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

Core/Sources/SuggestionWidget/Styles.swift

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,21 @@ extension MarkdownUI.Theme {
6868
FontSize(.em(0.85))
6969
}
7070
.padding(16)
71-
.padding(.trailing, 10)
71+
.padding(.top, 14)
7272
.background(Color(nsColor: .textBackgroundColor).opacity(0.7))
7373
.clipShape(RoundedRectangle(cornerRadius: 6))
74-
.overlay(alignment: .topTrailing) {
75-
CopyButton {
76-
NSPasteboard.general.clearContents()
77-
NSPasteboard.general.setString(configuration.content, forType: .string)
74+
.overlay(alignment: .top) {
75+
HStack(alignment: .center) {
76+
Text(configuration.language ?? "code")
77+
.foregroundStyle(.tertiary)
78+
.font(.callout)
79+
.padding(.leading, 8)
80+
.lineLimit(1)
81+
Spacer()
82+
CopyButton {
83+
NSPasteboard.general.clearContents()
84+
NSPasteboard.general.setString(configuration.content, forType: .string)
85+
}
7886
}
7987
}
8088
.markdownMargin(top: 0, bottom: 16)

0 commit comments

Comments
 (0)