On Thu, 10 Nov 2022 17:14:56 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> Yeah I think so too. > > I still think this code is incorrect. > > To illustrate, let's set insets to 0.8 and anchor to 0.5 > Here is what I think it should do: > snap=off > result=1.3 > > snap=on > result=1.0 (and not 1.5, as I think the proposed fix would produce) I also never understood that completely. Hence I asked at the mailing list about snapping in the past: https://mail.openjdk.org/pipermail/openjfx-dev/2021-September/032166.html In my opinion it also makes sense to snap the values once. But that would be a huge refactoring and everything is affected. We can not just change this now. Thats why I would stick to the existing solution and refactor that later. But some clarification here would be helpful here, maybe ask the people who created this (if available)?. And I haven't looked yet, but how does Swing handle this? ------------- PR: https://git.openjdk.org/jfx/pull/910