RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

Andy Goryachev angorya at openjdk.org
Thu Nov 10 17:22:37 UTC 2022


On Wed, 9 Nov 2022 19:32:20 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/layout/AnchorPane.java line 364:
>> 
>>> 362:             }
>>> 363: 
>>> 364:             child.resizeRelocate(x, y, w, h);
>> 
>> snapping should be done at this moment, I think, something like this:
>> 
>> child.resizeRelocate(
>>   snapPositionX(x),
>>   snapPositionY(y),
>>   snapSizeX(w),
>>   snapSizeY(h));
>> 
>> and keep the original (unsnapped) code prior to this.
>
> It depends (see earlier discussion), but if we are going to snap the intermediate results, we need to be sure we are doing it consistently -- adding snapped insets to an unsnapped value is very likely the wrong thing to do.

not only for consistency, but we should also understand whether it makes sense or not.

for example, we might snap intermediate results such as guide lines, if that makes sense (e.g. for alignment), but most importantly, we must honor the snapToPixel setting for the end result.  If it's true, then all child nodes must have integer coordinates and sizes.

Would you agree?

-------------

PR: https://git.openjdk.org/jfx/pull/910


More information about the openjfx-dev mailing list