Skip to content

Commit 2dbcdd5

Browse files
committed
Fix Project Navigator Tint Bug
1 parent 78984c1 commit 2dbcdd5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CodeEdit/Features/NavigatorArea/ProjectNavigator/OutlineView/ProjectNavigatorViewController+NSOutlineViewDelegate.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,17 @@ extension ProjectNavigatorViewController: NSOutlineViewDelegate {
181181
}
182182
return ""
183183
}
184+
185+
func outlineView(_ outlineView: NSOutlineView, tintConfigurationForItem item: Any) -> NSTintConfiguration? {
186+
NSTintConfiguration(fixedColor: NSColor(name: nil, dynamicProvider: { appearance in
187+
switch appearance.name {
188+
case .darkAqua, .vibrantDark:
189+
.white
190+
case .aqua, .vibrantLight:
191+
.black
192+
default:
193+
.black
194+
}
195+
}))
196+
}
184197
}

0 commit comments

Comments
 (0)