Repository navigation
feat(home): shrink slot text until every app fits on screen - #59
Merged
Merged
Conversation
When the configured app count overflows the screen at the 32dip slot size, the launcher now scales the slot text and the interline spacing by available/natural content height (one pixel per child reserved for per-line rounding) so every listing stays visible. Screens that already fit keep the default size. Verified under Robolectric NATIVE graphics mode: the legacy font renderer keeps line height constant regardless of text size, which made any fit-by-shrinking assertion impossible to verify, so the sandbox now runs with real font metrics.
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.
What
When the configured app count overflows the screen at the default 32dip slot size, the launcher now scales the slot text and the interline spacing (the 50px bottom padding) down by
available / natural content height, with one pixel per child reserved for the framework's per-line rounding, until every listing is visible. Content that already fits keeps the default size.Behavior
homescreen.post), so it picks up the real screen bounds including fitsSystemWindows insets.BDD
homescreen.feature: Many apps shrink the slot text so every app stays visible (40 slots → every slot visible + text scaled down), Few apps keep the slot text at its default size.LauncherWorld:allHomeSlotsVisible(measures natural content height vs display height),homeSlotTextScaledDown,homeSlotTextDefaultSize.Test infra note
Robolectric's legacy font renderer keeps line height constant regardless of text size, which makes any fit-by-shrinking assertion impossible to verify — the suite now runs with
robolectric.graphicsMode=NATIVE(real font metrics) viaapp/build.gradle. Full suite + 80% JaCoCo gate green under it.Testing
./gradlew checkBUILD SUCCESSFUL (unit + BDD + coverage gate + lint).Commits are unsigned (signing key passphrase-locked).