12345678910111213141516171819202122232425262728293031323334 |
- //
- // 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()
- }
- }
|