use properties where possible

This commit is contained in:
michael starke
2017-08-29 14:58:42 +02:00
parent a0b94312ed
commit 0166c183c7
2 changed files with 4 additions and 4 deletions

View File

@@ -583,7 +583,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
#pragma mark Copy/Paste Overlays
- (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOverlayInfoType)overlayInfoType name:(NSString *)name{
if(data) {
[[MPPasteBoardController defaultController] copyObjects:@[ data ]];
[MPPasteBoardController.defaultController copyObjects:@[ data ]];
}
NSImage *infoImage = nil;
NSString *infoText = nil;

View File

@@ -11,14 +11,14 @@
@implementation MPOverlayView
- (void)drawRect:(NSRect)dirtyRect {
[[NSGraphicsContext currentContext] saveGraphicsState];
[[NSColor clearColor] set];
[NSGraphicsContext.currentContext saveGraphicsState];
[NSColor.clearColor set];
NSRectFill(self.bounds);
NSColor *backgroundColor = [NSColor colorWithCalibratedWhite:0 alpha:0.7];
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:self.bounds xRadius:10 yRadius:10];
[backgroundColor set];
[path fill];
[[NSGraphicsContext currentContext] restoreGraphicsState];
[NSGraphicsContext.currentContext restoreGraphicsState];
}
- (BOOL)isOpaque {