Skip to content

Load properly scaled program icons #229

@HeikoKlare

Description

@HeikoKlare

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.

Metadata

Metadata

Assignees

Labels

HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions