Skip to content

Commit

Permalink
DPIUtil: introduce swt.autoScale=halfUp
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Singer committed Nov 21, 2024
1 parent e6588c2 commit 96d4f16
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ public static int getZoomForAutoscaleProperty (int nativeDeviceZoom) {
if (autoScaleValue != null) {
if ("false".equalsIgnoreCase (autoScaleValue)) {
zoom = 100;
} else if ("halfUp".equalsIgnoreCase (autoScaleValue)) {
zoom = (nativeDeviceZoom + 50) / 100 * 100;
} else if ("half".equalsIgnoreCase (autoScaleValue)) {
// Math.round rounds 125->150 and 175->200,
// Math.rint rounds 125->100 and 175->200 matching
Expand Down

0 comments on commit 96d4f16

Please sign in to comment.