Skip to content

Commit 9bf188c

Browse files
jamesarichclaude
andauthored
fix(map): keep compass icon visible while following bearing (#5728)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ffb0753 commit 9bf188c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/MapControlsOverlay.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import org.meshtastic.core.ui.icon.MeshtasticIcons
4242
import org.meshtastic.core.ui.icon.MyLocation
4343
import org.meshtastic.core.ui.icon.Refresh
4444
import org.meshtastic.core.ui.icon.Tune
45+
import org.meshtastic.core.ui.theme.StatusColors.StatusBlue
4546
import org.meshtastic.core.ui.theme.StatusColors.StatusRed
4647

4748
/**
@@ -127,9 +128,11 @@ fun MapControlsOverlay(
127128

128129
@Composable
129130
private fun CompassButton(onClick: () -> Unit, bearing: Float, isFollowing: Boolean) {
131+
// Tint, not `primary` — tinting the icon `primary` painted it the same color as its own primary-colored
132+
// button background, making the compass disappear while following.
130133
val iconTint =
131134
when {
132-
isFollowing -> MaterialTheme.colorScheme.primary
135+
isFollowing -> MaterialTheme.colorScheme.StatusBlue
133136
bearing == 0f -> MaterialTheme.colorScheme.StatusRed
134137
else -> null
135138
}

0 commit comments

Comments
 (0)