adds autorelease to nsimage
This commit is contained in:
parent
456ea04683
commit
c5fe173e47
1 changed files with 2 additions and 2 deletions
|
@ -1296,7 +1296,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
||||||
CGFloat radius = 5.0f;
|
CGFloat radius = 5.0f;
|
||||||
CGFloat dimension = 2 * radius + 1;
|
CGFloat dimension = 2 * radius + 1;
|
||||||
NSSize size = NSMakeSize(dimension, dimension);
|
NSSize size = NSMakeSize(dimension, dimension);
|
||||||
NSImage* maskImage = [NSImage imageWithSize:size
|
NSImage* maskImage = [[NSImage imageWithSize:size
|
||||||
flipped:NO
|
flipped:NO
|
||||||
drawingHandler:^BOOL(NSRect rect) {
|
drawingHandler:^BOOL(NSRect rect) {
|
||||||
NSBezierPath* bezierPath = [NSBezierPath
|
NSBezierPath* bezierPath = [NSBezierPath
|
||||||
|
@ -1306,7 +1306,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
||||||
[[NSColor blackColor] set];
|
[[NSColor blackColor] set];
|
||||||
[bezierPath fill];
|
[bezierPath fill];
|
||||||
return YES;
|
return YES;
|
||||||
}];
|
}] autorelease];
|
||||||
[maskImage setCapInsets:NSEdgeInsetsMake(radius, radius, radius, radius)];
|
[maskImage setCapInsets:NSEdgeInsetsMake(radius, radius, radius, radius)];
|
||||||
[maskImage setResizingMode:NSImageResizingModeStretch];
|
[maskImage setResizingMode:NSImageResizingModeStretch];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue