diff --git a/MVMCoreUI/Atoms/Views/Checkbox.swift b/MVMCoreUI/Atoms/Views/Checkbox.swift index 6f308651..f82d6bed 100644 --- a/MVMCoreUI/Atoms/Views/Checkbox.swift +++ b/MVMCoreUI/Atoms/Views/Checkbox.swift @@ -244,10 +244,17 @@ import MVMCore /// Returns a UIBezierPath detailing the path of a checkmark func checkMarkPath() -> CGPath { - let sideLength = max(bounds.size.height, bounds.size.width) - let startPoint = CGPoint(x: 0.33871 * sideLength, y: 0.53225 * sideLength) - let pivotOffSet = CGPoint(x: 0.46774 * sideLength, y: 0.64516 * sideLength) - let endOffset = CGPoint(x: 0.66935 * sideLength , y: 0.37097 * sideLength) + let length = max(bounds.size.height, bounds.size.width) + let xInsetLeft = length * 0.25 + let xInsetRight = length * 0.25 + let yInsetTop = length * 0.3 + let yInsetBottom = length * 0.35 + let innerWidth = length - (xInsetLeft + xInsetRight) + let innerHeight = length - (yInsetTop + yInsetBottom) + + let startPoint = CGPoint(x: xInsetLeft, y: yInsetTop + (innerHeight / 2)) + let pivotOffSet = CGPoint(x: xInsetLeft + (innerWidth * 0.33), y: yInsetTop + innerHeight) + let endOffset = CGPoint(x: xInsetLeft + innerWidth, y: yInsetTop) let bezierPath = UIBezierPath() bezierPath.move(to: startPoint)