Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255415

Nested calls to snap methods in Region give different results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jfx16
    • jfx11, jfx15
    • javafx
    • None

        Region has snapSizeX and snapSizeY methods that use Math.ceil, and depending on numerical errors, calling them twice can lead to different results, but when snapping an already snapped value (either intentionally or by mistake), the result should be the same, otherwise we'll be jumping unnecessary from a valid pixel to another pixel.

        This error can be found for instance on Windows with UI scale 175%. Some controls like the CheckBox, are laid out with ellipses as a consequence of wrong calculations.

              jpereda Jose Pereda
              jpereda Jose Pereda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: