Skip to content

Follow-Up Feature: Icon-Enablement with Rasterization of SVGs #2621

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Michael5601
Copy link
Contributor

@Michael5601 Michael5601 commented Dec 11, 2024

Please see this Draft for a detailed description.

The new functionality of this draft can be found in the commit 05e7d58. The other commit is the functionality from the PR that this draft is based on.

Fixes eclipse-platform/eclipse.platform.swt#1438.

@Michael5601 Michael5601 marked this pull request as draft December 11, 2024 16:15
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch 7 times, most recently from 0823bfe to 5a58952 Compare December 18, 2024 11:38
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch from 5a58952 to f7c8ac4 Compare January 7, 2025 08:10
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch from f7c8ac4 to cbd3df0 Compare January 21, 2025 15:28
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch 5 times, most recently from 296ba4e to 8052ffb Compare February 6, 2025 17:04
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch from 8052ffb to 88f80d8 Compare February 24, 2025 08:26
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch from 88f80d8 to 9949464 Compare March 10, 2025 08:31
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch 8 times, most recently from 76bcb59 to 5e54586 Compare March 24, 2025 07:45
@HannesWell HannesWell force-pushed the IconScalingWithDisabledLogic branch from 5e54586 to 59a47de Compare March 25, 2025 23:40
Copy link
Contributor

Test Results

 1 824 files  ±0   1 824 suites  ±0   1h 35m 43s ⏱️ - 3m 8s
 7 918 tests ±0   7 690 ✅ +1  228 💤 ±0  0 ❌  - 1 
23 841 runs  ±0  23 093 ✅ +1  748 💤 ±0  0 ❌  - 1 

Results for commit 59a47de. ± Comparison against base commit 586ef10.

Feature Proposal: Rasterization of SVGs at Runtime for Eclipse Icons
Fixes eclipse-platform#1438

Eclipse currently loads icons exclusively as raster graphics (e.g., `.png`), without support for vector formats like `.svg`. A major drawback of raster graphics is their inability to scale without degrading image quality. Additionally, generating icons of different sizes requires manually rasterizing SVGs outside Eclipse, leading to unnecessary effort and many icon files.

This PR introduces support for vector graphics in Eclipse, enabling SVGs to be used for icons. Existing PNG icons will continue to be loaded alongside SVGs, allowing the use of the new functionality without the need to replace all PNG files at once.

---
- **How It Works**:
  - To use SVG icons, simply place the SVG file in the bundle and reference it in the `plugin.xml` and other necessary locations, as is done for PNGs. No additional configuration is required.
  - At runtime, Eclipse uses the library JSVG to rasterize the SVG into a raster image of the desired size, eliminating the need for scaling. My analysis shows that JSVG is the most suitable Java library for this purpose.
  - You need to write the flag `-Dswt.autoScale=quarter` into your `eclipse.ini` file or into the run arguments of a new configuration.
@Michael5601 Michael5601 force-pushed the IconScalingWithDisabledLogic branch from 59a47de to a1278e0 Compare March 31, 2025 11:17
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.

Improving Eclipse Icon Scaling by Supporting Vectorized Icons
3 participants