mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
ComboBox and Spinner: fixed too wide arrow button if component is higher than preferred (issue #302)
This commit is contained in:
@@ -74,6 +74,10 @@ public class FlatTextComponentsTest
|
||||
JComboBox<String> comboBox3 = new JComboBox<>();
|
||||
JLabel spinnerLabel = new JLabel();
|
||||
JSpinner spinner1 = new JSpinner();
|
||||
JSpinner spinner2 = new JSpinner();
|
||||
JSpinner spinner3 = new JSpinner();
|
||||
JComboBox comboBox2 = new JComboBox();
|
||||
JComboBox comboBox4 = new JComboBox();
|
||||
JPopupMenu popupMenu1 = new JPopupMenu();
|
||||
JMenuItem cutMenuItem = new JMenuItem();
|
||||
JMenuItem copyMenuItem = new JMenuItem();
|
||||
@@ -97,6 +101,10 @@ public class FlatTextComponentsTest
|
||||
"[50,fill]" +
|
||||
"[50,fill]" +
|
||||
"[]" +
|
||||
"[]para" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]"));
|
||||
|
||||
//---- textFieldLabel ----
|
||||
@@ -307,6 +315,24 @@ public class FlatTextComponentsTest
|
||||
spinner1.setName("spinner1");
|
||||
add(spinner1, "cell 1 7,growx");
|
||||
|
||||
//---- spinner2 ----
|
||||
spinner2.setName("spinner2");
|
||||
add(spinner2, "cell 1 8,growx,height 40");
|
||||
|
||||
//---- spinner3 ----
|
||||
spinner3.setName("spinner3");
|
||||
add(spinner3, "cell 1 9,growx,hmax 14");
|
||||
|
||||
//---- comboBox2 ----
|
||||
comboBox2.setEditable(true);
|
||||
comboBox2.setName("comboBox2");
|
||||
add(comboBox2, "cell 1 10,growx,height 40");
|
||||
|
||||
//---- comboBox4 ----
|
||||
comboBox4.setEditable(true);
|
||||
comboBox4.setName("comboBox4");
|
||||
add(comboBox4, "cell 1 11,growx,hmax 14");
|
||||
|
||||
//======== popupMenu1 ========
|
||||
{
|
||||
popupMenu1.setName("popupMenu1");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "7.0.3.1.342" Java: "16" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -10,7 +10,7 @@ new FormModel {
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[][][::100][100,fill][fill]"
|
||||
"$rowConstraints": "[][][][50,fill][50,fill][50,fill][][]"
|
||||
"$rowConstraints": "[][][][50,fill][50,fill][50,fill][][]para[][][][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
@@ -233,9 +233,31 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 7,growx"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JSpinner" ) {
|
||||
name: "spinner2"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 8,growx,height 40"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JSpinner" ) {
|
||||
name: "spinner3"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 9,growx,hmax 14"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "comboBox2"
|
||||
"editable": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 10,growx,height 40"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "comboBox4"
|
||||
"editable": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 11,growx,hmax 14"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 530, 340 )
|
||||
"size": new java.awt.Dimension( 530, 580 )
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) {
|
||||
name: "popupMenu1"
|
||||
@@ -252,7 +274,7 @@ new FormModel {
|
||||
"text": "Paste"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 390 )
|
||||
"location": new java.awt.Point( 0, 680 )
|
||||
"size": new java.awt.Dimension( 91, 87 )
|
||||
} )
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user