mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Adjust map pin darker and lighter logic so that the latest pin is darker than the node color and history pins and route lines are lighter
This commit is contained in:
parent
7feaa7dd9c
commit
87a1115727
2 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ extension UIColor {
|
|||
}
|
||||
|
||||
func darker(componentDelta: CGFloat = 0.1) -> UIColor {
|
||||
return makeColor(componentDelta: -2*componentDelta)
|
||||
return makeColor(componentDelta: -1*componentDelta)
|
||||
}
|
||||
|
||||
private func add(_ value: CGFloat, toComponent: CGFloat) -> CGFloat {
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
annotationView.displayPriority = .required
|
||||
annotationView.titleVisibility = .visible
|
||||
} else {
|
||||
annotationView.markerTintColor = UIColor(hex: UInt32(positionAnnotation.nodePosition?.num ?? 0))
|
||||
annotationView.markerTintColor = UIColor(hex: UInt32(positionAnnotation.nodePosition?.num ?? 0)).lighter()
|
||||
annotationView.displayPriority = .defaultHigh
|
||||
annotationView.titleVisibility = .adaptive
|
||||
}
|
||||
|
|
@ -441,7 +441,7 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
if let routePolyline = overlay as? MKPolyline {
|
||||
let titleString = routePolyline.title ?? "0"
|
||||
let renderer = MKPolylineRenderer(polyline: routePolyline)
|
||||
renderer.strokeColor = UIColor(hex: UInt32(titleString) ?? 0)
|
||||
renderer.strokeColor = UIColor(hex: UInt32(titleString) ?? 0).lighter()
|
||||
renderer.lineWidth = 8
|
||||
return renderer
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue