Skip to content

Commit 37cd3bc

Browse files
authored
Merge pull request #33 from hdcola/hdcola
增加了代码区字体大小设置
2 parents 1fd8e15 + ce0f4b6 commit 37cd3bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OneTapSwiftUI.swiftpm/Components/CodePreviewView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ struct CodePreviewView: View {
8282
}
8383
}
8484
HStack{
85-
Image(systemName: "textformat.size.smaller")
85+
(Text(Image(systemName: "textformat.size.larger")) + Text("-"))
86+
.font(.footnote)
8687
.foregroundColor(
8788
copyButtonHovered ? .primary : .secondary.opacity(0.6)
8889
)
89-
.frame(width: 15, height: 15)
9090
.padding(4)
9191
.overlay(
9292
RoundedRectangle(cornerRadius: 4, style: .continuous)
@@ -98,11 +98,11 @@ struct CodePreviewView: View {
9898
.onTapGesture {
9999
codeFontSize -= 1
100100
}
101-
Image(systemName: "textformat.size.larger")
101+
(Text(Image(systemName: "textformat.size.larger")) + Text("+"))
102+
.font(.footnote)
102103
.foregroundColor(
103104
copyButtonHovered ? .primary : .secondary.opacity(0.6)
104105
)
105-
.frame(width: 15, height: 15)
106106
.padding(4)
107107
.overlay(
108108
RoundedRectangle(cornerRadius: 4, style: .continuous)

0 commit comments

Comments
 (0)