Skip to content

Commit

Permalink
Merge pull request ResearchKit#13 from syoung-smallwisdom/fix-dial-co…
Browse files Browse the repository at this point in the history
…lors

Fix dial colors for light-style
  • Loading branch information
Erin-Mounts authored May 8, 2018
2 parents f9a523c + 91b896c commit 10faac7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ResearchUI/ResearchUI/iOS/Views/RSDCountdownDial.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 10faac7

Please sign in to comment.