OS X: QuickLook: some minor tweaking.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91193 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
SND\MaddTheSane_cp 2014-08-06 19:42:16 +00:00
parent 2863112f25
commit da0bd50881
2 changed files with 11 additions and 10 deletions

View File

@ -104,15 +104,16 @@ static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestR
for (PcsxrMemoryObject *obj in memCards) {
if (obj.memImageIndex == -1 || obj.memIconCount == 1) {
NSMutableData *pngData = [NSMutableData new];
CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)pngData, kUTTypePNG, 1, NULL);
NSImage *theImage = [obj firstMemImage];
NSRect smallRect = NSMakeRect(0, 0, 16, 16);
CGImageRef imageRef = [theImage CGImageForProposedRect:&smallRect context:nil hints:nil];
CGImageDestinationAddImage(dst, imageRef, NULL);
CGImageDestinationFinalize(dst);
CFRelease(dst);
{
CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)pngData, kUTTypePNG, 1, NULL);
NSImage *theImage = [obj firstMemImage];
CGImageRef imageRef = [theImage CGImageForProposedRect:NULL context:nil hints:nil];
CGImageDestinationAddImage(dst, imageRef, NULL);
CGImageDestinationFinalize(dst);
CFRelease(dst);
}
NSDictionary *imgProps = @{(NSString *)kQLPreviewPropertyAttachmentDataKey: pngData,
(NSString *)kQLPreviewPropertyMIMETypeKey: @"image/png"};

View File

@ -112,7 +112,7 @@ static NSString *MemLabelEndLink;
{
static NSImage *imageBlank = nil;
if (imageBlank == nil) {
NSRect imageRect = NSMakeRect(0, 0, 32, 32);
NSRect imageRect = NSMakeRect(0, 0, 16, 16);
imageBlank = [[NSImage alloc] initWithSize:imageRect.size];
[imageBlank lockFocus];
[[NSColor blackColor] set];