From e12128b65bc370973f43ca06fd2c05677f8d454e Mon Sep 17 00:00:00 2001 From: robin <54709288+robin-fowler@users.noreply.github.com> Date: Thu, 15 Apr 2021 22:22:42 +0100 Subject: [PATCH] fix: increase corner radius for vibrancy view on big sur (#28655) * fix: increase corner radius for vibrancy view on big sur * fix: revert git weirdness Co-authored-by: Robin Fowler --- shell/browser/native_window_mac.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 89b27b3416..87311853eb 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -1298,7 +1298,12 @@ void NativeWindowMac::SetVibrancy(const std::string& type) { const bool no_rounded_corner = [window_ styleMask] & NSWindowStyleMaskFullSizeContentView; if (!has_frame() && !is_modal() && !no_rounded_corner) { - 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