mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 01:59:24 +00:00
Added simple hud overlay on double-click actions
This commit is contained in:
29
MacPass/MPOverlayView.m
Normal file
29
MacPass/MPOverlayView.m
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// MPOverlayView.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 03.03.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPOverlayView.h"
|
||||
|
||||
@implementation MPOverlayView
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
[[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];
|
||||
}
|
||||
|
||||
- (BOOL)isOpaque {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user