Repository navigation
Conversation
The three `Image` elements in `Background.qml` set no `sourceSize`, so each one decodes its wallpaper at the file's native resolution and keeps it that way for as long as the background is up. A decoded image is uncompressed regardless of how small the file on disk is: `retro-82/5-zen-boat.webp` is 10456x3455, which is 138MB of RGBA held for a 2560x1600 screen that can show 16MB of it. 37 of the 92 wallpapers shipped in `themes/` are larger than the screens they are drawn on, and the two transition frames carry `mipmap: true`, which asks for another third on top of whatever was decoded. Each `Image` now caps `sourceSize`, so the decoder scales the image down as it reads it and the oversized buffer is never allocated. `oldFrame` and `incomingFrame` take their size from `base` so the three frames of a cross-fade always agree. The cap is 1.6x the screen rather than exactly the screen because setting both `sourceSize` dimensions makes Qt fit the image inside that box while preserving aspect. A box exactly the size of the screen would decode a 2.39:1 wallpaper too short to cover a 16:10 display, and `PreserveAspectCrop` would scale it back up to fill, which is the blur this is meant to avoid. 1.6x covers every aspect ratio up to 1.6 times the screen's own and still leaves the largest wallpapers well under their native size. The multiplier is the attached `Screen.devicePixelRatio`, matching `Menu.qml`, `Tray.qml` and `NotificationCard.qml`. `parent.screen` is not an option here: a child declared inside a `PanelWindow` is reparented to the window's `contentItem`, and a `QQuickItem` has no `screen` property, so reading it would silently yield `undefined` and decode every wallpaper at 1x.
VykosMolt
force-pushed
the
fix/wallpaper-decode-size
branch
from
September 8, 2026 21:25
7a5c6fb to
240d7f6
Compare
Member
|
Automated duplication check: this pull request looks similar to #8324, which covers the same wallpaper decode size cap. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
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.
Desktop still wallpapers and their transition frames decode at native file resolution, even when the display can show much less. Their
sourceSizeis now capped at 1.6 times the screen dimensions, includingScreen.devicePixelRatio, and both transition frames share the base wallpaper's decode size. The extra room accommodates aspect cropping without immediately scaling wide images back up.The desktop now renders its base wallpaper through
BackgroundMedia, so that component exposes asourceSizeproperty and forwards it to its still-image loader. Its default retains the existing lock-screen sizing behavior. Video playback, audio selection, and pause conditions continue to use the existing video path.background-test.shandvideo-background-test.shpass, including checks for shared transition sizing, the media component's default sizing, and preserved video behavior.git diff --checkpasses. Rebased onto currentquattro; live graphical verification has not been repeated for this revision.