mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
use properties where possible
This commit is contained in:
@@ -583,7 +583,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
#pragma mark Copy/Paste Overlays
|
#pragma mark Copy/Paste Overlays
|
||||||
- (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOverlayInfoType)overlayInfoType name:(NSString *)name{
|
- (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOverlayInfoType)overlayInfoType name:(NSString *)name{
|
||||||
if(data) {
|
if(data) {
|
||||||
[[MPPasteBoardController defaultController] copyObjects:@[ data ]];
|
[MPPasteBoardController.defaultController copyObjects:@[ data ]];
|
||||||
}
|
}
|
||||||
NSImage *infoImage = nil;
|
NSImage *infoImage = nil;
|
||||||
NSString *infoText = nil;
|
NSString *infoText = nil;
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
@implementation MPOverlayView
|
@implementation MPOverlayView
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)dirtyRect {
|
- (void)drawRect:(NSRect)dirtyRect {
|
||||||
[[NSGraphicsContext currentContext] saveGraphicsState];
|
[NSGraphicsContext.currentContext saveGraphicsState];
|
||||||
[[NSColor clearColor] set];
|
[NSColor.clearColor set];
|
||||||
NSRectFill(self.bounds);
|
NSRectFill(self.bounds);
|
||||||
NSColor *backgroundColor = [NSColor colorWithCalibratedWhite:0 alpha:0.7];
|
NSColor *backgroundColor = [NSColor colorWithCalibratedWhite:0 alpha:0.7];
|
||||||
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:self.bounds xRadius:10 yRadius:10];
|
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:self.bounds xRadius:10 yRadius:10];
|
||||||
[backgroundColor set];
|
[backgroundColor set];
|
||||||
[path fill];
|
[path fill];
|
||||||
[[NSGraphicsContext currentContext] restoreGraphicsState];
|
[NSGraphicsContext.currentContext restoreGraphicsState];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isOpaque {
|
- (BOOL)isOpaque {
|
||||||
|
|||||||
Reference in New Issue
Block a user