mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 23:07:15 -06:00
OptionPane: fixed rendering of longer HTML text (#12)
This commit is contained in:
@@ -23,6 +23,7 @@ import java.awt.GridBagConstraints;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicHTML;
|
||||
import javax.swing.plaf.basic.BasicOptionPaneUI;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
|
||||
@@ -122,6 +123,10 @@ public class FlatOptionPaneUI
|
||||
if( messagePadding > 0 )
|
||||
cons.insets.bottom = UIScale.scale( messagePadding );
|
||||
|
||||
// disable line wrapping for HTML
|
||||
if( msg instanceof String && BasicHTML.isHTMLString( (String) msg ) )
|
||||
maxll = Integer.MAX_VALUE;
|
||||
|
||||
super.addMessageComponents( container, cons, msg, maxll, internallyCreated );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user