JDK-8255415 : Nested calls to snap methods in Region give different results
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx11,openjfx15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-10-26
  • Updated: 2020-12-01
  • Resolved: 2020-11-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx11.0.10Fixed
Related Reports
Relates :  
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.
Comments
Changeset: c31ed6bf Author: Jose Pereda <jpereda@openjdk.org> Date: 2020-11-02 17:26:25 +0000 URL: https://github.com/openjdk/jfx/commit/c31ed6bf
02-11-2020