From 91b896cd7bfb19c1dddb132f7a78831e07fd6657 Mon Sep 17 00:00:00 2001 From: syoung-smallwisdom Date: Thu, 3 May 2018 12:08:01 -0700 Subject: [PATCH] Fix dial colors for light-style --- ResearchUI/ResearchUI/iOS/Views/RSDCountdownDial.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ResearchUI/ResearchUI/iOS/Views/RSDCountdownDial.swift b/ResearchUI/ResearchUI/iOS/Views/RSDCountdownDial.swift index db0b1f6c1..90d00ff6e 100644 --- a/ResearchUI/ResearchUI/iOS/Views/RSDCountdownDial.swift +++ b/ResearchUI/ResearchUI/iOS/Views/RSDCountdownDial.swift @@ -108,6 +108,8 @@ public final class RSDCountdownDial: RSDProgressIndicator, RSDViewColorStylable private func updateColorStyle() { let ringColor = usesLightStyle ? UIColor.rsd_dialRingBackgroundLightStyle : UIColor.rsd_dialRingBackground ringLayer?.strokeColor = ringColor.cgColor + + self.backgroundColor = self.usesLightStyle ? UIColor.rsd_dialInnerBackgroundLightStyle : UIColor.rsd_dialInnerBackground } /// The width of the circular ring that shows the track of the progress indicator. @@ -147,7 +149,6 @@ public final class RSDCountdownDial: RSDProgressIndicator, RSDViewColorStylable private func commonInit() { layer.masksToBounds = false - self.backgroundColor = self.usesLightStyle ? UIColor.rsd_dialInnerBackgroundLightStyle : UIColor.rsd_dialInnerBackground self.heightAnchor.constraint(equalTo: self.widthAnchor, multiplier: 1.0, constant: 0.0).isActive = true } @@ -187,8 +188,8 @@ public final class RSDCountdownDial: RSDProgressIndicator, RSDViewColorStylable backgroundColor = UIColor.clear ringLayer?.lineWidth = ringWidth - ringLayer?.strokeColor = UIColor.rsd_dialRingBackground.cgColor ringLayer?.fillColor = UIColor.clear.cgColor + updateColorStyle() dialLayer?.strokeEnd = progress dialLayer?.lineWidth = dialWidth