Skip to content
Merged
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 @@ -605,10 +605,6 @@ public static int getDeviceZoom() {
return deviceZoom;
}

public static int getDeviceZoom(String autoScaleProperty) {
return getZoomForAutoscaleProperty(nativeDeviceZoom, autoScaleProperty);
}

public static void setDeviceZoom (int nativeDeviceZoom) {
DPIUtil.nativeDeviceZoom = nativeDeviceZoom;
int deviceZoom = getZoomForAutoscaleProperty (nativeDeviceZoom);
Expand Down Expand Up @@ -676,6 +672,16 @@ private static int getZoomForAutoscaleProperty (int nativeDeviceZoom, String aut
return zoom;
}

public static void runWithAutoScaleValue(String autoScaleValue, Runnable runnable) {
String initialAutoScaleValue = DPIUtil.autoScaleValue;
DPIUtil.autoScaleValue = autoScaleValue;
try {
runnable.run();
} finally {
DPIUtil.autoScaleValue = initialAutoScaleValue;
}
}

public static void setMonitorSpecificScaling(boolean activate) {
System.setProperty(SWT_AUTOSCALE_UPDATE_ON_RUNTIME, Boolean.toString(activate));
}
Expand Down
Loading