feat: expose window.invalidateShadow() (#32452)
Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
parent
35a7c07306
commit
d092e6bda4
7 changed files with 23 additions and 2 deletions
|
@ -226,8 +226,8 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
|||
|
||||
NSUInteger styleMask = NSWindowStyleMaskTitled;
|
||||
|
||||
// Removing NSWindowStyleMaskTitled removes window title, which removes
|
||||
// rounded corners of window.
|
||||
// The NSWindowStyleMaskFullSizeContentView style removes rounded corners
|
||||
// for frameless window.
|
||||
bool rounded_corner = true;
|
||||
options.Get(options::kRoundedCorners, &rounded_corner);
|
||||
if (!rounded_corner && !has_frame())
|
||||
|
@ -1061,6 +1061,10 @@ bool NativeWindowMac::HasShadow() {
|
|||
return [window_ hasShadow];
|
||||
}
|
||||
|
||||
void NativeWindowMac::InvalidateShadow() {
|
||||
[window_ invalidateShadow];
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetOpacity(const double opacity) {
|
||||
const double boundedOpacity = base::clamp(opacity, 0.0, 1.0);
|
||||
[window_ setAlphaValue:boundedOpacity];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue