Skip to content

Commit bcae3fe

Browse files
committed
Revert "Activate monitor-specific scaling before Display instantiation"
This reverts commit 3587081. It introduced a regression as preferences cannot be read that early during startup. Fixes #2712
1 parent de8c667 commit bcae3fe

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ public static int createAndRunWorkbench(final Display display, final WorkbenchAd
588588
int orientation = store.getInt(IPreferenceConstants.LAYOUT_DIRECTION);
589589
Window.setDefaultOrientation(orientation);
590590
}
591+
setRescaleAtRuntimePropertyFromPreference();
591592
if (obj instanceof E4Application) {
592593
E4Application e4app = (E4Application) obj;
593594
E4Workbench e4Workbench = e4app.createE4Workbench(getApplicationContext(), display);
@@ -683,9 +684,9 @@ public void update() {
683684

684685
private static void setRescaleAtRuntimePropertyFromPreference() {
685686
if (System.getProperty(SWT_RESCALE_AT_RUNTIME_PROPERTY) != null) {
686-
WorkbenchPlugin.log(Status.warning(SWT_RESCALE_AT_RUNTIME_PROPERTY
687-
+ " is configured (e.g., via the INI), but the according preference should be preferred instead." //$NON-NLS-1$
688-
));
687+
WorkbenchPlugin.log(StatusUtil.newStatus(IStatus.WARNING, SWT_RESCALE_AT_RUNTIME_PROPERTY
688+
+ " is configured (e.g., via the INI), but the according preference should be preferred instead.", //$NON-NLS-1$
689+
new RuntimeException()));
689690
} else {
690691
boolean rescaleAtRuntime = PrefUtil.getAPIPreferenceStore()
691692
.getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME);
@@ -757,8 +758,6 @@ public static Display createDisplay() {
757758
Display.setAppName(applicationName);
758759
}
759760

760-
setRescaleAtRuntimePropertyFromPreference();
761-
762761
// create the display
763762
Display newDisplay = Display.getCurrent();
764763
if (newDisplay == null) {

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/messages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ RescaleAtRuntimeSettingChangeWarningTitle = DPI Setting Changed
504504
RescaleAtRuntimeSettingChangeWarningText = Restart for the DPI setting changes to take effect
505505
HiDpiSettingsGroupTitle = HiDPI settings
506506
RescaleAtRuntimeEnabled = Monitor-specific UI &scaling
507-
RescaleAtRuntimeDisclaimer = EXPERIMENTAL! Activating this option will dynamically scale all windows according to the monitor they are currently in. It is still in development and therefore considered experimental.
507+
RescaleAtRuntimeDisclaimer = EXPERIMENTAL! Activating this option will dynamically scale all windows according to the monitor they are currently in. It will also set the default browser to Edge in order to provide the appropriate scaling of content displayed in a browser. This feature is still in development and therefore considered experimental.
508508
# --- Workbench -----
509509
WorkbenchPreference_openMode=Open mode
510510
WorkbenchPreference_doubleClick=D&ouble click

0 commit comments

Comments
 (0)