diff --git a/TagTunes/AlbumTableCellView.swift b/TagTunes/AlbumTableCellView.swift index d32670d..50e4da4 100644 --- a/TagTunes/AlbumTableCellView.swift +++ b/TagTunes/AlbumTableCellView.swift @@ -37,7 +37,7 @@ public class AlbumTableCellView: AdvancedTableCellView { /// Contains the *tick* image for saved albums. @IBOutlet public lazy var secondaryImageView: NSImageView! = { let secondaryImageView = NSImageView() - secondaryImageView.image = NSImage(named: "Tick") + secondaryImageView.image = NSImage(named: "Tick")?.imageByMaskingWithColor(NSColor.clearColor()) secondaryImageView.imageScaling = .ScaleProportionallyDown secondaryImageView.translatesAutoresizingMaskIntoConstraints = false return secondaryImageView diff --git a/TagTunes/Assets.xcassets/Cross.imageset/Contents.json b/TagTunes/Assets.xcassets/Cross.imageset/Contents.json index 994e581..6116d09 100644 --- a/TagTunes/Assets.xcassets/Cross.imageset/Contents.json +++ b/TagTunes/Assets.xcassets/Cross.imageset/Contents.json @@ -2,22 +2,14 @@ "images" : [ { "idiom" : "universal", - "filename" : "Cross.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "Cross-1.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "Cross-2.png", - "scale" : "3x" + "filename" : "Cross.pdf" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/TagTunes/Assets.xcassets/Cross.imageset/Cross-1.png b/TagTunes/Assets.xcassets/Cross.imageset/Cross-1.png deleted file mode 100644 index db8eb36..0000000 Binary files a/TagTunes/Assets.xcassets/Cross.imageset/Cross-1.png and /dev/null differ diff --git a/TagTunes/Assets.xcassets/Cross.imageset/Cross-2.png b/TagTunes/Assets.xcassets/Cross.imageset/Cross-2.png deleted file mode 100644 index db8eb36..0000000 Binary files a/TagTunes/Assets.xcassets/Cross.imageset/Cross-2.png and /dev/null differ diff --git a/TagTunes/Assets.xcassets/Cross.imageset/Cross.pdf b/TagTunes/Assets.xcassets/Cross.imageset/Cross.pdf new file mode 100644 index 0000000..fadda00 Binary files /dev/null and b/TagTunes/Assets.xcassets/Cross.imageset/Cross.pdf differ diff --git a/TagTunes/Assets.xcassets/Note.imageset/Contents.json b/TagTunes/Assets.xcassets/Note.imageset/Contents.json new file mode 100644 index 0000000..3cfb9af --- /dev/null +++ b/TagTunes/Assets.xcassets/Note.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Note.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +} \ No newline at end of file diff --git a/TagTunes/Assets.xcassets/Save.imageset/Contents.json b/TagTunes/Assets.xcassets/Save.imageset/Contents.json new file mode 100644 index 0000000..5134fa2 --- /dev/null +++ b/TagTunes/Assets.xcassets/Save.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Save.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +} \ No newline at end of file diff --git a/TagTunes/Assets.xcassets/Save.imageset/Save.pdf b/TagTunes/Assets.xcassets/Save.imageset/Save.pdf new file mode 100644 index 0000000..a98f3de --- /dev/null +++ b/TagTunes/Assets.xcassets/Save.imageset/Save.pdf @@ -0,0 +1,29 @@ +%PDF-1.4 +% +1 0 obj <>stream +x;N1 {ؓ\b+ +D8<(J|~k?5{<g=gW| /#SHd%!STGJMp_'0y>J$?JD&*XfHR+ [WX[]fIwj,ukz1DBcǺєF|mHaAa ɉ QjbJٱP6I(+01(f +EImKm0lj`2rŔ,hXT>S>ha>v v=,| ˮ/n?ŝO?2g=K= +endstream +endobj +3 0 obj<>/Parent 2 0 R/MediaBox[0 0 1024 1024]>> +endobj +2 0 obj<> +endobj +4 0 obj<> +endobj +5 0 obj<> +endobj +xref +0 6 +0000000000 65535 f +0000000015 00000 n +0000000543 00000 n +0000000403 00000 n +0000000593 00000 n +0000000637 00000 n +trailer +<]/Root 4 0 R/Size 6>> +startxref +842 +%%EOF diff --git a/TagTunes/Assets.xcassets/SaveToITunes.imageset/Contents.json b/TagTunes/Assets.xcassets/SaveToITunes.imageset/Contents.json deleted file mode 100644 index 0b5a487..0000000 --- a/TagTunes/Assets.xcassets/SaveToITunes.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "SaveToITunes.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "SaveToITunes-1.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "SaveToITunes-2.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TagTunes/Assets.xcassets/SaveToITunes.imageset/SaveToITunes-1.png b/TagTunes/Assets.xcassets/SaveToITunes.imageset/SaveToITunes-1.png deleted file mode 100644 index bcdb8da..0000000 Binary files a/TagTunes/Assets.xcassets/SaveToITunes.imageset/SaveToITunes-1.png and /dev/null differ diff --git a/TagTunes/Assets.xcassets/SaveToITunes.imageset/SaveToITunes-2.png b/TagTunes/Assets.xcassets/SaveToITunes.imageset/SaveToITunes-2.png deleted file mode 100644 index bcdb8da..0000000 Binary files a/TagTunes/Assets.xcassets/SaveToITunes.imageset/SaveToITunes-2.png and /dev/null differ diff --git a/TagTunes/Assets.xcassets/iTunes.imageset/Contents.json b/TagTunes/Assets.xcassets/iTunes.imageset/Contents.json deleted file mode 100644 index 4e7e267..0000000 --- a/TagTunes/Assets.xcassets/iTunes.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "iTunes-2.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "iTunes-1.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "iTunes.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TagTunes/Assets.xcassets/iTunes.imageset/iTunes-1.png b/TagTunes/Assets.xcassets/iTunes.imageset/iTunes-1.png deleted file mode 100644 index 2f88824..0000000 Binary files a/TagTunes/Assets.xcassets/iTunes.imageset/iTunes-1.png and /dev/null differ diff --git a/TagTunes/Assets.xcassets/iTunes.imageset/iTunes-2.png b/TagTunes/Assets.xcassets/iTunes.imageset/iTunes-2.png deleted file mode 100644 index 2f88824..0000000 Binary files a/TagTunes/Assets.xcassets/iTunes.imageset/iTunes-2.png and /dev/null differ diff --git a/TagTunes/Assets.xcassets/iTunes.imageset/iTunes.png b/TagTunes/Assets.xcassets/iTunes.imageset/iTunes.png deleted file mode 100644 index 2f88824..0000000 Binary files a/TagTunes/Assets.xcassets/iTunes.imageset/iTunes.png and /dev/null differ diff --git a/TagTunes/Base.lproj/Main.storyboard b/TagTunes/Base.lproj/Main.storyboard index f68d6cd..4c88da7 100644 --- a/TagTunes/Base.lproj/Main.storyboard +++ b/TagTunes/Base.lproj/Main.storyboard @@ -664,12 +664,12 @@ CA - + - + @@ -857,13 +857,13 @@ CA - + - + @@ -922,9 +922,9 @@ CA - + - - + + diff --git a/TagTunes/TrackTableCellView.swift b/TagTunes/TrackTableCellView.swift index 1cd6005..f9eac97 100644 --- a/TagTunes/TrackTableCellView.swift +++ b/TagTunes/TrackTableCellView.swift @@ -13,6 +13,20 @@ import AppKitPlus /// only be initialized from a nib or storyboard. public class TrackTableCellView: AdvancedTableCellView { + // MARK: Types + + private struct Images { + + /// Caches the tick image for track cells so that it does not need to be + /// reloaded every time a cell is configured. + static let tickImage = NSImage(named: "Tick")?.imageByMaskingWithColor(NSColor.clearColor()) + + /// Caches the gray tick image for track cells so that it does not need to be + /// reloaded every time a cell is configured. + static let grayTickImage = NSImage(named: "Tick")?.imageByMaskingWithColor(NSColor.lightGrayColor()) + + } + // MARK: Properties /// An outlet do display the track number. This acts as a secondary label. @@ -97,9 +111,9 @@ public class TrackTableCellView: AdvancedTableCellView { secondaryTextField?.stringValue = track.artistName trackNumberTextField?.stringValue = "\(track.trackNumber)" if track.associatedTracks.isEmpty { - imageView?.image = NSImage(named: "TickBW") + imageView?.image = TrackTableCellView.Images.grayTickImage } else { - imageView?.image = NSImage(named: "Tick") + imageView?.image = TrackTableCellView.Images.tickImage } if track.saved { let aspectRatioConstraint = NSLayoutConstraint(