Skip to content

Commit 296fa08

Browse files
committed
[Win32] Enable monitor-specific scaling by default
The monitor-specific UI scaling on Windows is disabled by default and can be activated via a preference. This change inverts the default enablement: it enables the feature by default and allows to disable it via preference. The existing experimental preference is renamed to reset the configuration for every consumer. All information about the feature being experimental is removed.
1 parent b6af990 commit 296fa08

File tree

6 files changed

+17
-14
lines changed

6 files changed

+17
-14
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<component id="org.eclipse.ui.workbench" version="2">
3+
<resource path="eclipseui/org/eclipse/ui/IWorkbenchPreferenceConstants.java" type="org.eclipse.ui.IWorkbenchPreferenceConstants">
4+
<filter id="388194388">
5+
<message_arguments>
6+
<message_argument value="org.eclipse.ui.IWorkbenchPreferenceConstants"/>
7+
<message_argument value="RESCALING_AT_RUNTIME"/>
8+
<message_argument value="RESCALING_AT_RUNTIME"/>
9+
</message_arguments>
10+
</filter>
11+
</resource>
12+
</component>

Diff for: bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/IWorkbenchPreferenceConstants.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,10 @@ public interface IWorkbenchPreferenceConstants {
722722

723723
/**
724724
* <p>
725-
* <strong>EXPERIMENTAL</strong>. Whether the UI adapts to DPI changes at
726-
* runtime. It only effects Windows.
725+
* Whether the UI adapts to DPI changes at runtime. It only effects Windows.
727726
* </p>
728727
*
729728
* @since 3.134
730729
*/
731-
String RESCALING_AT_RUNTIME = "RESCALING_AT_RUNTIME"; //$NON-NLS-1$
730+
String RESCALING_AT_RUNTIME = "monitorSpecificScaling"; //$NON-NLS-1$
732731
}

Diff for: bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ private static void setRescaleAtRuntimePropertyFromPreference() {
691691
));
692692
} else {
693693
boolean rescaleAtRuntime = ConfigurationScope.INSTANCE.getNode(WorkbenchPlugin.PI_WORKBENCH)
694-
.getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false);
694+
.getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, true);
695695
System.setProperty(SWT_RESCALE_AT_RUNTIME_PROPERTY, Boolean.toString(rescaleAtRuntime));
696696
}
697697
}

Diff for: bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchMessages.java

-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public class WorkbenchMessages extends NLS {
3838

3939
public static String RescaleAtRuntimeEnabled;
4040

41-
public static String RescaleAtRuntimeDisclaimer;
42-
4341
public static String RescaleAtRuntimeSettingChangeWarningTitle;
4442

4543
public static String RescaleAtRuntimeSettingChangeWarningText;

Diff for: bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import org.eclipse.jface.dialogs.MessageDialog;
5656
import org.eclipse.jface.fieldassist.ControlDecoration;
5757
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
58-
import org.eclipse.jface.layout.GridDataFactory;
5958
import org.eclipse.jface.preference.IPreferenceStore;
6059
import org.eclipse.jface.preference.PreferencePage;
6160
import org.eclipse.jface.util.Util;
@@ -214,13 +213,9 @@ private void createHiDPISettingsGroup(Composite parent) {
214213
group.setFont(parent.getFont());
215214
GridLayout layout = new GridLayout(1, false);
216215
group.setLayout(layout);
217-
Label infoLabel = new Label(group, SWT.WRAP);
218-
infoLabel.setText(WorkbenchMessages.RescaleAtRuntimeDisclaimer);
219-
infoLabel.setLayoutData(GridDataFactory.defaultsFor(infoLabel).create());
220-
createLabel(group, ""); //$NON-NLS-1$
221216

222217
boolean initialStateRescaleAtRuntime = ConfigurationScope.INSTANCE.getNode(WorkbenchPlugin.PI_WORKBENCH)
223-
.getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false);
218+
.getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, true);
224219
rescaleAtRuntime = createCheckButton(group, WorkbenchMessages.RescaleAtRuntimeEnabled, initialStateRescaleAtRuntime);
225220
}
226221

Diff for: bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/messages.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,7 @@ ThemeChangeWarningTitle = Theme Changed
503503
RescaleAtRuntimeSettingChangeWarningTitle = DPI Setting Changed
504504
RescaleAtRuntimeSettingChangeWarningText = Restart for the DPI setting changes to take effect
505505
HiDpiSettingsGroupTitle = HiDPI settings
506-
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.
506+
RescaleAtRuntimeEnabled = Use monitor-specific UI &scaling
508507
# --- Workbench -----
509508
WorkbenchPreference_openMode=Open mode
510509
WorkbenchPreference_doubleClick=D&ouble click

0 commit comments

Comments
 (0)