1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00
persephone/Mac/Components/Browser/Album Detail/AlbumDetailSongRowView.swift

28 lines
748 B
Swift

//
// AlbumDetailSongRowView.swift
// Persephone
//
// Created by Daniel Barber on 2019/5/22.
// Copyright © 2019 Dan Barber. All rights reserved.
//
import AppKit
class AlbumDetailSongRowView: NSTableRowView {
override func drawBackground(in dirtyRect: NSRect) {
let borderPath = CGMutablePath()
let startingPoint = CGPoint(x: dirtyRect.origin.x, y: dirtyRect.height)
let endingPoint = CGPoint(x: dirtyRect.width, y: dirtyRect.height)
borderPath.move(to: startingPoint)
borderPath.addLine(to: endingPoint)
let shapeLayer = CAShapeLayer()
self.layer?.addSublayer(shapeLayer)
shapeLayer.path = borderPath
shapeLayer.strokeColor = NSColor.secondaryLabelColor.cgColor
shapeLayer.lineWidth = 1
}
}