Skip to content

Commit 36e13f6

Browse files
HeikoKlareakoch-yatta
authored andcommitted
Use proper autoscale value for splash screen scaling
The splash screen is initialized by the Equinox native launcher such that when the Workbench takes it over, the autoscaling settings used for processing it must fit to avoid a wrongly sized background image and controls. Since the autoscaling default used to be "integer" and any other value was only defined by a system property, reading that system property was sufficient. With the adaptation of SWT and Equinox to default to autoscaling mode "quarter" on Windows when monitor-specific scaling is used, reading the system property is not sufficient anymore as it also depends on whether monitor-specific scaling is enabled. This change adapts the identification of the proper autoscaling mode by just reading it from the SWT configuration. This also ensure that it will be resilient against potential future changes of default settings.
1 parent 34498a4 commit 36e13f6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3666,14 +3666,12 @@ protected String createId() {
36663666
}
36673667

36683668
private static class AutoscaleAdaptation {
3669-
private static final String SWT_AUTOSCALE = "swt.autoScale"; //$NON-NLS-1$
3670-
36713669
private boolean incompatibleMonitorSpecificScalingDisabled;
36723670

36733671
private final String initialAutoScaleValue;
36743672

36753673
public AutoscaleAdaptation() {
3676-
initialAutoScaleValue = System.getProperty(SWT_AUTOSCALE);
3674+
initialAutoScaleValue = DPIUtil.getEffectiveAutoScaleValue();
36773675
}
36783676

36793677
public void runWithInitialAutoScaleValue(Runnable runnable) {

0 commit comments

Comments
 (0)