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