-
Notifications
You must be signed in to change notification settings - Fork 187
Scale Tree.INSET by zoom level instead of using fixed pixels #2429
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
Merged
fedejeanne
merged 1 commit into
eclipse-platform:master
from
vi-eclipse:master-404-INSET
Sep 12, 2025
Merged
Scale Tree.INSET by zoom level instead of using fixed pixels #2429
fedejeanne
merged 1 commit into
eclipse-platform:master
from
vi-eclipse:master-404-INSET
Sep 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
396fbef to
458b970
Compare
arunjose696
reviewed
Aug 25, 2025
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
Outdated
Show resolved
Hide resolved
Contributor
2b28609 to
c1f96c1
Compare
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
reviewed
Aug 29, 2025
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
Show resolved
Hide resolved
Contributor
|
I have tested the changes at my end at 100,200 and 350 zooms and everything seems to work fine, so approving this. |
arunjose696
approved these changes
Aug 29, 2025
c1f96c1 to
0fdac1e
Compare
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.
0fdac1e to
1674026
Compare
fedejeanne
approved these changes
Sep 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

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
After Fix
As we can see now the space between text and image in Tree is zoom relative.