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 <robinfowler@Robins-MBP.broadband>
This commit is contained in:
parent
22a70eb803
commit
e12128b65b
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue