Resize raster icons to their physical draw size#1218
Closed
anthony-firn wants to merge 3 commits intopop-os:masterfrom
Closed
Resize raster icons to their physical draw size#1218anthony-firn wants to merge 3 commits intopop-os:masterfrom
anthony-firn wants to merge 3 commits intopop-os:masterfrom
Conversation
Member
|
iced maintains its own image cache for the renderer and performs resizing itself, so this would duplicate that work. |
Member
|
@anthony-firn Can this be done in the iced renderer instead? |
Author
|
Thanks, that makes sense. I moved the follow-up into the renderer instead so the change lives at the cache/upload layer instead of : pop-os/iced#318 This keeps the raster fix in the renderer and leaves untouched. |
Author
|
Thanks, that makes sense. I moved the follow-up into the iced renderer instead so the change lives at the cache/upload layer instead of the libcosmic icon widget: pop-os/iced#318 This keeps the raster fix in the renderer and leaves libcosmic untouched. |
Author
|
Closing this one in favor of the renderer-side follow-up at pop-os/iced#318, per the review feedback here. |
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.
Summary
Resize raster icons to their physical draw size in
widget::icon.This addresses the raster half of #565 without adding any surface-specific logic.
Why
Small raster app icons are currently filtered directly from their source image at draw time. On panel-sized surfaces that leaves some icons visibly rough and prone to shimmer.
Resizing once at the requested physical size produces a cleaner source image for the existing draw path, while keeping the change in the shared icon widget.
What changed
widget::iconIcon::viewandicon::drawValidation
cargo check -p libcosmiccargo test -p libcosmic lanczos_resize_produces_requested_dimensions --libcargo test -p libcosmic premultiplied_resize_avoids_transparent_color_bleed --libcosmic-app-libraryagainst the patchedlibcosmictree and verified smoother small raster app icons in a live COSMIC session