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

Nested calls to snap methods in Region give different results

    XMLWordPrintable

Details

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

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: