Copy Liron's fix
This commit is contained in:
Родитель
2190b3b978
Коммит
5f594b4c23
|
@ -716,6 +716,21 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|||
#endif // TODO(macOS GH#774)
|
||||
|
||||
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
||||
- (NSShadow*)shadow {
|
||||
CALayer *layer = self.layer;
|
||||
|
||||
// Workaround AppKit issue with directly manipulating the view layer's shadow.
|
||||
if (layer.shadowColor != nil && layer.shadowOpacity > 0) {
|
||||
NSShadow *shadow = [NSShadow new];
|
||||
|
||||
shadow.shadowColor = [NSColor colorWithCGColor:layer.shadowColor];
|
||||
shadow.shadowOffset = layer.shadowOffset;
|
||||
shadow.shadowBlurRadius = layer.shadowRadius;
|
||||
|
||||
return shadow;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
// Subscribe to view bounds changed notification so that the view can be notified when a
|
||||
|
|
Загрузка…
Ссылка в новой задаче