mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Improve display of blank albums
* Add dark and light blank album image variants * Use CALayer to draw rounded corners and a tinted border on each album cover
This commit is contained in:
parent
891d08cfff
commit
eeb776199b
@ -1,12 +1,35 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"filename" : "blankAlbum.pdf"
|
"filename" : "blankAlbumLight-1.pdf",
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "light"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "blankAlbumDark.pdf",
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"version" : 1,
|
||||||
"author" : "xcode"
|
"author" : "xcode"
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"template-rendering-intent" : "original",
|
||||||
|
"preserves-vector-representation" : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
Persephone/Assets.xcassets/blankAlbum.imageset/blankAlbumDark.pdf
vendored
Normal file
BIN
Persephone/Assets.xcassets/blankAlbum.imageset/blankAlbumDark.pdf
vendored
Normal file
Binary file not shown.
Binary file not shown.
@ -9,7 +9,9 @@
|
|||||||
<customObject id="-2" userLabel="File's Owner" customClass="AlbumItem" customModule="Persephone" customModuleProvider="target">
|
<customObject id="-2" userLabel="File's Owner" customClass="AlbumItem" customModule="Persephone" customModuleProvider="target">
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="albumArtist" destination="5Uu-j1-qyT" id="2Et-tX-InT"/>
|
<outlet property="albumArtist" destination="5Uu-j1-qyT" id="2Et-tX-InT"/>
|
||||||
|
<outlet property="albumCoverView" destination="Kfb-8f-ean" id="ZAL-jD-lHj"/>
|
||||||
<outlet property="albumTitle" destination="KEh-NL-c2W" id="SI3-hm-H2B"/>
|
<outlet property="albumTitle" destination="KEh-NL-c2W" id="SI3-hm-H2B"/>
|
||||||
|
<outlet property="imageView" destination="Kfb-8f-ean" id="Ur0-hX-wJm"/>
|
||||||
<outlet property="view" destination="Hz6-mo-xeY" id="v7W-XA-Emc"/>
|
<outlet property="view" destination="Hz6-mo-xeY" id="v7W-XA-Emc"/>
|
||||||
</connections>
|
</connections>
|
||||||
</customObject>
|
</customObject>
|
||||||
|
|||||||
@ -9,9 +9,16 @@
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
class AlbumItem: NSCollectionViewItem {
|
class AlbumItem: NSCollectionViewItem {
|
||||||
|
let albumCoverBorderColor = NSColor.init(calibratedWhite: 1, alpha: 0.1)
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
// Do view setup here.
|
// Do view setup here.
|
||||||
|
|
||||||
|
albumCoverView.wantsLayer = true
|
||||||
|
albumCoverView.layer?.cornerRadius = 3
|
||||||
|
albumCoverView.layer?.borderWidth = 1
|
||||||
|
albumCoverView.layer?.borderColor = albumCoverBorderColor.cgColor
|
||||||
}
|
}
|
||||||
|
|
||||||
func setAlbum(_ album: MPDClient.Album) {
|
func setAlbum(_ album: MPDClient.Album) {
|
||||||
@ -19,6 +26,7 @@ class AlbumItem: NSCollectionViewItem {
|
|||||||
albumArtist.stringValue = album.artist
|
albumArtist.stringValue = album.artist
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IBOutlet var albumCoverView: NSImageView!
|
||||||
@IBOutlet var albumTitle: NSTextField!
|
@IBOutlet var albumTitle: NSTextField!
|
||||||
@IBOutlet var albumArtist: NSTextField!
|
@IBOutlet var albumArtist: NSTextField!
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Resources/export/blankAlbumDark.pdf
Normal file
BIN
Resources/export/blankAlbumDark.pdf
Normal file
Binary file not shown.
BIN
Resources/export/blankAlbumDark.png
Normal file
BIN
Resources/export/blankAlbumDark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 982 B |
BIN
Resources/export/blankAlbumDark@2x.png
Normal file
BIN
Resources/export/blankAlbumDark@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Resources/export/blankAlbumLight.pdf
Normal file
BIN
Resources/export/blankAlbumLight.pdf
Normal file
Binary file not shown.
BIN
Resources/export/blankAlbumLight.png
Normal file
BIN
Resources/export/blankAlbumLight.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 976 B |
BIN
Resources/export/blankAlbumLight@2x.png
Normal file
BIN
Resources/export/blankAlbumLight@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue
Block a user