Standard highlighting color in OS X applications is blue.
Is it possible to change it to another color, e.g. gray?
Note that I am using the new view-based
Okay, So I do know that it already has an accepted answer, but for anyone like me working with an NSOutlineView
and has .selectionHighlightStyle = .sourceList
can use this code to make the selection grey. This method will not flicker when changing the selection and will also stay grey if the app is minimised.
NSTableView/NSOutlineView Delegate:
func outlineView(_ outlineView: NSOutlineView, rowViewForItem item: Any) -> NSTableRowView?
{
let row : CustomRowView = CustomRowView.init()
row.identifier = "row"
return row
}
And then create a new CustomRowView.swift
file with this:
class CustomRowView : NSTableRowView
{
override var isEmphasized: Bool {
get { return self.isEmphasized }
set(isEmp) { self.isEmphasized = false }
}
}
This will keep the selection grey at all times.