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

Nested calls to snap methods in Region give different results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: openjfx11, openjfx15
    • Fix Version/s: openjfx16
    • Component/s: javafx
    • Labels:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: