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