On Wed, 9 Nov 2022 19:29:30 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> I initially had the same thought that Andy had, but I want to take a closer >> look -- especially at what similar layout panes do. >> >> As for the point about doing this only when `snapPixels == true`, yes, but >> you don't need to worry about that if you call the `snapXXX` methods in >> Region. All of them check the `snapToPixel` attribute. > > I looked at the other layout panes and they already do something similar to > what this PR does, using the snapped insets for intermediate compuation. I > also note that some of the computation is calling superclass methods that do > snapping already, and expect it to be added to snapped insets (if there are > insets), for example, `computeWidth()`. In this particular case -- > `snappedLeftInset() + leftAnchor` -- I don't think `leftAnchor` is snapped, > but it probably should be. Yeah I think so too. ------------- PR: https://git.openjdk.org/jfx/pull/910