1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00
persephone/Persephone/Components/Queue/QueueSongInfoView.swift
Daniel Barber a8987029f5
Redesign queue view
* Add cover art for each track
* Stack song title and artist
* Add song duration
* Redesign the dragged image view to match
2020-01-22 22:23:59 -05:00

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
}
}
}