mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
* Add cover art for each track * Stack song title and artist * Add song duration * Redesign the dragged image view to match
26 lines
646 B
Swift
26 lines
646 B
Swift
//
|
|
// QueueSongTitleView.swift
|
|
// Persephone
|
|
//
|
|
// Created by Daniel Barber on 2019/5/10.
|
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
|
//
|
|
|
|
import AppKit
|
|
|
|
class QueueSongInfoView: NSTableCellView {
|
|
@IBOutlet var queueSongTitle: NSTextField!
|
|
@IBOutlet var queueSongArtist: NSTextField!
|
|
|
|
func setSong(_ queueItem: QueueItem, queueIcon: NSImage?) {
|
|
queueSongTitle?.stringValue = queueItem.song.title
|
|
queueSongArtist?.stringValue = queueItem.song.artist
|
|
|
|
if queueItem.isPlaying && queueIcon != nil {
|
|
queueSongTitle?.font = .systemFontBold
|
|
} else {
|
|
queueSongTitle?.font = .systemFontRegular
|
|
}
|
|
}
|
|
}
|