From 02a5c1022d6e010949c27d6b9150d112fc6ae07f Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 29 Mar 2023 11:13:05 -0500 Subject: [PATCH] fixed bug in drawing Signed-off-by: Matt Bruce --- VDS/Components/RadioButton/RadioButton.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VDS/Components/RadioButton/RadioButton.swift b/VDS/Components/RadioButton/RadioButton.swift index a8938ad6..edc2fdc0 100644 --- a/VDS/Components/RadioButton/RadioButton.swift +++ b/VDS/Components/RadioButton/RadioButton.swift @@ -335,8 +335,8 @@ open class RadioButtonBase: Control, Errorable { self.shapeLayer = nil } - let bounds = selectorView.bounds - let length = max(bounds.size.height, bounds.size.width) + let bounds = radioButtonSize + let length = max(bounds.height, bounds.width) guard length > 0.0, shapeLayer == nil else { return } //get the colors @@ -346,7 +346,7 @@ open class RadioButtonBase: Control, Errorable { selectorView.backgroundColor = backgroundColor selectorView.layer.borderColor = borderColor.cgColor - selectorView.layer.cornerRadius = selectorView.bounds.width * 0.5 + selectorView.layer.cornerRadius = bounds.width * 0.5 selectorView.layer.borderWidth = VDSFormControls.widthBorder if shapeLayer == nil { @@ -357,7 +357,7 @@ open class RadioButtonBase: Control, Errorable { height: radioButtonSelectedSize.height)) let shapeLayer = CAShapeLayer() self.shapeLayer = shapeLayer - shapeLayer.frame = bounds + shapeLayer.frame = selectorView.bounds layer.addSublayer(shapeLayer) shapeLayer.fillColor = radioSelectedColor.cgColor shapeLayer.path = bezierPath.cgPath