// // KMOutlineView.swift // PDF Reader Pro // // Created by lxy on 2022/10/18. // import Cocoa enum KMOutlineViewExpandItemType: Int { case none case expand case collapse } class KMOutlineView: KMTocOutlineView { override func makeView(withIdentifier identifier: NSUserInterfaceItemIdentifier, owner: Any?) -> NSView? { let view = super.makeView(withIdentifier: identifier, owner: owner) if identifier == NSOutlineView.disclosureButtonIdentifier { (view as! NSButton).image = NSImage(named: "btn_arrow_gray_right_s_norm_on") (view as! NSButton).alternateImage = NSImage(named: "btn_arrow_gray_down_s_norm_on") (view as! NSButton).isBordered = false (view as! NSButton).title = "" } return view } override func frameOfOutlineCell(atRow row: Int) -> NSRect { return NSZeroRect } }