Skip to content

Conversation

@ShahzaibIbrahim
Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim commented Aug 19, 2025

The Tree.HEADER_MARGIN and Tree.HEADER_EXTRA constant defines extra fixed-width spacing for tree headers. Previously, this was a fixed pixel value, which worked at 100% zoom but did not scale properly on high-DPI monitors.

This change redefines HEADER_MARGIN in points and converts it to pixels based on the current zoom level, ensuring consistent header spacing across different display scales.

Before and After

Header Width at 350% zoom

image

@github-actions
Copy link
Contributor

github-actions bot commented Aug 19, 2025

Test Results

   546 files     546 suites   30m 15s ⏱️
 4 426 tests  4 409 ✅  17 💤 0 ❌
16 750 runs  16 623 ✅ 127 💤 0 ❌

Results for commit d05d80f.

♻️ This comment has been updated with latest results.

@arunjose696
Copy link
Contributor

The change looks good to me. However, at 350% zoom, my measured pixel values using PowerToys are 233 (with the change) and 195 (without the change).

Previously, the column width behaved inconsistently depending on how the header was created:

  • If the column header was started directly at 350% zoom, the width would be 195 px.
  • If the header was created at 100% zoom and then moved to a monitor with 350% zoom, the width would become 233 px.

With this change, the column width is now consistent across both scenarios.

The Tree.HEADER_MARGIN constant defines extra fixed-width spacing for
tree
headers. Previously, this was a fixed pixel value, which worked at 100%
zoom
but did not scale properly on high-DPI monitors.

This change redefines HEADER_MARGIN in points and converts it to pixels
based
on the current zoom level, ensuring consistent header spacing across
different
display scales.
@akoch-yatta akoch-yatta force-pushed the master-404-HEADER_MARGIN branch from af8f888 to d05d80f Compare September 3, 2025 10:44
Copy link
Contributor

@akoch-yatta akoch-yatta left a comment

Choose a reason for hiding this comment

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

Code looks fine and testing short changes work as expected

@akoch-yatta akoch-yatta merged commit 92eaae8 into eclipse-platform:master Sep 3, 2025
17 checks passed
@akoch-yatta akoch-yatta deleted the master-404-HEADER_MARGIN branch September 3, 2025 11:00
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 HEADER_MARGIN and HEADER_EXTRA

3 participants