Skip to content

Commit 96d4f16

Browse files
author
Thomas Singer
committed
DPIUtil: introduce swt.autoScale=halfUp
1 parent e6588c2 commit 96d4f16

File tree

1 file changed

+2
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal

1 file changed

+2
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,8 @@ public static int getZoomForAutoscaleProperty (int nativeDeviceZoom) {
630630
if (autoScaleValue != null) {
631631
if ("false".equalsIgnoreCase (autoScaleValue)) {
632632
zoom = 100;
633+
} else if ("halfUp".equalsIgnoreCase (autoScaleValue)) {
634+
zoom = (nativeDeviceZoom + 50) / 100 * 100;
633635
} else if ("half".equalsIgnoreCase (autoScaleValue)) {
634636
// Math.round rounds 125->150 and 175->200,
635637
// Math.rint rounds 125->100 and 175->200 matching

0 commit comments

Comments
 (0)