From 73d6c487a89ba983e004f8dc161acca2d1b1488c Mon Sep 17 00:00:00 2001 From: Dominik Bucher Date: Mon, 22 Jan 2024 09:02:52 +0100 Subject: [PATCH] Fix even Alignment buttons --- Sources/RichTextKit/Actions/RichTextAction+Button.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/RichTextKit/Actions/RichTextAction+Button.swift b/Sources/RichTextKit/Actions/RichTextAction+Button.swift index 18e422315..7a742dcc7 100644 --- a/Sources/RichTextKit/Actions/RichTextAction+Button.swift +++ b/Sources/RichTextKit/Actions/RichTextAction+Button.swift @@ -18,6 +18,12 @@ public extension RichTextAction { */ struct Button: View { + #if macOS + private let systemSpecificTextColor: Color? = Color(NSColor.textColor) + #else + private let systemSpecificTextColor: Color? = nil + #endif + /** Create a rich text action button. @@ -47,6 +53,7 @@ public extension RichTextAction { action.icon .frame(maxHeight: fillVertically ? .infinity : nil) .contentShape(Rectangle()) + .foregroundColor(systemSpecificTextColor) } .keyboardShortcut(for: action) .accessibilityLabel(action.title)