Skip to content

Conversation

@ShahzaibIbrahim
Copy link
Contributor

The Tree.INSET constant defines the spacing between an item's image and text. Previously, this was a fixed value of 3px, which looks correct at 100% zoom but causes the image and text to appear cramped on higher-DPI displays.

This change defines INSET in points and converts it to pixels based on the current zoom level (e.g. 6px at 200%), ensuring consistent spacing across different monitor scales.

Before Fix

image

After Fix

image

As we can see now the space between text and image in Tree is zoom relative.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 19, 2025

Test Results

   546 files  ±0     546 suites  ±0   30m 55s ⏱️ - 5m 28s
 4 431 tests ±0   4 414 ✅ ±0   17 💤 ±0  0 ❌ ±0 
16 764 runs  ±0  16 637 ✅ ±0  127 💤 ±0  0 ❌ ±0 

Results for commit 1674026. ± Comparison against base commit f878858.

♻️ This comment has been updated with latest results.

@ShahzaibIbrahim ShahzaibIbrahim force-pushed the master-404-INSET branch 2 times, most recently from 396fbef to 458b970 Compare August 20, 2025 16:14
@arunjose696
Copy link
Contributor

I tested the changes and can observe that the inset adjusts as mentioned in the issue. However, at 350% monitor zoom, the last character sometimes gets cut off.

For example, when I right-click on the JRE System Library and choose Show in Project Explorer, the last closing bracket is not fully visible with the current changes.( 350% zoom)

image

@ShahzaibIbrahim ShahzaibIbrahim force-pushed the master-404-INSET branch 2 times, most recently from 2b28609 to c1f96c1 Compare August 28, 2025 12:19
@arunjose696
Copy link
Contributor

The issue I mentioned is resolved, and testing shows everything is working fine. I just have two questions about the change for clarification.

@arunjose696
Copy link
Contributor

I have tested the changes at my end at 100,200 and 350 zooms and everything seems to work fine, so approving this.

The Tree.INSET constant defines the spacing between an item's image and text.
Previously, this was a fixed value of 3px, which looks correct at 100% zoom but
causes the image and text to appear cramped on higher-DPI displays.

This change defines INSET in points and converts it to pixels based on the
current zoom level (e.g. 6px at 200%), ensuring consistent spacing across
different monitor scales.
@fedejeanne fedejeanne merged commit b0559a2 into eclipse-platform:master Sep 12, 2025
17 checks passed
@fedejeanne fedejeanne deleted the master-404-INSET branch September 12, 2025 07:01
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.

Fix the values of Tree.INSET in points

3 participants