Repository navigation
fix: honour dark theme on the launch screen - #15
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12.
Split
Theme.Scrib.Baseout ofTheme.Scribsovalues-nightonly has to swap the parent to the darkandroid:Theme.Material.NoActionBar.android:windowBackgroundnow points at a new night-aware@color/window_background.