From 63ebc8ed315e7df66997d4bf4595d0398798f7bf Mon Sep 17 00:00:00 2001 From: Duraid Abdul Date: Sun, 18 Sep 2022 23:39:48 -0600 Subject: [PATCH] Fix border view frame --- Sources/LocalConsole/LCManager.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Sources/LocalConsole/LCManager.swift b/Sources/LocalConsole/LCManager.swift index d1f6892..0299645 100644 --- a/Sources/LocalConsole/LCManager.swift +++ b/Sources/LocalConsole/LCManager.swift @@ -280,10 +280,12 @@ public class LCManager: NSObject, UIGestureRecognizerDelegate { let _ = lumaView - borderView.frame = CGRect(x: -1, y: -1, - width: consoleSize.width + 2, - height: consoleSize.height + 2) - borderView.layer.borderWidth = 2 - 1 / consoleView.traitCollection.displayScale + let borderWidth = 2 - 1 / consoleView.traitCollection.displayScale + + borderView.frame = CGRect(x: -borderWidth, y: -borderWidth, + width: consoleSize.width + 2 * borderWidth, + height: consoleSize.height + 2 * borderWidth) + borderView.layer.borderWidth = borderWidth borderView.layer.borderColor = UIColor(white: 1, alpha: 0.08).cgColor borderView.layer.cornerRadius = consoleView.layer.cornerRadius + 1 borderView.layer.cornerCurve = .continuous