-
Notifications
You must be signed in to change notification settings - Fork 162
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
base: master
Are you sure you want to change the base?
Conversation
Created Snippet384 to inspect the behaviour of current icon disabling algorithms and propose new ones.
Changed HSB disabling to a more genralized version, added eclipse mojo disabling and dark themes.
Fixed Combobox default theme
Cleanup
Added alpha slider for additional gray disabling.
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.
import org.eclipse.swt.layout.*; | ||
import org.eclipse.swt.widgets.*; | ||
|
||
public class Snippet384 { |
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.
Please add a comment to the class used as the description of the snippet shown in the snippet explorer (see other snippets for a template).
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.