RFR: 8274669: Dialog sometimes ignores max height
Marius Hanl
mhanl at openjdk.java.net
Mon Oct 4 07:13:31 UTC 2021
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.
-------------
Commit messages:
- 8274669: Dialog sometimes ignores max height
Changes: https://git.openjdk.java.net/jfx/pull/637/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=637&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274669
Stats: 108 lines in 2 files changed: 107 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jfx/pull/637.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/637/head:pull/637
PR: https://git.openjdk.java.net/jfx/pull/637
More information about the openjfx-dev
mailing list