mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Icons: scale checkbox and radiobutton icons when using text styles large, medium, small and mini (issue #1061)
https://www.formdev.com/flatlaf/typography/#text_styles Theme Editor: added to preview
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "8.3" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -146,8 +146,8 @@ new FormModel {
|
||||
"value": "cell 0 16"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 5, 0 )
|
||||
"size": new java.awt.Dimension( 335, 495 )
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 335, 675 )
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets 0,hidemode 3"
|
||||
@@ -188,7 +188,7 @@ new FormModel {
|
||||
"value": "cell 1 0"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 5, 545 )
|
||||
"location": new java.awt.Point( 0, 715 )
|
||||
"size": new java.awt.Dimension( 235, 65 )
|
||||
} )
|
||||
}
|
||||
|
||||
@@ -206,6 +206,24 @@ class FlatThemePreviewSwitches
|
||||
JLabel label32 = new JLabel();
|
||||
FlatThemePreviewSwitches.ZoomRadioButton radioButton1 = new FlatThemePreviewSwitches.ZoomRadioButton();
|
||||
FlatThemePreviewSwitches.ZoomRadioButton radioButton2 = new FlatThemePreviewSwitches.ZoomRadioButton();
|
||||
JLabel label39 = new JLabel();
|
||||
JLabel label5 = new JLabel();
|
||||
JLabel label6 = new JLabel();
|
||||
JLabel largeLabel = new JLabel();
|
||||
JCheckBox largeCheckBox = new JCheckBox();
|
||||
JRadioButton largeRadioButton = new JRadioButton();
|
||||
JLabel defaultLabel = new JLabel();
|
||||
JCheckBox defaultCheckBox = new JCheckBox();
|
||||
JRadioButton defaultRadioButton = new JRadioButton();
|
||||
JLabel mediumLabel = new JLabel();
|
||||
JCheckBox mediumCheckBox = new JCheckBox();
|
||||
JRadioButton mediumRadioButton = new JRadioButton();
|
||||
JLabel smallLabel = new JLabel();
|
||||
JCheckBox smallCheckBox = new JCheckBox();
|
||||
JRadioButton smallRadioButton = new JRadioButton();
|
||||
JLabel miniLabel = new JLabel();
|
||||
JCheckBox miniCheckBox = new JCheckBox();
|
||||
JRadioButton miniRadioButton = new JRadioButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
@@ -236,6 +254,13 @@ class FlatThemePreviewSwitches
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]unrel" +
|
||||
"[]para" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]"));
|
||||
|
||||
//======== panel1 ========
|
||||
@@ -583,6 +608,91 @@ class FlatThemePreviewSwitches
|
||||
radioButton2.setSelected(true);
|
||||
add(radioButton2, "cell 2 16");
|
||||
|
||||
//---- label39 ----
|
||||
label39.setText("Sizes");
|
||||
label39.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
add(label39, "cell 0 17 3 1");
|
||||
|
||||
//---- label5 ----
|
||||
label5.setText("JCheckBox");
|
||||
add(label5, "cell 1 18 3 1,alignx left,growx 0");
|
||||
|
||||
//---- label6 ----
|
||||
label6.setText("JRadioButton");
|
||||
add(label6, "cell 4 18 3 1,alignx left,growx 0");
|
||||
|
||||
//---- largeLabel ----
|
||||
largeLabel.setText("large");
|
||||
largeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "large");
|
||||
add(largeLabel, "cell 0 19");
|
||||
|
||||
//---- largeCheckBox ----
|
||||
largeCheckBox.setText("Text");
|
||||
largeCheckBox.putClientProperty(FlatClientProperties.STYLE_CLASS, "large");
|
||||
add(largeCheckBox, "cell 1 19 3 1,alignx left,growx 0");
|
||||
|
||||
//---- largeRadioButton ----
|
||||
largeRadioButton.setText("Text");
|
||||
largeRadioButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "large");
|
||||
add(largeRadioButton, "cell 4 19 3 1,alignx left,growx 0");
|
||||
|
||||
//---- defaultLabel ----
|
||||
defaultLabel.setText("default");
|
||||
add(defaultLabel, "cell 0 20");
|
||||
|
||||
//---- defaultCheckBox ----
|
||||
defaultCheckBox.setText("Text");
|
||||
add(defaultCheckBox, "cell 1 20 3 1,alignx left,growx 0");
|
||||
|
||||
//---- defaultRadioButton ----
|
||||
defaultRadioButton.setText("Text");
|
||||
add(defaultRadioButton, "cell 4 20 3 1,alignx left,growx 0");
|
||||
|
||||
//---- mediumLabel ----
|
||||
mediumLabel.setText("medium");
|
||||
mediumLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium");
|
||||
add(mediumLabel, "cell 0 21");
|
||||
|
||||
//---- mediumCheckBox ----
|
||||
mediumCheckBox.setText("Text");
|
||||
mediumCheckBox.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium");
|
||||
add(mediumCheckBox, "cell 1 21 3 1,alignx left,growx 0");
|
||||
|
||||
//---- mediumRadioButton ----
|
||||
mediumRadioButton.setText("Text");
|
||||
mediumRadioButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium");
|
||||
add(mediumRadioButton, "cell 4 21 3 1,alignx left,growx 0");
|
||||
|
||||
//---- smallLabel ----
|
||||
smallLabel.setText("small");
|
||||
smallLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
add(smallLabel, "cell 0 22");
|
||||
|
||||
//---- smallCheckBox ----
|
||||
smallCheckBox.setText("Text");
|
||||
smallCheckBox.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
add(smallCheckBox, "cell 1 22 3 1,alignx left,growx 0");
|
||||
|
||||
//---- smallRadioButton ----
|
||||
smallRadioButton.setText("Text");
|
||||
smallRadioButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
add(smallRadioButton, "cell 4 22 3 1,alignx left,growx 0");
|
||||
|
||||
//---- miniLabel ----
|
||||
miniLabel.setText("mini");
|
||||
miniLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "mini");
|
||||
add(miniLabel, "cell 0 23");
|
||||
|
||||
//---- miniCheckBox ----
|
||||
miniCheckBox.setText("Text");
|
||||
miniCheckBox.putClientProperty(FlatClientProperties.STYLE_CLASS, "mini");
|
||||
add(miniCheckBox, "cell 1 23 3 1,alignx left,growx 0");
|
||||
|
||||
//---- miniRadioButton ----
|
||||
miniRadioButton.setText("Text");
|
||||
miniRadioButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "mini");
|
||||
add(miniRadioButton, "cell 4 23 3 1,alignx left,growx 0");
|
||||
|
||||
//---- buttonGroup1 ----
|
||||
ButtonGroup buttonGroup1 = new ButtonGroup();
|
||||
buttonGroup1.add(zoom1xButton);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "8.3" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -9,7 +9,7 @@ new FormModel {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[fill][sizegroup 1,center][sizegroup 1,center][sizegroup 1,center]para[sizegroup 2,center][sizegroup 2,center][sizegroup 2,center]0[grow,fill]"
|
||||
"$rowConstraints": "[]para[][]3[][][][][]unrel[]para[][]3[][][][][]unrel[]"
|
||||
"$rowConstraints": "[]para[][]3[][][][][]unrel[]para[][]3[][][][][]unrel[]para[][][][][][][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
@@ -521,19 +521,140 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 2 16"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label39"
|
||||
"text": "Sizes"
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 17 3 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label5"
|
||||
"text": "JCheckBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 18 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label6"
|
||||
"text": "JRadioButton"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 18 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "largeLabel"
|
||||
"text": "large"
|
||||
"$client.FlatLaf.styleClass": "large"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 19"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "largeCheckBox"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "large"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 19 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||
name: "largeRadioButton"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "large"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 19 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "defaultLabel"
|
||||
"text": "default"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 20"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "defaultCheckBox"
|
||||
"text": "Text"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 20 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||
name: "defaultRadioButton"
|
||||
"text": "Text"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 20 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "mediumLabel"
|
||||
"text": "medium"
|
||||
"$client.FlatLaf.styleClass": "medium"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 21"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "mediumCheckBox"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "medium"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 21 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||
name: "mediumRadioButton"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "medium"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 21 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "smallLabel"
|
||||
"text": "small"
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 22"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "smallCheckBox"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 22 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||
name: "smallRadioButton"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 22 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "miniLabel"
|
||||
"text": "mini"
|
||||
"$client.FlatLaf.styleClass": "mini"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 23"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "miniCheckBox"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "mini"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 3 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||
name: "miniRadioButton"
|
||||
"text": "Text"
|
||||
"$client.FlatLaf.styleClass": "mini"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 23 3 1,alignx left,growx 0"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 325, 515 )
|
||||
"size": new java.awt.Dimension( 325, 685 )
|
||||
} )
|
||||
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||
name: "buttonGroup1"
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 580 )
|
||||
"location": new java.awt.Point( 0, 735 )
|
||||
} )
|
||||
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||
name: "buttonGroup2"
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 634 )
|
||||
"location": new java.awt.Point( 0, 790 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1319,6 +1319,14 @@ ViewportUI
|
||||
[style].small
|
||||
[style]Button.clearButton
|
||||
[style]Button.inTextField
|
||||
[style]CheckBox.large
|
||||
[style]CheckBox.medium
|
||||
[style]CheckBox.mini
|
||||
[style]CheckBox.small
|
||||
[style]RadioButton.large
|
||||
[style]RadioButton.medium
|
||||
[style]RadioButton.mini
|
||||
[style]RadioButton.small
|
||||
[style]ToggleButton.inTextField
|
||||
[style]ToolBar.inTextField
|
||||
[style]ToolBarSeparator.inTextField
|
||||
|
||||
Reference in New Issue
Block a user