Skip to content

Conversation

@ShahzaibIbrahim
Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim commented Oct 30, 2025

These changes have following affects:

  • Upon starting eclipse product when monitor-specific scaling is set with unsupported autoscale mode, it will show a error dialog and application won't start.
  • User won't be able to enable monitor-specific scaling from appearance page if unsupported autoscale mode is set from property or ini file.
  • User can then either force the unsupported autoscale mode with monitor specific-scaling by setting swt.autoScale.force to true or switch to supported autoscale mode.

Testing


Scenario#1: Starting application with -Dswt.autoScale=int200

Result: App should start (if monitor-specific scaling is not checked in Appearance page), but option to turn on monitor-specific scaling in Appearance page should be disabled.

image

Scenario#2: Starting application with -Dswt.autoScale=int200 and -Dswt.autoScale.updateOnRuntime=true

Result: App will start, user will see an error dialog stating the incompatibility of an option and monitor specific-scaling will be disabled.

image

Scenario#3: Starting application with -Dswt.autoScale=int200 and -Dswt.autoScale.updateOnRuntime=true
and -Dswt.autoScale.force=true

Result: makes more sense with swt applications. if user really wants to use other scaling mode with monitor-specific scaling.

import org.eclipse.swt.widgets.*;

public class AutoScaleSnippet {

public static void main (String [] args) {
	System.setProperty("swt.autoScale.updateOnRuntime", "true");
	System.setProperty("swt.autoScale", "int200");
	System.setProperty("swt.autoScale.force", "true");
	Display display = new Display ();
	Shell shell = new Shell(display);
	shell.setText("Autoscale snippet");
	shell.open ();
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
	display.dispose ();
}

Scenario#4: Starting application with -Dswt.autoScale=quarter

Result: App should start, and user should be able to turn on/off the monitor-specific scaling in Appearance page.

image

Note: following is the list of allowed autoscale values to be paired with monitor-specific scaling: ["false", "quarter", "exact"]

Dependency

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

Test Results

0 files   -  3 018  0 suites   - 3 018   0s ⏱️ - 2h 23m 4s
0 tests  -  8 234  0 ✅  -  7 985  0 💤  - 249  0 ❌ ±0 
0 runs   - 23 622  0 ✅  - 22 828  0 💤  - 794  0 ❌ ±0 

Results for commit 938b37b. ± Comparison against base commit 3a441d9.

♻️ This comment has been updated with latest results.

@ShahzaibIbrahim
Copy link
Contributor Author

Test failures are due to dependent PR: eclipse-platform/eclipse.platform.swt#2709 not being merged yet.

These changes have following affects:

- Upon starting eclipse product when monitor-specific scaling is set
with unsupported autoscale mode, it will show a error dialog and
application won't start.
- User won't be able to enable monitor-specific scaling from appearance
page if unsupported autoscale mode is set from property or ini file.
- User can then either force the unsupported autoscale mode with monitor
specific-scaling by setting swt.autoScale.force to true or switch to
supported autoscale mode.
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.

Limit monitor-specific scaling to supported autoscale modes

1 participant