Skip to content
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

Load properly scaled program icons #229

Open
HeikoKlare opened this issue Feb 5, 2025 · 0 comments · May be fixed by eclipse-platform/eclipse.platform.swt#1831
Open

Load properly scaled program icons #229

HeikoKlare opened this issue Feb 5, 2025 · 0 comments · May be fixed by eclipse-platform/eclipse.platform.swt#1831
Assignees
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Milestone

Comments

@HeikoKlare
Copy link
Contributor

Icons for external programs are loaded inside Program.getImageData(). To retrieve the icon data, OS methods like SHGetFileInfo are used, whichs load the icon appropriate for the primary monitor zoom at application startup (see eclipse-platform/eclipse.platform.swt#1804). As a result, the icons need to be raster-scaled for usage on monitors at other zooms, leading to bad results. In particular, if the initial primary monitor zoom is rather high (e.g., 200% or more), using the images scaled down to 100% leads to significant loss of information:
Image

Windows provides further API for accessing icons at different scales for an external program (see discussion in #186). Using such API could allow to retrieve an icon at a proper scale for the current monitor independent from the zoom of the initial primary monitor.

The provided APIs shall be analyzed and an appropriate one shall be employed inside the Program class to load program icons at proper scale.

See eclipse-platform/eclipse.platform.swt#1709 (review) for additional information.

@HeikoKlare HeikoKlare added this to HiDPI Feb 5, 2025
@HeikoKlare HeikoKlare converted this from a draft issue Feb 5, 2025
@HeikoKlare HeikoKlare added this to the 4.36 M1 milestone Feb 5, 2025
@HeikoKlare HeikoKlare added SWT Issue for SWT HiDPI A HiDPI-Related Issue or Feature labels Feb 5, 2025
@amartya4256 amartya4256 self-assigned this Feb 12, 2025
@amartya4256 amartya4256 moved this from 🔖 Ready: Atomic to 🏗 In Work: Short in HiDPI Feb 12, 2025
@amartya4256 amartya4256 moved this from 🏗 In Work: Short to 👀 In Review in HiDPI Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Projects
Status: 👀 In Review
Development

Successfully merging a pull request may close this issue.

2 participants