mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
This commit is contained in:
@@ -23,6 +23,8 @@ FlatLaf Change Log
|
||||
as row header in scroll pane. (issues #152 and #46)
|
||||
- TableHeader: Fixed position of column separators in right-to-left component
|
||||
orientation.
|
||||
- ToolTip: Fixed drop shadow for wide tooltips on Windows and Java 9+. (issue
|
||||
#224)
|
||||
- SwingX: Fixed striping background highlighting color (e.g. alternating table
|
||||
rows) in dark themes.
|
||||
|
||||
|
||||
@@ -271,16 +271,17 @@ public class FlatPopupFactory
|
||||
|
||||
// increase tooltip size if necessary because it may be too small on HiDPI screens
|
||||
// https://bugs.openjdk.java.net/browse/JDK-8213535
|
||||
if( contents instanceof JToolTip ) {
|
||||
if( contents instanceof JToolTip && popupWindow == null ) {
|
||||
Container parent = contents.getParent();
|
||||
if( parent instanceof JPanel ) {
|
||||
Dimension prefSize = parent.getPreferredSize();
|
||||
if( !prefSize.equals( parent.getSize() ) ) {
|
||||
Container panel = SwingUtilities.getAncestorOfClass( Panel.class, parent );
|
||||
if( panel != null )
|
||||
panel.setSize( prefSize ); // for medium weight popup
|
||||
else
|
||||
parent.setSize( prefSize ); // for light weight popup
|
||||
Container mediumWeightPanel = SwingUtilities.getAncestorOfClass( Panel.class, parent );
|
||||
Container c = (mediumWeightPanel != null)
|
||||
? mediumWeightPanel // medium weight popup
|
||||
: parent; // light weight popup
|
||||
c.setSize( prefSize );
|
||||
c.validate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,6 +487,7 @@ public class FlatComponentsTest
|
||||
|
||||
//---- toggleButton1 ----
|
||||
toggleButton1.setText("Enabled");
|
||||
toggleButton1.setToolTipText("LOOOOOOOOOOOOOONG TEXT");
|
||||
add(toggleButton1, "cell 1 2");
|
||||
|
||||
//---- toggleButton9 ----
|
||||
|
||||
@@ -159,6 +159,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton1"
|
||||
"text": "Enabled"
|
||||
"toolTipText": "LOOOOOOOOOOOOOONG TEXT"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 2"
|
||||
} )
|
||||
|
||||
Reference in New Issue
Block a user