Skip to content

Conversation

@akoch-yatta
Copy link
Contributor

This PR clarifies the contract of ImageList#getImageSize in the windows implementation to always return a value in points. Historically it returned values in pixel. This worked until recent changes in ImageList to support and handle multiple OS image list handles to support monitor specific scaling. Because of the change the ImageList size in pixels depends on the target zoom the ImageList will be used with. Because of this the method is adapted to return a value in points. All callers of this method are adapted accordingly to scale the value to pixels matching the zoom of the Widget if necessary.

How to reproduce

This is not testable with a Runtime Workspace and must be setup correctly, but can happen easily in real scenarios.

  1. Configure monitor setup as: Primary 150%, secondary 100%
  2. Very Important: Open the File Explorer and move it to the secondary monitor
  3. Start the latest I-Build from the File Explorer
  4. Some Images will use the 100% image variant, e.g. the Select Working Set dialog
image

The image is smaller than expected
image

@github-actions
Copy link
Contributor

github-actions bot commented Aug 13, 2025

Test Results

   546 files  ±0     546 suites  ±0   34m 35s ⏱️ + 3m 27s
 4 425 tests ±0   4 408 ✅ ±0   17 💤 ±0  0 ❌ ±0 
16 746 runs  ±0  16 619 ✅ ±0  127 💤 ±0  0 ❌ ±0 

Results for commit eb0843f. ± Comparison against base commit 15f6cc4.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is fully reasonable and it's interesting that this did not produce more problems before. Testing shows that the mentioned issue is fixed.

I only have a minor comment regarding the added Javadoc comment.

This commit clarifies the contract of ImageList#getImageSize in the
windows implementation to always return a value in points. Historically
it returned values in pixel. This worked until recent changes in
ImageList to support and handle multiple OS image list handles to support
monitor specific scaling. Because of the change the ImageList size in
pixels depends on the target zoom the ImageList will be used with.
Because of this the method is adapted to return a value in points. All
callers of this method are adapted accordingly to scale the value to
pixels matching the zoom of the Widget if necessary.
@akoch-yatta akoch-yatta force-pushed the win32-imagelist-getimagesize-in-points branch from 78593ea to eb0843f Compare August 13, 2025 13:13
Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No regressions observed

@akoch-yatta akoch-yatta merged commit 2e13c10 into eclipse-platform:master Aug 13, 2025
17 checks passed
@akoch-yatta akoch-yatta deleted the win32-imagelist-getimagesize-in-points branch August 13, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(Some) images in dialogs are smaller than expected

3 participants