fix: only bezel frameless windows (#23779)

This commit is contained in:
Shelley Vohr 2020-05-27 14:07:24 -07:00 committed by GitHub
parent 7b0a84477a
commit 5d88d0ee74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1454,6 +1454,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
[effect_view setState:NSVisualEffectStateActive];
// Make frameless Vibrant windows have rounded corners.
if (!has_frame()) {
CGFloat radius = 5.0f; // default corner radius
CGFloat dimension = 2 * radius + 1;
NSSize size = NSMakeSize(dimension, dimension);
@ -1473,6 +1474,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
[effect_view setMaskImage:maskImage];
[window_ setCornerMask:maskImage];
}
[[window_ contentView] addSubview:effect_view
positioned:NSWindowBelow