Skip to content
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

[win32] Prevent event on table column resize #1394

Conversation

akoch-yatta
Copy link
Contributor

This PR prevents the creation of a SWT.Resize event when table columns are resized after a zoom change. Therefore, the ignoreColumnResize attribute is utilized during the resizing to disable the creation of the resize event.

This will prevent JFace TableColumnLayouts to break when using ColumnWeighData to configure column sizes. They would be invalidated when a SWT.Resize occurs.

As the resizing of the column after a zoom change is not really a resizing but just an adjusting to the new environment, preventing a SWT.Resize event seems like the way to go.

You can test the different behaviour of the PR with Snippet016TableLayout

Copy link
Contributor

github-actions bot commented Aug 8, 2024

Test Results

   486 files  ±0     486 suites  ±0   8m 7s ⏱️ +28s
 4 151 tests ±0   4 143 ✅ ±0   8 💤 ±0  0 ❌ ±0 
16 358 runs  ±0  16 266 ✅ ±0  92 💤 ±0  0 ❌ ±0 

Results for commit 8f04eb8. ± Comparison against base commit 08e2cad.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta marked this pull request as ready for review August 8, 2024 11:23
@akoch-yatta akoch-yatta requested a review from niraj-modi as a code owner August 8, 2024 11:23
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 sound and works as expected. It can only affect behavior when rescaling at runtime is activated.

This commit prevents the creation of a SWT.Resize event when table columns are resized after a zoom change. Therefore, the ignoreColumnResize is utilized during the resizing to disable the creation of the resize event.

Contributes to eclipse-platform#62 and eclipse-platform#127
@HeikoKlare HeikoKlare force-pushed the prevent-table-resizing-event-on-dpi-change branch from b68d0e3 to 8f04eb8 Compare August 9, 2024 08:30
@HeikoKlare HeikoKlare merged commit 4b57615 into eclipse-platform:master Aug 9, 2024
14 checks passed
@akoch-yatta akoch-yatta deleted the prevent-table-resizing-event-on-dpi-change branch August 30, 2024 07:55
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.

2 participants