blob: 01d4df6b6102d0d69ddeca9f8a4430a7caab2287 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* HBHUDButtonCell.m $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
#import "HBHUDView.h"
@implementation HBHUDView
- (instancetype)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
self.wantsLayer = YES;
CGFloat radius = 4;
#if defined(__MAC_11_0)
if (@available (macOS 11, *))
{
radius = 10;
}
#endif
self.layer.cornerRadius = radius;
self.blendingMode = NSVisualEffectBlendingModeWithinWindow;
self.material = NSVisualEffectMaterialDark;
self.state = NSVisualEffectStateActive;
self.appearance = [NSAppearance appearanceNamed:NSAppearanceNameVibrantDark];
}
return self;
}
- (BOOL)acceptsFirstResponder
{
return YES;
}
@end
|