mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
Button: make icon-only buttons square (no minimum width, smaller left/right insets)
This commit is contained in:
@@ -55,6 +55,7 @@ public class FlatComponentsTest
|
||||
FlatComponentsTest.TestDefaultButton button5 = new FlatComponentsTest.TestDefaultButton();
|
||||
JButton button3 = new JButton();
|
||||
JButton button12 = new JButton();
|
||||
JButton button13 = new JButton();
|
||||
JLabel toggleButtonLabel = new JLabel();
|
||||
JToggleButton toggleButton1 = new JToggleButton();
|
||||
JToggleButton toggleButton2 = new JToggleButton();
|
||||
@@ -246,6 +247,10 @@ public class FlatComponentsTest
|
||||
button12.setEnabled(false);
|
||||
add(button12, "cell 4 1");
|
||||
|
||||
//---- button13 ----
|
||||
button13.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
add(button13, "cell 5 1");
|
||||
|
||||
//---- toggleButtonLabel ----
|
||||
toggleButtonLabel.setText("JToggleButton:");
|
||||
add(toggleButtonLabel, "cell 0 2");
|
||||
|
||||
@@ -76,6 +76,12 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button13"
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "toggleButtonLabel"
|
||||
"text": "JToggleButton:"
|
||||
|
||||
Reference in New Issue
Block a user