changes made

This commit is contained in:
Kevin G Christiano 2020-07-08 17:14:52 -04:00
parent b758c0d514
commit e36c8c3ead
3 changed files with 6 additions and 8 deletions

View File

@ -89,7 +89,7 @@ open class OrderTracker: View {
context.setLineWidth(1)
let firstRect = convert(firstStep.stateImage.frame, from: firstStep.stateImage)
let imageDimension = firstStep.stateImage.bounds.height
let startPoint = CGPoint(x: imageDimension / 2, y: firstRect.size.height - 1)
let startPoint = CGPoint(x: imageDimension / 2, y: firstRect.size.height - imageDimension / 2)
context.move(to: startPoint)
var lineColor = (firstStep.state?.color() ?? .mvmCoolGray3).cgColor
@ -98,7 +98,7 @@ open class OrderTracker: View {
context.setStrokeColor(lineColor)
let relativeOrigin = convert(step.stateImage.frame, from: step.stateImage)
let point = CGPoint(x: imageDimension / 2, y: relativeOrigin.origin.y + 1)
let point = CGPoint(x: imageDimension / 2, y: relativeOrigin.origin.y + imageDimension / 2)
context.addLine(to: point)
context.strokePath()

View File

@ -49,7 +49,8 @@ open class Step: View {
addSubview(bodyTop)
addSubview(bodyBottom)
stateImage.contentMode = .scaleToFill
stateImage.contentMode = .scaleAspectFit
stateImage.layer.backgroundColor = UIColor.white.cgColor
stateImage.topAnchor.constraint(equalTo: topAnchor).isActive = true
stateImage.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
stateImage.heightAnchor.constraint(equalToConstant: 18).isActive = true
@ -57,7 +58,7 @@ open class Step: View {
imageBottomConstraint = bottomAnchor.constraint(greaterThanOrEqualTo: stateImage.bottomAnchor, constant: Padding.Ten)
imageBottomConstraint?.isActive = true
headline.topAnchor.constraint(equalTo: topAnchor).isActive = true
headline.topAnchor.constraint(equalTo: topAnchor, constant: 2).isActive = true
headline.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
trailingAnchor.constraint(equalTo: headline.trailingAnchor).isActive = true

View File

@ -51,10 +51,7 @@ open class StepModel: MoleculeModelProtocol {
case .complete:
return .mvmGreen
case .incomplete:
return .mvmOrangeAA
case .invalid:
case .incomplete,.invalid:
return .mvmCoolGray3
}
}