changes made
This commit is contained in:
parent
b758c0d514
commit
e36c8c3ead
@ -89,7 +89,7 @@ open class OrderTracker: View {
|
|||||||
context.setLineWidth(1)
|
context.setLineWidth(1)
|
||||||
let firstRect = convert(firstStep.stateImage.frame, from: firstStep.stateImage)
|
let firstRect = convert(firstStep.stateImage.frame, from: firstStep.stateImage)
|
||||||
let imageDimension = firstStep.stateImage.bounds.height
|
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)
|
context.move(to: startPoint)
|
||||||
|
|
||||||
var lineColor = (firstStep.state?.color() ?? .mvmCoolGray3).cgColor
|
var lineColor = (firstStep.state?.color() ?? .mvmCoolGray3).cgColor
|
||||||
@ -98,7 +98,7 @@ open class OrderTracker: View {
|
|||||||
|
|
||||||
context.setStrokeColor(lineColor)
|
context.setStrokeColor(lineColor)
|
||||||
let relativeOrigin = convert(step.stateImage.frame, from: step.stateImage)
|
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.addLine(to: point)
|
||||||
context.strokePath()
|
context.strokePath()
|
||||||
|
|||||||
@ -49,7 +49,8 @@ open class Step: View {
|
|||||||
addSubview(bodyTop)
|
addSubview(bodyTop)
|
||||||
addSubview(bodyBottom)
|
addSubview(bodyBottom)
|
||||||
|
|
||||||
stateImage.contentMode = .scaleToFill
|
stateImage.contentMode = .scaleAspectFit
|
||||||
|
stateImage.layer.backgroundColor = UIColor.white.cgColor
|
||||||
stateImage.topAnchor.constraint(equalTo: topAnchor).isActive = true
|
stateImage.topAnchor.constraint(equalTo: topAnchor).isActive = true
|
||||||
stateImage.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
|
stateImage.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
|
||||||
stateImage.heightAnchor.constraint(equalToConstant: 18).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 = bottomAnchor.constraint(greaterThanOrEqualTo: stateImage.bottomAnchor, constant: Padding.Ten)
|
||||||
imageBottomConstraint?.isActive = true
|
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
|
headline.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
|
||||||
trailingAnchor.constraint(equalTo: headline.trailingAnchor).isActive = true
|
trailingAnchor.constraint(equalTo: headline.trailingAnchor).isActive = true
|
||||||
|
|
||||||
|
|||||||
@ -51,10 +51,7 @@ open class StepModel: MoleculeModelProtocol {
|
|||||||
case .complete:
|
case .complete:
|
||||||
return .mvmGreen
|
return .mvmGreen
|
||||||
|
|
||||||
case .incomplete:
|
case .incomplete,.invalid:
|
||||||
return .mvmOrangeAA
|
|
||||||
|
|
||||||
case .invalid:
|
|
||||||
return .mvmCoolGray3
|
return .mvmCoolGray3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user