Integrated: 8274669: Dialog sometimes ignores max height
Marius Hanl
mhanl at openjdk.java.net
Tue Oct 26 04:35:14 UTC 2021
On Sat, 2 Oct 2021 23:53:02 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
> This PR fixes a visual glitch which may happen when showing a dialog.
> When a max height is set and the pref height of the dialog content is bigger the dialog starts to flicker between the max height and the pref height.
>
> This happens because in one case the height is not bound between the min and the max height (-> max height is ignored).
> - First layout pass: The dialog will incorrectly resize to a the pref height, which is bigger than the max height
> - Second layout pass: The dialog will correctly resize to the max height
> - repeat
>
> The fix is to bound the height there as well (Fix in **layoutChildren()**).
> Example where a red stackpane has a bigger pref height then the max height of the dialog (see also example in ticket):
>
> https://user-images.githubusercontent.com/66004280/135734463-03b422f4-710d-4436-9715-c91bdb768d76.mp4
>
> * only the max height test fails before and succeeds after.
This pull request has now been integrated.
Changeset: 717cfdc8
Author: Marius Hanl <mhanl at openjdk.org>
Committer: Ajit Ghaisas <aghaisas at openjdk.org>
URL: https://git.openjdk.java.net/jfx/commit/717cfdc85817aee57d5326e592340c849382d7a4
Stats: 108 lines in 2 files changed: 107 ins; 0 del; 1 mod
8274669: Dialog sometimes ignores max height
Reviewed-by: aghaisas
-------------
PR: https://git.openjdk.java.net/jfx/pull/637
More information about the openjfx-dev
mailing list