-
Notifications
You must be signed in to change notification settings - Fork 187
Limit autoscale mode to quarter and exact only #2771
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
base: master
Are you sure you want to change the base?
Conversation
Test Results 118 files + 7 118 suites +7 19m 34s ⏱️ + 1m 53s Results for commit e66f2c4. ± Comparison against base commit 63d5582. This pull request removes 3 and adds 56 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
0780f14 to
4ee56bc
Compare
swt applications will be limited to use autoscale modes quarter and exact only otherwise user will see an error message stating the incompatibility. Also the tests testing other autoscale values have been removed.
4ee56bc to
e66f2c4
Compare
|
|
||
| if (ALLOWED_AUTOSCALE_VALUES_FOR_UPDATE_ON_RUNTIME.contains(DPIUtil.getAutoScaleValue().toLowerCase())) { | ||
| // Default means: treat as "quarter" (compatible) | ||
| if (autoScaleValue == null || "true".equalsIgnoreCase(System.getProperty(SWT_AUTOSCALE_DISABLE_COMPATIBILITY_CHECK))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of comparing string, I think it makes it cleaner to directly parse the property as boolean, using Boolean.parseBoolean(System.getProperty(SWT_AUTOSCALE_DISABLE_COMPATIBILITY_CHECK))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. It usually makes sense to use System.getProperty() when you want to allow that no value for the property needs to be specified to enable it, e.g., -Dswt.autoScale.force without =true. Then you can do something like
Object disableCompatibilityCheck = System.getProperty(SWT_AUTOSCALE_DISABLE_COMPATIBILITY_CHECK);
if (disableCompatibilityCheck != null && !"false".equalsIgnoreCase(disableCompatibilityCheck) {
...
}
swt applications will be limited to use autoscale modes quarter and exact only otherwise user will see an error message stating the incompatibility. Also the tests testing other autoscale values have been removed.
This PR will further affect: eclipse-platform/eclipse.platform.ui#3475