How to get the source lists selection highlight to use the Dark Vibrancy appearance in OS X 10.10?

前端 未结 4 1067
走了就别回头了
走了就别回头了 2020-12-28 22:20

In OS X 10.10 source lists seem to use the light vibrancy appearance. In the Finder (and in some other third party applications, Things.app for example) the selecte

4条回答
  •  伪装坚强ぢ
    2020-12-28 22:54

    Here is the Swift equivalent :

    func outlineView(_ outlineView: NSOutlineView, rowViewForItem item: Any) -> NSTableRowView? {
        return CustomTableRowView(frame: NSZeroRect);
    }
    

    And the subclass of NSTableRowView

    import Cocoa
    
    class CustomTableRowView: NSTableRowView {
    
        override var isEmphasized: Bool {
            set {}
            get {
                return false;
            }
        }
    
    }
    

提交回复
热议问题