From 8260f5d40c52d6479eb30910fa83158fddeebaa1 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Mon, 14 Dec 2020 16:51:19 +0100 Subject: [PATCH] feat: remove additional spacing on Big Sur --- ModuleKit/Constants.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ModuleKit/Constants.swift b/ModuleKit/Constants.swift index e4d7e817..921c5971 100644 --- a/ModuleKit/Constants.swift +++ b/ModuleKit/Constants.swift @@ -33,7 +33,15 @@ public struct Widget_c_s { return (systemHeight == 0 ? 22 : systemHeight) ?? 22 } } - public let margin: CGPoint = CGPoint(x: 2, y: 2) + public var margin: CGPoint { + get { + var point: CGPoint = CGPoint(x: 2, y: 2) + if #available(macOS 11.0, *) { + point.x = 0 + } + return point + } + } public let spacing: CGFloat = 2 }