PrefUI & PrefWindow // Enable certain new font sizes.

This commit is contained in:
ShikiSuen 2022-08-22 09:45:19 +08:00
parent 018e07493e
commit a2a9f7fbde
2 changed files with 8 additions and 8 deletions

View File

@ -52,6 +52,8 @@ struct suiPrefPaneGeneral: View {
} }
}() }()
let enabledFontSizes = [12, 14, 16, 17, 18, 20, 22, 24, 32, 64, 96]
var body: some View { var body: some View {
ScrollView { ScrollView {
Preferences.Container(contentWidth: contentWidth) { Preferences.Container(contentWidth: contentWidth) {
@ -62,14 +64,9 @@ struct suiPrefPaneGeneral: View {
mgrPrefs.candidateListTextSize = CGFloat(selCandidateUIFontSize) mgrPrefs.candidateListTextSize = CGFloat(selCandidateUIFontSize)
} }
) { ) {
Text("12").tag(12) ForEach(0...(enabledFontSizes.count - 1), id: \.self) { id in
Text("14").tag(14) Text(String(enabledFontSizes[id])).tag(enabledFontSizes[id])
Text("16").tag(16) }.id(UUID())
Text("18").tag(18)
Text("24").tag(24)
Text("32").tag(32)
Text("64").tag(64)
Text("96").tag(96)
} }
.labelsHidden() .labelsHidden()
.frame(width: 120.0) .frame(width: 120.0)

View File

@ -252,7 +252,10 @@
<menuItem title="12" tag="12" id="93"/> <menuItem title="12" tag="12" id="93"/>
<menuItem title="14" tag="14" id="94"/> <menuItem title="14" tag="14" id="94"/>
<menuItem title="16" tag="16" id="95"/> <menuItem title="16" tag="16" id="95"/>
<menuItem title="17" tag="17" id="utP-KB-Eku"/>
<menuItem title="18" state="on" tag="18" id="96"/> <menuItem title="18" state="on" tag="18" id="96"/>
<menuItem title="20" tag="20" id="VXR-P6-Ipf"/>
<menuItem title="22" tag="22" id="EtM-QP-Muf"/>
<menuItem title="24" tag="24" id="98"/> <menuItem title="24" tag="24" id="98"/>
<menuItem title="32" tag="32" id="99"/> <menuItem title="32" tag="32" id="99"/>
<menuItem title="64" tag="64" id="100"/> <menuItem title="64" tag="64" id="100"/>