Skip to content

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Oct 22, 2025

Currently we have the problem that I want to replace some icons with a SVG variant. Currently Icons can be organized in folders like /icons/16x16/search.png, /icons/32x32/search.png and so on for high resolution support. Currently if one want to replace such structure with SVG it is required to scale down the SVG to 16x16 pixel document size as otherwise they get rendered at there native size (what usually is much larger).

As it is not really desirable to restrict the size of the SVG design for technical reasons, JFace now can detect two cases:

  1. the SVG is places in a folder with "classic" folder layout the size is extracted and passed down as a hint for dynamic sizable icons 2) one can additionally add a query parameter, e.g. if I have an icon like /icons/obj16/search.svg and I have two places where I want to use it one for a toolbar (16x16) and once for a Wizard Images (usually 128x128) I can use the url
    bundle:/example.id/icons/obj16/search.svg?size=16x16 and bundle:/example.id/icons/obj16/search.svg?size=128x128 to accomplish this task without the need to even store two SVGs

Currently we have the problem that I want to replace some icons with a
SVG variant. Currently Icons can be organized in folders like
/icons/16x16, /icons/32x32 and so on for high resolution support.
Currently if one want to replace such structure with SVG it is required
to scale down the SVG to 16x16 pixel document size as otherwise they get
rendered at there native size (what usually is much larger).

As it is not really desirable to restrict the size of the SVG design for
technical reasons, JFace now can detect two cases:

1) the SVG is places in a folder with "classic" folder layout the size
is extracted and passed down as a hint for dynamic sizable icons
2) one can additionally add a query parameter, e.g. if I have an icon
like /icons/obj16/search.svg and I have two places where I want to use
it one for a toolbar (16x16) and once for a Wizard Images (usually
128x128) I can use the url
bundle:/example.id/icons/obj16/search.svg?size=16x16 and
bundle:/example.id/icons/obj16/search.svg?size=128x128 to accomplish
this task without the need to even store two SVGs
@github-actions
Copy link
Contributor

Test Results

0 files   -  3 018  0 suites   - 3 018   0s ⏱️ - 2h 26m 39s
0 tests  -  8 229  0 ✅  -  7 980  0 💤  - 249  0 ❌ ±0 
0 runs   - 23 607  0 ✅  - 22 813  0 💤  - 794  0 ❌ ±0 

Results for commit fc3b77a. ± Comparison against base commit 34e3f47.

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