From c721db80c4b94c9977c20429d1a2c140cadeeaa2 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 3 May 2023 11:53:05 -0500 Subject: [PATCH] updated Toggle Size for new specs Signed-off-by: Matt Bruce --- VDS/Components/Toggle/Toggle.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VDS/Components/Toggle/Toggle.swift b/VDS/Components/Toggle/Toggle.swift index 6252179b..cd3e3e4e 100644 --- a/VDS/Components/Toggle/Toggle.swift +++ b/VDS/Components/Toggle/Toggle.swift @@ -72,9 +72,9 @@ open class Toggle: Control, Changeable { // MARK: - Configuration Properties //-------------------------------------------------- // Sizes are from InVision design specs. - public let toggleSize = CGSize(width: 52, height: 24) + public let toggleSize = CGSize(width: 52, height: 28) public let toggleContainerSize = CGSize(width: 52, height: 44) - public let knobSize = CGSize(width: 20, height: 20) + public let knobSize = CGSize(width: 24, height: 24) private var toggleColorConfiguration = ControlColorConfiguration().with { $0.setSurfaceColors(VDSColor.elementsSecondaryOnlight, VDSColor.paletteGray44, forState: .normal) @@ -197,7 +197,7 @@ open class Toggle: Control, Changeable { //-------------------------------------------------- private func updateLabel() { - stackView.spacing = showText ? 12 : 0 + stackView.spacing = showText ? VDSLayout.Spacing.space3X.value : 0 if stackView.subviews.contains(label) { label.removeFromSuperview()