feat(settings): 新增三语即时切换并记录验收与专项边界

This commit is contained in:
2026-10-30 01:30:50 +08:00
parent a871d7046e
commit 1cb67b86e8
18 changed files with 285 additions and 11 deletions
+2 -1
View File
@@ -5,14 +5,15 @@ import AppKit
struct CustomColorWell: NSViewRepresentable {
let preferences: AppearancePreferences
let picker: CustomColorPicker
@Environment(\.locale) private var locale
func makeNSView(context: Context) -> SwatchButton {
let button = SwatchButton()
button.setAccessibilityLabel(String(localized: "accent.custom"))
return button
}
func updateNSView(_ button: SwatchButton, context: Context) {
button.setAccessibilityLabel(AppLocalization.string("accent.custom", locale: locale))
button.open = { picker.show(for: preferences) }
button.swatchColor = NSColor(srgbRed: preferences.red, green: preferences.green, blue: preferences.blue, alpha: 1)
}