Skip to content

Commit

Permalink
fix missing color for icons on non-nodes in overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Aug 26, 2024
1 parent d5a290f commit 6c50d98
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class StyleableOverlayMapComponent(
p.addProperty("icon", context.resources.getResourceEntryName(style.icon))
val color = style.color ?: if (isNightMode) "#ccf" else "#124"
p.addProperty("icon-color", color)
val haloColor = style.color?.let { getDarkenedColor(it) } ?: if (isNightMode) "#2e2e48" else "#ffffff"
val haloColor = style.color?.let { getDarkenedColor(it) } ?: if (isNightMode) "#2e2e48" else "#fff"
p.addProperty("icon-halo-color", haloColor)
}
if (style.label != null) p.addProperty("label", style.label)
Expand Down Expand Up @@ -281,6 +281,10 @@ class StyleableOverlayMapComponent(
val pp = getElementKeyProperties(element.key)
if (style.icon != null) {
pp.addProperty("icon", context.resources.getResourceEntryName(style.icon))
val color = if (isNightMode) "#ccf" else "#124"
pp.addProperty("icon-color", color)
val haloColor = if (isNightMode) "#2e2e48" else "#fff"
pp.addProperty("icon-halo-color", haloColor)
}
if (style.label != null) pp.addProperty("label", style.label)
Feature.fromGeometry(geometry.center.toPoint(), pp)
Expand Down

0 comments on commit 6c50d98

Please sign in to comment.