Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SVGs for non-standard icon sizes when possible #650

Merged
merged 6 commits into from
Dec 28, 2022
Merged

Conversation

reupen
Copy link
Owner

@reupen reupen commented Dec 27, 2022

This renders built-in icons using SVGs if:

  • the display size isn't a size in the corresponding icon resource; and
  • the SVG services component is installed

This improves display quality in such cases, as otherwise one of the existing sizes in the icon resource will be scaled.

Pre-rendered icons are still preferred for standard sizes, as they are slightly better quality than what is obtained by rendering the SVG using SVG services.

Standard sizes are square icons that are 16, 20, 24, 28, 32, 36, 40, 48, 56, 64 or 256 pixels in width and height.

This change also includes various bits of related refactoring.

This reorganises icons files in preparation for support for using SVGs for the default icons.
As it avoids needing to render text, and ensure consistent rendering.
For consistency with other objects in the SVG documents.
@reupen reupen force-pushed the svg-default-icons branch 2 times, most recently from e2970f1 to 207fe6b Compare December 28, 2022 18:59
@reupen reupen marked this pull request as ready for review December 28, 2022 18:59
This renders built-in icons using SVGs if:

- the display size isn't a size in the corresponding icon resource; and
- the SVG services component is installed

This improves display quality in such cases, as otherwise one of the existing sizes in the icon resource will be scaled.

Pre-rendered icons are still preferred for standard sizes, as they are slightly better quality than what is obtained by rendering the SVG using SVG services.

Standard sizes are square icons that are 16, 20, 24, 28, 32, 36, 40, 48, 56, 64 or 256 pixels in width and height.

This change also includes various bits of related refactoring.
@reupen reupen merged commit 42452c5 into master Dec 28, 2022
@reupen reupen deleted the svg-default-icons branch December 28, 2022 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant