Skip to content
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

Activate monitor-specific scaling before Display instantiation #2704

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ public static int createAndRunWorkbench(final Display display, final WorkbenchAd
int orientation = store.getInt(IPreferenceConstants.LAYOUT_DIRECTION);
Window.setDefaultOrientation(orientation);
}
setRescaleAtRuntimePropertyFromPreference();
if (obj instanceof E4Application) {
E4Application e4app = (E4Application) obj;
E4Workbench e4Workbench = e4app.createE4Workbench(getApplicationContext(), display);
Expand Down Expand Up @@ -684,9 +683,9 @@ public void update() {

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

setRescaleAtRuntimePropertyFromPreference();

// create the display
Display newDisplay = Display.getCurrent();
if (newDisplay == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ RescaleAtRuntimeSettingChangeWarningTitle = DPI Setting Changed
RescaleAtRuntimeSettingChangeWarningText = Restart for the DPI setting changes to take effect
HiDpiSettingsGroupTitle = HiDPI settings
RescaleAtRuntimeEnabled = Monitor-specific UI &scaling
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.
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.
# --- Workbench -----
WorkbenchPreference_openMode=Open mode
WorkbenchPreference_doubleClick=D&ouble click
Expand Down
Loading