// // KMBotaTableRowView.swift // PDF Reader Pro // // Created by tangchao on 2023/11/28. // import Cocoa class KMBotaTableRowView: NSTableRowView { convenience init() { self.init(frame: .zero) self.addTrackingArea() } override func draw(_ dirtyRect: NSRect) { super.draw(dirtyRect) // Drawing code here. } func addTrackingArea() { let trackingArea = NSTrackingArea(rect: self.bounds, options: [.mouseEnteredAndExited, .inVisibleRect, .activeAlways, .mouseMoved], owner: self, userInfo: nil) self.addTrackingArea(trackingArea) } override func drawSelection(in dirtyRect: NSRect) { let selectionRect = self.bounds KMAppearance.Status.selColor().setFill() let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 0, yRadius: 0) selectionRect.fill() } }