Merge branch 'bugfix/caret_inset' into 'develop'

Caret inset

See merge request BPHV_MIPS/mvm_core_ui!574
This commit is contained in:
Pfeil, Scott Robert 2020-08-31 11:30:59 -04:00
commit 8187c36a81

View File

@ -121,22 +121,22 @@ open class CaretView: View {
switch direction {
case .up:
caretPath.move(to: CGPoint(x: inset, y: frame.size.height - inset))
caretPath.addLine(to: CGPoint(x: halfWidth, y: lineWidth))
caretPath.addLine(to: CGPoint(x: halfWidth, y: inset))
caretPath.addLine(to: CGPoint(x: frame.size.width, y: frame.size.height))
case .right:
caretPath.move(to: CGPoint(x: inset, y: inset))
caretPath.addLine(to: CGPoint(x: frame.size.width - lineWidth, y: halfHeight))
caretPath.addLine(to: CGPoint(x: frame.size.width - inset, y: halfHeight))
caretPath.addLine(to: CGPoint(x: inset, y: frame.size.height - inset))
case .down:
caretPath.move(to: CGPoint(x: inset, y: inset))
caretPath.addLine(to: CGPoint(x: halfWidth, y: frame.size.height - lineWidth))
caretPath.addLine(to: CGPoint(x: halfWidth, y: frame.size.height - inset))
caretPath.addLine(to: CGPoint(x: frame.size.width - inset, y: inset))
case .left:
caretPath.move(to: CGPoint(x: frame.size.width - inset, y: inset))
caretPath.addLine(to: CGPoint(x: lineWidth, y: halfHeight))
caretPath.addLine(to: CGPoint(x: inset, y: halfHeight))
caretPath.addLine(to: CGPoint(x: frame.size.width - inset, y: frame.size.height - inset))
}