-
Notifications
You must be signed in to change notification settings - Fork 177
Disabled Icon Viewer Snippet #1740
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
Conversation
2c19d8f
to
19f1856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@killingerm I think it would be nice to have this snippet in the repository, even though we already have multiple algorithms implemented productively now, as it allows for easier testing of alternatives and reconfigurations.
To do so, would you please squash your commits into one and sign the Eclipse Contributor Agreement (ECA)?
In addition, we need to link the new snippet in the Snippets.md
file at the root of the org.eclipse.swt.snippets
bundle. I would propose to add this snippet to the Image
section of that markdown file.
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet384.java
Show resolved
Hide resolved
@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,
I believe it has worked, though I'm not entirely sure whether the Also, since a new icon-disablement algorithm was selected I made a few adjustments:
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update! I did some minor changes. With them the PR is ready for me:
- Removed faulty additions of
.project
and preferences files - Adapted snippet headline to be shown in SnippetExplorer
- Replaced the squashed commit message with a proper one.
This adds Snippet384 to inspect the behavior of different different algorithms for the transformations of images to be used as disabled versions.
67c7555
to
6463e78
Compare
This draft includes
Snippet384
to inspect the behavior of the current icon-disabling algorithms implemented in the constructor oforg.eclipse.swt.graphics.Image(Device, Image, int)
when called with theSWT.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
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.