Skip to content

Conversation

@arunjose696
Copy link
Contributor

@arunjose696 arunjose696 commented Dec 11, 2025

Setting the clipping region temporarily to the textBounds was originally added (https://bugs.eclipse.org/bugs/show_bug.cgi?id=291245 comment 25) to prevent images from being overdrawn when implementting RIGHT or CENTER column alignment support in StyledCellLabelProvider. However, enabling clipping causes artifact lines during tree resizing, as a temporary workaround the clipping call is now guarded and applied only in those alignment cases to avoid issues with resizing of columns.

Steps to reproduce
Step 0:Set monitor zoom to 175

  1. Set monitor zoom to 175%.
  2. Launch a runtime workspace.
  3. In that runtime workspace, open the Debug Configurations dialog.
  4. Go to the Plug-ins tab for another runtime workspace / Eclipse application.
  5. Resize the ID column in the Features view. Artifact lines appear without this workaround.

Behavior without the fix

old.mp4

Behavior with the fix

new.mp4

Additionally this issue can also be reproduced with the snippet provided in vi-eclipse/Eclipse-Platform#548 (comment)

 Setting the clipping region temporarily to the textBounds   was originally added (https://bugs.eclipse.org/bugs/show_bug.cgi?id=291245 comment 25) to prevent images
 from being overdrawn when implementting  RIGHT or CENTER column alignment support in StyledCellLabelProvider. However, enabling
 clipping causes artifact lines during tree resizing, as a temporary workaround the  clipping call is
 now guarded and applied only in those alignment cases to avoid issues with resizing of columns.
@arunjose696 arunjose696 marked this pull request as ready for review December 11, 2025 10:53
@github-actions
Copy link
Contributor

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 15m 35s ⏱️ - 7m 20s
 8 242 tests ±0   7 994 ✅ ±0  248 💤 ±0  0 ❌ ±0 
23 646 runs  ±0  22 855 ✅ ±0  791 💤 ±0  0 ❌ ±0 

Results for commit 24fa5b1. ± Comparison against base commit e15e9bf.

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.

Tested with the Runtime and the mentioned Snippet. Adapted the Snippet to be able to test with TreeViewer and TableViewer. This PR works with both scenarios. TreeViewer doesn't properly work with SWT.RIGHT and SWT.CENTER when the first column is resized (at least in windows), but this is a pre-existing and not caused or worsened with this PR

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.

Artifacts when resizing column of TableViewer with StyledCellLabelProvider

2 participants