move shadow settings to the setup
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c9abe39196
commit
bcbb3751cf
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user