Skip to content

fix: honour dark theme on the launch screen - #15

Merged
stianthaulow merged 3 commits into
mainfrom
fix/dark-splash-screen
Aug 1, 2026
Merged

stianthaulow merged 3 commits into
mainfrom
fix/dark-splash-screen

Conversation

@stianthaulow

@stianthaulow stianthaulow commented Aug 1, 2026 •

Copy link
Copy Markdown
Owner

Fixes #12.

Split Theme.Scrib.Base out of Theme.Scrib so values-night only has to swap the parent to the dark android:Theme.Material.NoActionBar.

android:windowBackground now points at a new night-aware @color/window_background.

stianthaulow and others added 3 commits August 1, 2026 10:44
Theme.Scrib was pinned to android:Theme.Material.Light.NoActionBar with no
-night variant, so cold launches flashed white regardless of dark mode —
uncomfortable in a dark environment. The Compose theme was already
dark-aware, so only the pre-Compose window was wrong.

Split out Theme.Scrib.Base so -night can swap to the dark Material parent,
and point android:windowBackground at a new night-aware @color/window_background
that matches ScribTheme exactly (#fafafa / #0f0f0f), so there is no colour
step when Compose takes over.

Android 12+ draws its own splash screen rather than the plain starting
window, so values-v31 additionally sets android:windowSplashScreenBackground
to the same colour.

Fixes #12

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The launch window and ScribTheme previously hardcoded the same two colours
in separate files, kept in sync only by comments. Read the resource from
Compose instead so the XML is the single source of truth and the two cannot
drift apart.

The resource is night-aware, so colorResource already resolves to the dark
value under -night; only onBackground/onSurface still pick between the
light and dark schemes. Resolves to the same ARGB values as before
(0xFFFAFAFA / 0xFF0F0F0F), so rendering is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@stianthaulow
stianthaulow merged commit e5afb87 into main Aug 1, 2026
1 check passed
@stianthaulow
stianthaulow deleted the fix/dark-splash-screen branch August 1, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bright splash screen in dark setting.

1 participant