Skip to content

Commit

Permalink
fix: increase corner radius for vibrancy view on big sur (#29072)
Browse files Browse the repository at this point in the history
  • Loading branch information
shatyuka committed May 10, 2021
1 parent 3802082 commit 4860586
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shell/browser/native_window_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,12 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {

// Make frameless Vibrant windows have rounded corners.
if (!has_frame() && !is_modal()) {
CGFloat radius = 5.0f; // default corner radius
CGFloat radius;
if (@available(macOS 11.0, *)) {
radius = 9.0f;
} else {
radius = 5.0f; // smaller corner radius on older versions
}
CGFloat dimension = 2 * radius + 1;
NSSize size = NSMakeSize(dimension, dimension);
NSImage* maskImage = [NSImage imageWithSize:size
Expand Down

0 comments on commit 4860586

Please sign in to comment.