Disabled Icon Viewer Snippet
This draft includes Snippet384 to inspect the behavior of the current icon-disabling algorithms implemented in the constructor of org.eclipse.swt.graphics.Image(Device, Image, int) when called with the SWT.IMAGE_DISABLE flag.
Currently, there are two different algorithms depending on whether Windows/MacOS or Linux is used. The Windows/MacOS implementation is outdated, and the generated disabled icons often look unappealing.
The snippet includes two new algorithms that can serve as a foundation for deriving a new algorithm, with adjustable parameters. This unified approach could also be applied to the Eclipse icons provided in disabled state, ensuring consistent appearance across all disabled icons, whether included in Eclipse JARs or generated dynamically using the Image constructor.
How to Use
- Select a folder containing images.
- Adjust the sliders to modify the parameters of the new algorithms.
Example Images
I have included example images that demonstrate the weaknesses of the current algorithms and created a resource folder:
resources/Snippet384/Example Images.
For detailed information and to participate in discussions about changes to the algorithm, please refer to the accompanying discussion thread.
Test Results
545 files + 6 545 suites +6 27m 10s ⏱️ - 9m 7s 4 377 tests +37 4 359 ✅ +35 18 💤 +3 0 ❌ - 1 16 647 runs +37 16 506 ✅ +35 141 💤 +3 0 ❌ - 1
Results for commit 6463e78f. ± Comparison against base commit 995c9b51.
:recycle: This comment has been updated with latest results.
@killingerm You have to sign Eclipse contributor agreement in order for your PR to be reviewed - https://www.eclipse.org/legal/eca/
@akurtakov I signed the ECA long ago but then changed my GitHub username to killigerm (to better reflect my name). I tried to relink it to my eclipse account but got a notification to send a mail to correct it, so far I sent two of them. I've also tried the "Eclipse ECA Validation" plugin. Is there anything else I can try?
I'm deferring to @eclipsewebmaster as I can't help with this one.
Thank you @akurtakov, @HeikoKlare and @eclipsewebmaster, it should work now.
Thank you, @killingerm! The ECA validation is fine now. Can you please address the review comments so that we can merge afterwards?
Hi again, @HeikoKlare I have now applied the requested changes:
- Linked the Disabled Icon Viewer Snippet (Snippet 348) in
Snippets.mdunder the image section - Added Javadoc describing the Snippets functionality
- Squashed everything into a single commit
I believe it has worked, though I'm not entirely sure whether the .prefs and .project files are supposed to be in the commit.
Also, since a new icon-disablement algorithm was selected I made a few adjustments:
- Added the new disabling algorithm directly underneith the original images
- Changed the order of algorithms with priority current -> old -> experimental
- Updated sliders default values to the ones agreed on in the discussion thread
- Replaced the preview image:
Please have a look at it and let me know if everything is in order this way or further changes are needed!
Lastly I'm really glad the snippet was helpful and is added into the repository, thank you!