From 7af6eb7cfb2701c08295742b36663546aae58269 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 30 Aug 2023 22:46:26 +0800 Subject: [PATCH] UserDefaults // +alwaysExpandCandidateWindow(). --- .../Sources/MainAssembly/PrefMgr_Core.swift | 3 +++ .../Sources/Shared/Protocols/PrefMgrProtocol.swift | 1 + Packages/vChewing_Shared/Sources/Shared/Shared.swift | 1 + 3 files changed, 5 insertions(+) diff --git a/Packages/vChewing_MainAssembly/Sources/MainAssembly/PrefMgr_Core.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/PrefMgr_Core.swift index bec78ad5..6d416b0c 100644 --- a/Packages/vChewing_MainAssembly/Sources/MainAssembly/PrefMgr_Core.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/PrefMgr_Core.swift @@ -82,6 +82,9 @@ import SwiftExtension } } + @AppProperty(key: UserDef.kAlwaysExpandCandidateWindow.rawValue, defaultValue: false) + public dynamic var alwaysExpandCandidateWindow: Bool + @AppProperty(key: UserDef.kCandidateWindowShowOnlyOneLine.rawValue, defaultValue: false) public dynamic var candidateWindowShowOnlyOneLine: Bool diff --git a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift index a3d61afe..63560a36 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift @@ -23,6 +23,7 @@ public protocol PrefMgrProtocol { var alphanumericalKeyboardLayout: String { get set } var showNotificationsWhenTogglingCapsLock: Bool { get set } var candidateListTextSize: Double { get set } + var alwaysExpandCandidateWindow: Bool { get set } var candidateWindowShowOnlyOneLine: Bool { get set } var shouldAutoReloadUserDataFiles: Bool { get set } var useRearCursorMode: Bool { get set } diff --git a/Packages/vChewing_Shared/Sources/Shared/Shared.swift b/Packages/vChewing_Shared/Sources/Shared/Shared.swift index 91f0c7f6..7ee84e86 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Shared.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Shared.swift @@ -25,6 +25,7 @@ public enum UserDef: String, CaseIterable { case kAlphanumericalKeyboardLayout = "AlphanumericalKeyboardLayout" case kShowNotificationsWhenTogglingCapsLock = "ShowNotificationsWhenTogglingCapsLock" case kCandidateListTextSize = "CandidateListTextSize" + case kAlwaysExpandCandidateWindow = "AlwaysExpandCandidateWindow" case kCandidateWindowShowOnlyOneLine = "CandidateWindowShowOnlyOneLine" case kAppleLanguages = "AppleLanguages" case kShouldAutoReloadUserDataFiles = "ShouldAutoReloadUserDataFiles"