Draw static and rotation wallpapers at the display size - #71
Merged
Merged
Conversation
The engines sized the output from WallpaperManager's desired minimum size, which is the launcher's wide virtual canvas (4800x2400 on a 1080x2400 phone). The whole bitmap went in as the crop hint, and Android shows a screen-sized window from its left edge. fitCenter and center therefore showed only the black bar, and centerCrop, fill, and stretch showed a zoomed-in left strip, while the result still said applied. Both engines now draw onto the display size in its natural orientation, so each scale mode matches what the user sees. 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.
Every static scale mode was drawn onto the launcher's desired size, which is 4800×2400 on a 1080×2400 phone. The whole bitmap went in as the crop hint, and Android shows a screen-sized window from its left edge. The result said
applied, but:fitCenterandcentergave an all-black home screen.centerCrop,fill, andstretchshowed only a zoomed-in left strip.The test image is a portrait 1080×2400 with red, green, and blue columns, a white top, and a yellow bottom. Every mode should show all three columns. From left to right: centerCrop, fitCenter, center, fill, stretch.
Before
After
Trade-off: launchers no longer pan the wallpaper. The Android guide now says so.
Verification
wallpaperCanvasSize: display size, rotated display, and bounds with aspect ratio kept.🤖 Generated with Claude Code