RFR: 8350149: VBox ignores bias of child controls when fillWidth is set to false [v4]

Glavo duke at openjdk.org
Sat Jul 5 06:20:46 UTC 2025


On Sat, 5 Jul 2025 02:32:18 GMT, Glavo <duke at openjdk.org> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Clarify terms
>
> Unfortunately, this commit caused our app to behave abnormally :(
> 
> I know this is a problem with our app, I will try to fix it. But what I want to say is that this PR does break some real-world applications, and maybe a workaround is really needed to make them work.

> @Glavo I'd be interested in what problem you're running into (maybe before/after description?). Perhaps there is a bug in the fix. It's also possible you inadvertently have been relying on the behavior where content bias is sometimes ignored, which was a bug. All FX containers always respect content bias. In that case the only solution is to modify your layout a bit. Let me know if I can be of help.

We encountered this problem. The content of this page (excluding the title bar) is a `BorderPane`, and the red box is the content of its center, a `FlowPane`.

![image](https://github.com/user-attachments/assets/fa373e33-c5b8-40aa-83ae-64fc71733641)

In OpenJFX 25+9 and earlier, the height of this `FlowPane` was 280 pixels, but since 25+10, its height has grown to 576 pixels, so that the interface layout is broken.

![image](https://github.com/user-attachments/assets/dfff7048-32fa-42e5-8dd7-ab3925a5d9a5)

It is not difficult for us to solve this problem. Wrapping this `FlowPane` in a `ScrollPane` will restore its height to normal. However, I still don’t understand the specific reason behind it.

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

PR Comment: https://git.openjdk.org/jfx/pull/1723#issuecomment-3038246961


More information about the openjfx-dev mailing list