From a2a9f7fbde73d427be1d926c4a91545e5bda51ea Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 22 Aug 2022 09:45:19 +0800 Subject: [PATCH] PrefUI & PrefWindow // Enable certain new font sizes. --- .../UIModules/PrefUI/suiPrefPaneGeneral.swift | 13 +++++-------- Source/WindowNIBs/Base.lproj/frmPrefWindow.xib | 3 +++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift index 50288c73..cdef3340 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift @@ -52,6 +52,8 @@ struct suiPrefPaneGeneral: View { } }() + let enabledFontSizes = [12, 14, 16, 17, 18, 20, 22, 24, 32, 64, 96] + var body: some View { ScrollView { Preferences.Container(contentWidth: contentWidth) { @@ -62,14 +64,9 @@ struct suiPrefPaneGeneral: View { mgrPrefs.candidateListTextSize = CGFloat(selCandidateUIFontSize) } ) { - Text("12").tag(12) - Text("14").tag(14) - Text("16").tag(16) - Text("18").tag(18) - Text("24").tag(24) - Text("32").tag(32) - Text("64").tag(64) - Text("96").tag(96) + ForEach(0...(enabledFontSizes.count - 1), id: \.self) { id in + Text(String(enabledFontSizes[id])).tag(enabledFontSizes[id]) + }.id(UUID()) } .labelsHidden() .frame(width: 120.0) diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 942aacf5..1e711983 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -252,7 +252,10 @@ + + +