Skip to content

Commit

Permalink
Fix even Alignment buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikBucher12 committed Jan 22, 2024
1 parent 6a6ce30 commit 73d6c48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/RichTextKit/Actions/RichTextAction+Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -47,6 +53,7 @@ public extension RichTextAction {
action.icon
.frame(maxHeight: fillVertically ? .infinity : nil)
.contentShape(Rectangle())
.foregroundColor(systemSpecificTextColor)
}
.keyboardShortcut(for: action)
.accessibilityLabel(action.title)
Expand Down

0 comments on commit 73d6c48

Please sign in to comment.