PrefUI // Boost SwiftUI requirements to macOS 13.
This commit is contained in:
parent
f81f2d3b43
commit
fa979137df
|
@ -13,18 +13,17 @@ import LangModelAssembly
|
|||
import Shared
|
||||
import SwiftExtension
|
||||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
private let loc: String =
|
||||
(UserDefaults.current.array(forKey: UserDef.kAppleLanguages.rawValue) as? [String] ?? ["auto"])[0]
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
extension VwrPhraseEditorUI {
|
||||
@Backport.AppStorage("PhraseEditorAutoReloadExternalModifications")
|
||||
@AppStorage("PhraseEditorAutoReloadExternalModifications")
|
||||
private static var autoReloadExternalModifications: Bool = true
|
||||
}
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
public struct VwrPhraseEditorUI: View {
|
||||
static var txtContentStorage: String = NSLocalizedString(
|
||||
"Please select Simplified / Traditional Chinese mode above.", comment: ""
|
||||
|
@ -235,16 +234,10 @@ public struct VwrPhraseEditorUI: View {
|
|||
Button("Consolidate") {
|
||||
consolidate()
|
||||
}.disabled(selInputMode == .imeModeNULL || isLoading)
|
||||
if #available(macOS 11.0, *) {
|
||||
Button("Save") {
|
||||
DispatchQueue.main.async { saveAndReload() }
|
||||
}.keyboardShortcut("s", modifiers: [.command])
|
||||
.disabled(delegate == nil)
|
||||
} else {
|
||||
Button("Save") {
|
||||
DispatchQueue.main.async { saveAndReload() }
|
||||
}
|
||||
}
|
||||
Button("Save") {
|
||||
DispatchQueue.main.async { saveAndReload() }
|
||||
}.keyboardShortcut("s", modifiers: [.command])
|
||||
.disabled(delegate == nil)
|
||||
Button("...") {
|
||||
DispatchQueue.main.async {
|
||||
saveAndReload()
|
||||
|
@ -256,7 +249,7 @@ public struct VwrPhraseEditorUI: View {
|
|||
TextEditorEX(text: $txtContent)
|
||||
.disabled(selInputMode == .imeModeNULL || isLoading)
|
||||
.frame(minWidth: 320, minHeight: 240)
|
||||
.backport.onChange(of: fileChangeIndicator.id) { _ in
|
||||
.onChange(of: fileChangeIndicator.id) { _ in
|
||||
if Self.autoReloadExternalModifications { update() }
|
||||
}
|
||||
|
||||
|
@ -291,18 +284,13 @@ public struct VwrPhraseEditorUI: View {
|
|||
}
|
||||
}.disabled(selInputMode == Shared.InputMode.imeModeNULL || isLoading)
|
||||
HStack {
|
||||
if #available(macOS 12, *) {
|
||||
Toggle(
|
||||
LocalizedStringKey("This editor only: Auto-reload modifications happened outside of this editor"),
|
||||
isOn: $selAutoReloadExternalModifications.onChange {
|
||||
Self.autoReloadExternalModifications = selAutoReloadExternalModifications
|
||||
}
|
||||
)
|
||||
.controlSize(.small)
|
||||
} else {
|
||||
Text("Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations.")
|
||||
.font(.system(size: 11.0)).foregroundColor(.secondary)
|
||||
}
|
||||
Toggle(
|
||||
LocalizedStringKey("This editor only: Auto-reload modifications happened outside of this editor"),
|
||||
isOn: $selAutoReloadExternalModifications.onChange {
|
||||
Self.autoReloadExternalModifications = selAutoReloadExternalModifications
|
||||
}
|
||||
)
|
||||
.controlSize(.small)
|
||||
Spacer()
|
||||
}
|
||||
}.onDisappear {
|
||||
|
@ -319,7 +307,7 @@ public struct VwrPhraseEditorUI: View {
|
|||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPhraseEditorUI()
|
||||
|
|
|
@ -16,7 +16,7 @@ private let kWindowTitleHeight: Double = 78
|
|||
|
||||
// InputMethodServerPreferencesWindowControllerClass 非必需。
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
class CtlPrefUI: NSWindowController, NSWindowDelegate {
|
||||
public static var shared: CtlPrefUI?
|
||||
|
||||
|
@ -47,13 +47,11 @@ class CtlPrefUI: NSWindowController, NSWindowDelegate {
|
|||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
window?.setPosition(vertical: .top, horizontal: .right, padding: 20)
|
||||
if #available(macOS 13, *) {
|
||||
window?.contentView = NSHostingView(
|
||||
rootView: VwrSettingsUI()
|
||||
.fixedSize(horizontal: true, vertical: false)
|
||||
.ignoresSafeArea()
|
||||
)
|
||||
}
|
||||
window?.contentView = NSHostingView(
|
||||
rootView: VwrSettingsUI()
|
||||
.fixedSize(horizontal: true, vertical: false)
|
||||
.ignoresSafeArea()
|
||||
)
|
||||
let toolbar = NSToolbar(identifier: "preference toolbar")
|
||||
toolbar.allowsUserCustomization = false
|
||||
toolbar.autosavesConfiguration = false
|
||||
|
@ -61,9 +59,7 @@ class CtlPrefUI: NSWindowController, NSWindowDelegate {
|
|||
toolbar.delegate = self
|
||||
toolbar.selectedItemIdentifier = nil
|
||||
toolbar.showsBaselineSeparator = true
|
||||
if #available(macOS 11, *) {
|
||||
window?.toolbarStyle = .unifiedCompact
|
||||
}
|
||||
window?.toolbarStyle = .unifiedCompact
|
||||
window?.toolbar = toolbar
|
||||
var preferencesTitleName = NSLocalizedString("vChewing Preferences…", comment: "")
|
||||
preferencesTitleName.removeLast()
|
||||
|
@ -73,7 +69,7 @@ class CtlPrefUI: NSWindowController, NSWindowDelegate {
|
|||
|
||||
// MARK: - NSToolbarDelegate.
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
extension CtlPrefUI: NSToolbarDelegate {
|
||||
var toolbarIdentifiers: [NSToolbarItem.Identifier] {
|
||||
[.init("Collapse or Expand Sidebar")]
|
||||
|
@ -96,9 +92,7 @@ extension CtlPrefUI: NSToolbarDelegate {
|
|||
willBeInsertedIntoToolbar _: Bool
|
||||
) -> NSToolbarItem? {
|
||||
let item = NSToolbarItem(itemIdentifier: itemIdentifier)
|
||||
if #available(macOS 11.0, *) {
|
||||
item.isNavigational = true
|
||||
}
|
||||
item.isNavigational = true
|
||||
item.target = window?.firstResponder
|
||||
item.image = NSImage(named: "NSTouchBarSidebarTemplate") ?? .init()
|
||||
item.tag = 0
|
||||
|
@ -106,3 +100,40 @@ extension CtlPrefUI: NSToolbarDelegate {
|
|||
return item
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Shared Static Variables and Constants
|
||||
|
||||
@available(macOS 13, *)
|
||||
extension CtlPrefUI {
|
||||
static let sentenceSeparator: String = {
|
||||
switch PrefMgr.shared.appleLanguages[0] {
|
||||
case "ja":
|
||||
return ""
|
||||
default:
|
||||
if PrefMgr.shared.appleLanguages[0].contains("zh-Han") {
|
||||
return ""
|
||||
} else {
|
||||
return " "
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
static let contentMaxHeight: Double = 490
|
||||
|
||||
static let formWidth: Double = {
|
||||
switch PrefMgr.shared.appleLanguages[0] {
|
||||
case "ja":
|
||||
return 520
|
||||
default:
|
||||
if PrefMgr.shared.appleLanguages[0].contains("zh-Han") {
|
||||
return 500
|
||||
} else {
|
||||
return 580
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
static var isCJKInterface: Bool {
|
||||
PrefMgr.shared.appleLanguages[0].contains("zh-Han") || PrefMgr.shared.appleLanguages[0] == "ja"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import MainAssembly
|
|||
import SwiftExtension
|
||||
import SwiftUI
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
extension PrefUITabs {
|
||||
@ViewBuilder
|
||||
var suiView: some View {
|
||||
|
@ -28,46 +28,6 @@ extension PrefUITabs {
|
|||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
class CtlPrefUIShared {
|
||||
static var sharedWindow: NSWindow? {
|
||||
CtlPrefUI.shared?.window
|
||||
}
|
||||
|
||||
static let shared = CtlPrefUIShared()
|
||||
static let sentenceSeparator: String = {
|
||||
switch PrefMgr.shared.appleLanguages[0] {
|
||||
case "ja":
|
||||
return ""
|
||||
default:
|
||||
if PrefMgr.shared.appleLanguages[0].contains("zh-Han") {
|
||||
return ""
|
||||
} else {
|
||||
return " "
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
static let contentMaxHeight: Double = 490
|
||||
|
||||
static let formWidth: Double = {
|
||||
switch PrefMgr.shared.appleLanguages[0] {
|
||||
case "ja":
|
||||
return 520
|
||||
default:
|
||||
if PrefMgr.shared.appleLanguages[0].contains("zh-Han") {
|
||||
return 500
|
||||
} else {
|
||||
return 580
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
static var isCJKInterface: Bool {
|
||||
PrefMgr.shared.appleLanguages[0].contains("zh-Han") || PrefMgr.shared.appleLanguages[0] == "ja"
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
public extension View {
|
||||
func settingsDescription(maxWidth: CGFloat? = .infinity) -> some View {
|
||||
|
|
|
@ -12,7 +12,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneBehavior: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -217,7 +217,7 @@ struct VwrPrefPaneBehavior: View {
|
|||
)
|
||||
Spacer()
|
||||
Text(
|
||||
"This feature requires macOS 10.15 and above.".localized + CtlPrefUIShared.sentenceSeparator
|
||||
"This feature requires macOS 10.15 and above.".localized + CtlPrefUI.sentenceSeparator
|
||||
+ "This feature only needs to parse consecutive NSEvents passed by macOS built-in InputMethodKit framework, hence no necessity of asking end-users for extra privileges of monitoring global keyboard inputs. You are free to investigate our codebase or reverse-engineer this input method to see whether the above statement is trustable.".localized
|
||||
)
|
||||
.settingsDescription()
|
||||
|
@ -251,13 +251,13 @@ struct VwrPrefPaneBehavior: View {
|
|||
.settingsDescription()
|
||||
}
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneBehavior_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneBehavior()
|
||||
|
|
|
@ -12,7 +12,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneCandidates: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -190,13 +190,13 @@ struct VwrPrefPaneCandidates: View {
|
|||
isOn: $enableMouseScrollingForTDKCandidatesCocoa
|
||||
)
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneCandidates_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneCandidates()
|
||||
|
@ -205,7 +205,7 @@ struct VwrPrefPaneCandidates_Previews: PreviewProvider {
|
|||
|
||||
// MARK: - Selection Key Preferences (View)
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
private struct VwrPrefPaneCandidates_SelectionKeys: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneCassette: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -185,13 +185,13 @@ struct VwrPrefPaneCassette: View {
|
|||
.settingsDescription()
|
||||
}
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneCassette_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneDictionary()
|
||||
|
|
|
@ -11,7 +11,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneDevZone: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -56,13 +56,13 @@ struct VwrPrefPaneDevZone: View {
|
|||
.settingsDescription()
|
||||
}
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneDevZone_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneDevZone()
|
||||
|
|
|
@ -14,7 +14,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneDictionary: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -232,13 +232,13 @@ struct VwrPrefPaneDictionary: View {
|
|||
.settingsDescription()
|
||||
}
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneDictionary_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneDictionary()
|
||||
|
|
|
@ -12,7 +12,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneGeneral: View {
|
||||
@Binding var appleLanguageTag: String
|
||||
|
||||
|
@ -137,10 +137,8 @@ struct VwrPrefPaneGeneral: View {
|
|||
let alert = NSAlert(error: NSLocalizedString("Warning", comment: ""))
|
||||
alert.informativeText = content
|
||||
alert.addButton(withTitle: NSLocalizedString("Uncheck", comment: ""))
|
||||
if #available(macOS 11, *) {
|
||||
alert.buttons.forEach { button in
|
||||
button.hasDestructiveAction = true
|
||||
}
|
||||
alert.buttons.forEach { button in
|
||||
button.hasDestructiveAction = true
|
||||
}
|
||||
alert.addButton(withTitle: NSLocalizedString("Leave it checked", comment: ""))
|
||||
if let window = CtlPrefUI.shared?.window, !shouldNotFartInLieuOfBeep {
|
||||
|
@ -175,13 +173,13 @@ struct VwrPrefPaneGeneral: View {
|
|||
isOn: $isDebugModeEnabled
|
||||
)
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneGeneral_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneGeneral()
|
||||
|
|
|
@ -13,7 +13,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneKeyboard: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -125,13 +125,13 @@ struct VwrPrefPaneKeyboard: View {
|
|||
Section(header: Text("Keyboard Shortcuts:")) {
|
||||
VwrPrefPaneKeyboard_KeyboardShortcuts()
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
private struct VwrPrefPaneKeyboard_KeyboardShortcuts: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -218,7 +218,7 @@ private struct VwrPrefPaneKeyboard_KeyboardShortcuts: View {
|
|||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneKeyboard_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneKeyboard()
|
||||
|
|
|
@ -11,7 +11,7 @@ import SwiftExtension
|
|||
import SwiftUI
|
||||
import SwiftUIBackports
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneOutput: View {
|
||||
// MARK: - AppStorage Variables
|
||||
|
||||
|
@ -73,13 +73,13 @@ struct VwrPrefPaneOutput: View {
|
|||
.settingsDescription()
|
||||
}
|
||||
}
|
||||
}.formStyled().frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
}.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPaneOutput_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPaneOutput()
|
||||
|
|
|
@ -12,7 +12,7 @@ import Shared
|
|||
import SwiftExtension
|
||||
import SwiftUI
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPanePhrases: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
|
@ -26,13 +26,13 @@ struct VwrPrefPanePhrases: View {
|
|||
}
|
||||
.padding(4)
|
||||
.padding()
|
||||
.frame(minWidth: CtlPrefUIShared.formWidth, maxWidth: ceil(CtlPrefUIShared.formWidth * 1.2))
|
||||
.frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2))
|
||||
}
|
||||
.frame(maxHeight: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(maxHeight: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 11.0, *)
|
||||
@available(macOS 13, *)
|
||||
struct VwrPrefPanePhrases_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VwrPrefPanePhrases()
|
||||
|
|
|
@ -47,6 +47,6 @@ public struct VwrSettingsUI: View {
|
|||
.frame(minWidth: 128, idealWidth: 128, maxWidth: 128)
|
||||
PrefUITabs.tabGeneral.suiView
|
||||
}
|
||||
.frame(width: CtlPrefUIShared.formWidth + 140, height: CtlPrefUIShared.contentMaxHeight)
|
||||
.frame(width: CtlPrefUI.formWidth + 140, height: CtlPrefUI.contentMaxHeight)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue