fix: status and navigation bar colors don't follow the current theme #40

Closed
opened 2026-06-28 14:47:33 +00:00 by admin · 0 comments
Owner

Bug

The system status bar and navigation bar use the platform default (black background, dark icons) and don't follow the active theme. In dark mode the bar background is dark but the OS-drawn text/icons inside it remain dark, producing the "black text on dark mode" look that is hard to read.

Repro

  1. Open Ledgerr on a device with system Dark mode enabled (or pick Dark in Settings → Theme).
  2. Look at the status bar (clock, signal, battery) and the navigation bar (gesture pill / 3-button bar).

Expected

Status bar and navigation bar tint to match MaterialTheme.colorScheme.background (or surface), and the foreground icon color flips via WindowInsetsControllerCompat.isAppearanceLightStatusBars / isAppearanceLightNavigationBars so the OS-drawn glyphs stay legible in both light and dark mode.

Implementation hint

The app already provides two helpers in app/src/main/java/dev/achmad/ledgerr/ui/theme/Theme.kt:

  • StatusBarColor(color: Color)
  • NavigationBarColor(color: Color)

Wire them up at the top of AppTheme (or in the root Activity content) so every screen inherits the right tint. Pair the color with the light/dark appearance flag so icons flip correctly.

Scope

Applies app-wide — single fix in the theme entry point is enough; do not sprinkle calls into individual screens.

## Bug The system status bar and navigation bar use the platform default (black background, dark icons) and don't follow the active theme. In dark mode the bar background is dark but the OS-drawn text/icons inside it remain dark, producing the "black text on dark mode" look that is hard to read. ## Repro 1. Open Ledgerr on a device with system Dark mode enabled (or pick Dark in Settings → Theme). 2. Look at the status bar (clock, signal, battery) and the navigation bar (gesture pill / 3-button bar). ## Expected Status bar and navigation bar tint to match `MaterialTheme.colorScheme.background` (or surface), and the foreground icon color flips via `WindowInsetsControllerCompat.isAppearanceLightStatusBars / isAppearanceLightNavigationBars` so the OS-drawn glyphs stay legible in both light and dark mode. ## Implementation hint The app already provides two helpers in `app/src/main/java/dev/achmad/ledgerr/ui/theme/Theme.kt`: - `StatusBarColor(color: Color)` - `NavigationBarColor(color: Color)` Wire them up at the top of `AppTheme` (or in the root `Activity` content) so every screen inherits the right tint. Pair the color with the light/dark appearance flag so icons flip correctly. ## Scope Applies app-wide — single fix in the theme entry point is enough; do not sprinkle calls into individual screens.
admin closed this issue 2026-06-28 14:54:59 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/ledgerr#40