Skip to content

Commit 1884f21

Browse files
Fix even Alignment buttons
1 parent 5c6eb4c commit 1884f21

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/RichTextKit/Actions/RichTextAction+Button.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ public extension RichTextAction {
1818
*/
1919
struct Button: View {
2020

21+
#if macOS
22+
private let systemSpecificTextColor: Color? = Color(NSColor.textColor)
23+
#else
24+
private let systemSpecificTextColor: Color? = nil
25+
#endif
26+
2127
/**
2228
Create a rich text action button.
2329

@@ -48,6 +54,7 @@ public extension RichTextAction {
4854
.labelStyle(.iconOnly)
4955
.frame(maxHeight: fillVertically ? .infinity : nil)
5056
.contentShape(Rectangle())
57+
.foregroundColor(systemSpecificTextColor)
5158
}
5259
.keyboardShortcut(for: action)
5360
.disabled(!context.canHandle(action))

0 commit comments

Comments
 (0)