diff --git a/VDS/Components/Toggle/ToggleView.swift b/VDS/Components/Toggle/ToggleView.swift index 1355485c..346e80eb 100644 --- a/VDS/Components/Toggle/ToggleView.swift +++ b/VDS/Components/Toggle/ToggleView.swift @@ -146,6 +146,31 @@ open class ToggleView: Control, Changeable { knobView.layer.insertSublayer(shadowLayer1, at: 0) knobView.layer.insertSublayer(shadowLayer2, at: 0) + let shadowColor = VDSColor.paletteBlack.cgColor +// Drop Shadow 1 +// color: black +// Radius (Blur): 10 +// Width (x-offset): 0 +// Height (y-offset): 1px +// Opacity: 0.24 + shadowLayer1.cornerRadius = knobView.layer.cornerRadius + shadowLayer1.shadowColor = shadowColor + shadowLayer1.shadowOpacity = 0.24 + shadowLayer1.shadowOffset = .init(width: 0, height: 1) + shadowLayer1.shadowRadius = 5.0 + + // Drop Shadow 2 + // color: black + // Radius (Blur): 2 + // Width (x-offset): 0 + // Height (y-offset): 2px + // Opacity: 0.08 + shadowLayer2.cornerRadius = knobView.layer.cornerRadius + shadowLayer2.shadowColor = shadowColor + shadowLayer2.shadowOpacity = 0.08 + shadowLayer2.shadowOffset = .init(width: 0, height: 2) + shadowLayer2.shadowRadius = 2.0 + } /// Resets to default settings. @@ -234,31 +259,6 @@ open class ToggleView: Control, Changeable { shadowLayer1.frame = knobView.bounds shadowLayer2.frame = knobView.bounds - let shadowColor = VDSColor.paletteBlack.cgColor -// Drop Shadow 1 -// color: black -// Radius (Blur): 10 -// Width (x-offset): 0 -// Height (y-offset): 1px -// Opacity: 0.24 - shadowLayer1.cornerRadius = knobView.layer.cornerRadius - shadowLayer1.shadowColor = shadowColor - shadowLayer1.shadowOpacity = 0.24 - shadowLayer1.shadowOffset = .init(width: 0, height: 1) - shadowLayer1.shadowRadius = 5.0 - - // Drop Shadow 2 - // color: black - // Radius (Blur): 2 - // Width (x-offset): 0 - // Height (y-offset): 2px - // Opacity: 0.08 - shadowLayer2.cornerRadius = knobView.layer.cornerRadius - shadowLayer2.shadowColor = shadowColor - shadowLayer2.shadowOpacity = 0.08 - shadowLayer2.shadowOffset = .init(width: 0, height: 2) - shadowLayer2.shadowRadius = 2.0 - } }