Skip to content

Commit

Permalink
Fix tests + tint
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikBucher12 committed Jan 22, 2024
1 parent 776f428 commit c285da3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/RichTextKit/Styles/RichTextStyleToggle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public struct RichTextStyleToggle: View {
Toggle(isOn: value) {
style.icon
.frame(maxHeight: fillVertically ? .infinity : nil)
.foregroundColor(tintColor)
}
.tint(tintColor)
.keyboardShortcut(for: style)
.accessibilityLabel(style.title)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ final class RichTextAlignment_PickerTests: XCTestCase {
let picker = RichTextAlignment.Picker(
selection: .constant(.left))

XCTAssertEqual(picker.style.iconColor, .primary)
#if macOS
XCTAssertEqual(picker.style.iconColor, Color(NSColor.textColor))
#else
XCTAssertEqual(picker.style.iconColor, nil)
#endif

XCTAssertEqual(picker.values, RichTextAlignment.allCases)
}
}

0 comments on commit c285da3

Please sign in to comment.