Skip to content

Scaling Icons without transparency #71

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

Closed
amartya4256 opened this issue Jun 14, 2024 · 1 comment · Fixed by eclipse-platform/eclipse.platform.swt#1790
Closed

Scaling Icons without transparency #71

amartya4256 opened this issue Jun 14, 2024 · 1 comment · Fixed by eclipse-platform/eclipse.platform.swt#1790
Assignees
Labels
Bug A Derivation of Expected Behavior HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Milestone

Comments

@amartya4256
Copy link

amartya4256 commented Jun 14, 2024

In SWT, in Image's init method (line number 2003), there's a check for transparency which initializes an icon. There can be icons which are not transparent. In that case scaling them would not be possible since the init method is also used by the scaling method win32_getHandle.

The icon for the shell in the top right corner is set by setImages method in Decorations whoch specifically calls a method Display.createIcon which is identical to the block in init in Image (line no. 2003). Now that we have added the functionality of scaling to images. A non-transparent image created by createIcon method is unable to be scaled up using the win32_gethandle method since it doesn't end up in the block. Hence, adding an additional check for image.type == SWT.ICON lets it enter the block and scaled up properly.

We need to discuss on this topic and find out whats necessary.

Image

Also, Display.CreateIcon can be Image.createIcon since we want to create an icon from the Image and also since we allow Display to do certain things by using some public fields in the image, it makes the icon incompatible to be scaled properly by the getHandle method.

@amartya4256 amartya4256 self-assigned this Jun 14, 2024
@amartya4256 amartya4256 converted this from a draft issue Jun 14, 2024
@amartya4256 amartya4256 added SWT Issue for SWT Bug A Derivation of Expected Behavior HiDPI A HiDPI-Related Issue or Feature labels Jun 14, 2024
@amartya4256
Copy link
Author

@akoch-yatta this is the ticket for the icn issue (related to Program)

@amartya4256 amartya4256 moved this from 🆕 New to 🏗 In Work: Short in HiDPI Jul 26, 2024
@amartya4256 amartya4256 moved this from 🏗 In Work: Short to 🆕 New in HiDPI Jul 26, 2024
@HeikoKlare HeikoKlare moved this from 🆕 New to 🔖 Ready: Atomic in HiDPI Jan 3, 2025
@amartya4256 amartya4256 removed their assignment Jan 6, 2025
@HeikoKlare HeikoKlare added this to the 4.35 M3 milestone Jan 13, 2025
@ShahzaibIbrahim ShahzaibIbrahim self-assigned this Jan 27, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🔖 Ready: Atomic to 🏗 In Work: Short in HiDPI Jan 30, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🏗 In Work: Short to 👀 In Review in HiDPI Feb 3, 2025
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in HiDPI Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A Derivation of Expected Behavior HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants