From ea119a72e84717076c79b176f83cc0371a80ca0b Mon Sep 17 00:00:00 2001 From: 1024jp <1024jp@wolfrosch.com> Date: Fri, 14 Jun 2024 12:57:43 +0900 Subject: [PATCH] Disable color picker when using system color --- CHANGELOG.md | 1 + CotEditor/Sources/ThemeEditorView.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d0ce9be3..459cd85d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Implements - Update the Markdown syntax to fix highlighting strikethrough. +- Disable color wells in the theme editor when they use the system color. - Improve the User Guide contents. - [non-AppStore ver.] Update Sparkle from 2.6.2 to 2.6.3. diff --git a/CotEditor/Sources/ThemeEditorView.swift b/CotEditor/Sources/ThemeEditorView.swift index 02400c9c8..147c34267 100644 --- a/CotEditor/Sources/ThemeEditorView.swift +++ b/CotEditor/Sources/ThemeEditorView.swift @@ -169,6 +169,7 @@ private struct SystemColorPicker: View { Text(self.label) .accessibilityLabeledPair(role: .label, id: "color", in: self.accessibility) } + .disabled(self.selection.usesSystemSetting) Toggle(String(localized: "Use system color", table: "ThemeEditor", comment: "toggle button label"), isOn: $selection.usesSystemSetting) .controlSize(.small) .accessibilityLabeledPair(role: .content, id: "color", in: self.accessibility)