IDEA-163208: increase resolution of touchbar images

touchbar is the retina display, 144 dpi
This commit is contained in:
Artem Bochkarev
2018-05-10 12:36:52 +07:00
parent 91744c248e
commit c702e1526d
2 changed files with 2 additions and 1 deletions
Binary file not shown.
+2 -1
View File
@@ -49,7 +49,8 @@ NSImage * createImgFrom4ByteRGBA(const unsigned char *bytes, int w, int h) {
unsigned char* pix = [rep bitmapData];
memcpy(pix, bytes, h*rowBytes);
NSImage* nsimg = [[[NSImage alloc] initWithSize:NSMakeSize(w, h)] autorelease];
NSSize sizeInPoints = NSMakeSize(w/2, h/2); // NOTE: 'retina' display has 2 pix in 1 point
NSImage* nsimg = [[[NSImage alloc] initWithSize:sizeInPoints] autorelease];
[nsimg addRepresentation:rep];
return nsimg;
}