JRE-927 Unexpected wrapping of bidirectional text in JEditorPane on HiDPI screens

port commit 11a5a4a2 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 65a5e450d5)

cherry picked from commit 47ff31ae82
This commit is contained in:
Dmitry Batrak
2018-12-24 17:42:30 +03:00
committed by Vitaly Provodin
parent bd89999539
commit 18bfc3e241

View File

@@ -242,7 +242,7 @@ public abstract class FlowView extends BoxView {
float min = layoutPool.getMinimumSpan(axis);
// Don't include insets, Box.getXXXSpan will include them.
r.minimum = (int)min;
r.preferred = Math.max(r.minimum, (int) pref);
r.preferred = Math.max(r.minimum, (int) Math.ceil(pref));
r.maximum = Integer.MAX_VALUE;
r.alignment = 0.5f;
return r;