Skip to content

Conversation

@ptziegler
Copy link
Contributor

@ptziegler ptziegler commented Jan 31, 2026

This adds test cases to check that the auto-scaling mode is correctly read from the widget data and correctly propagated to child widgets.

@ptziegler ptziegler force-pushed the fix-auto-scaling-mode branch from 08a0b17 to 0bf9106 Compare January 31, 2026 10:01
@ptziegler ptziegler marked this pull request as draft January 31, 2026 10:09
@github-actions
Copy link
Contributor

github-actions bot commented Jan 31, 2026

Test Results (win32)

   35 files  +1     35 suites  +1   4m 29s ⏱️ -49s
4 644 tests +4  4 571 ✅ +4  73 💤 ±0  0 ❌ ±0 
  174 runs  +4    171 ✅ +4   3 💤 ±0  0 ❌ ±0 

Results for commit 997d81f. ± Comparison against base commit 09ef68c.

♻️ This comment has been updated with latest results.

This adds test cases to check that the auto-scaling mode is correctly
read from the widget data and correctly propagated to child widgets.
@ptziegler ptziegler force-pushed the fix-auto-scaling-mode branch from 0bf9106 to 997d81f Compare January 31, 2026 10:18
@ptziegler ptziegler changed the title [Win32] Fix incorrect calculation of auto-scaling mode [Win32] Add test case to check auto-scaling mode calculation Jan 31, 2026
@ptziegler ptziegler marked this pull request as ready for review January 31, 2026 10:19
Comment on lines +41 to +44
shell.setData("AUTOSCALE_DISABLED", true);
assertEquals(AutoscalingMode.DISABLED_INHERITED, SwtWin32TestUtil.getAutoscalingMode(shell));
Composite child = new Composite(shell, SWT.NONE);
assertEquals(AutoscalingMode.DISABLED_INHERITED, SwtWin32TestUtil.getAutoscalingMode(child));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is what really confused me when debugging a related problem. I've double-checked this with how things used to behave prior to 2166ca6 and that's it. It probably still makes sense to keep those tests, just to avoid any further confusion.

@Phillipus
Copy link
Contributor

Phillipus commented Feb 1, 2026

If there is a Control.setAutoscalingMode(mode)then a corresponding Control.getAutoscalingMode() method would be useful. Was this a design decision? As you found, this would be a handy thing.

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