diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f3063e..e9655a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ FlatLaf Change Log - System File Chooser allows using **operating system file dialogs** in Java Swing applications. (PR #988) - Zooming API. (PR #1051) +- Icons: + - Support scaling Laf icons (checkbox, radiobutton, etc). (issue #1061) + - Scale checkbox and radiobutton icons when using + [text styles](https://www.formdev.com/flatlaf/typography/#text_styles) + `large`, `medium`, `small` and `mini`. - TabbedPane: Added icon-only tab mode, which shows tab icons but hides tab titles. Tab titles are used in "Show Hidden Tabs" popup menu. (set client property `JTabbedPane.tabWidthMode` to `"iconOnly"`) diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index 7164ed02..b0cb557c 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -977,6 +977,24 @@ Tree.icon.openColor = @icon #---- Styles ------------------------------------------------------------------ +#---- scale icons ---- + +@largeScale = 1.125 +@mediumScale = 0.875 +@smallScale = 0.8125 +@miniScale = 0.75 + +[style]CheckBox.large = icon.scale: @largeScale; iconTextGap: 5 +[style]CheckBox.medium = icon.scale: @mediumScale +[style]CheckBox.small = icon.scale: @smallScale; iconTextGap: 3 +[style]CheckBox.mini = icon.scale: @miniScale; iconTextGap: 3 + +[style]RadioButton.large = icon.scale: @largeScale; iconTextGap: 5 +[style]RadioButton.medium = icon.scale: @mediumScale +[style]RadioButton.small = icon.scale: @smallScale; iconTextGap: 3 +[style]RadioButton.mini = icon.scale: @miniScale; iconTextGap: 3 + + #---- inTextField ---- # for leading/trailing components in text fields diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt index a96d5114..f0114229 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt @@ -1503,6 +1503,22 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI [style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: lighten($TextField.background,5%); toolbar.pressedBackground: lighten($TextField.background,10%); toolbar.selectedBackground: lighten($TextField.background,15%) +#---- [style]CheckBox ---- + +[style]CheckBox.large icon.scale: @largeScale; iconTextGap: 5 +[style]CheckBox.medium icon.scale: @mediumScale +[style]CheckBox.mini icon.scale: @miniScale; iconTextGap: 3 +[style]CheckBox.small icon.scale: @smallScale; iconTextGap: 3 + + +#---- [style]RadioButton ---- + +[style]RadioButton.large icon.scale: @largeScale; iconTextGap: 5 +[style]RadioButton.medium icon.scale: @mediumScale +[style]RadioButton.mini icon.scale: @miniScale; iconTextGap: 3 +[style]RadioButton.small icon.scale: @smallScale; iconTextGap: 3 + + #---- [style]ToggleButton ---- [style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: lighten($TextField.background,5%); toolbar.pressedBackground: lighten($TextField.background,10%); toolbar.selectedBackground: lighten($TextField.background,15%) diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt index 2d18f745..a4ed90a0 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt @@ -1508,6 +1508,22 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI [style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: darken($TextField.background,4%); toolbar.pressedBackground: darken($TextField.background,8%); toolbar.selectedBackground: darken($TextField.background,12%) +#---- [style]CheckBox ---- + +[style]CheckBox.large icon.scale: @largeScale; iconTextGap: 5 +[style]CheckBox.medium icon.scale: @mediumScale +[style]CheckBox.mini icon.scale: @miniScale; iconTextGap: 3 +[style]CheckBox.small icon.scale: @smallScale; iconTextGap: 3 + + +#---- [style]RadioButton ---- + +[style]RadioButton.large icon.scale: @largeScale; iconTextGap: 5 +[style]RadioButton.medium icon.scale: @mediumScale +[style]RadioButton.mini icon.scale: @miniScale; iconTextGap: 3 +[style]RadioButton.small icon.scale: @smallScale; iconTextGap: 3 + + #---- [style]ToggleButton ---- [style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: darken($TextField.background,4%); toolbar.pressedBackground: darken($TextField.background,8%); toolbar.selectedBackground: darken($TextField.background,12%) diff --git a/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt index ce858ccf..6b00ec3a 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt @@ -1513,6 +1513,22 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI [style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: lighten($TextField.background,5%); toolbar.pressedBackground: lighten($TextField.background,10%); toolbar.selectedBackground: lighten($TextField.background,15%) +#---- [style]CheckBox ---- + +[style]CheckBox.large icon.scale: @largeScale; iconTextGap: 5 +[style]CheckBox.medium icon.scale: @mediumScale +[style]CheckBox.mini icon.scale: @miniScale; iconTextGap: 3 +[style]CheckBox.small icon.scale: @smallScale; iconTextGap: 3 + + +#---- [style]RadioButton ---- + +[style]RadioButton.large icon.scale: @largeScale; iconTextGap: 5 +[style]RadioButton.medium icon.scale: @mediumScale +[style]RadioButton.mini icon.scale: @miniScale; iconTextGap: 3 +[style]RadioButton.small icon.scale: @smallScale; iconTextGap: 3 + + #---- [style]ToggleButton ---- [style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: lighten($TextField.background,5%); toolbar.pressedBackground: lighten($TextField.background,10%); toolbar.selectedBackground: lighten($TextField.background,15%) diff --git a/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt index 3f939ce6..b7eb4034 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt @@ -1517,6 +1517,22 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI [style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: darken($TextField.background,4%); toolbar.pressedBackground: darken($TextField.background,8%); toolbar.selectedBackground: darken($TextField.background,12%) +#---- [style]CheckBox ---- + +[style]CheckBox.large icon.scale: @largeScale; iconTextGap: 5 +[style]CheckBox.medium icon.scale: @mediumScale +[style]CheckBox.mini icon.scale: @miniScale; iconTextGap: 3 +[style]CheckBox.small icon.scale: @smallScale; iconTextGap: 3 + + +#---- [style]RadioButton ---- + +[style]RadioButton.large icon.scale: @largeScale; iconTextGap: 5 +[style]RadioButton.medium icon.scale: @mediumScale +[style]RadioButton.mini icon.scale: @miniScale; iconTextGap: 3 +[style]RadioButton.small icon.scale: @smallScale; iconTextGap: 3 + + #---- [style]ToggleButton ---- [style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: darken($TextField.background,4%); toolbar.pressedBackground: darken($TextField.background,8%); toolbar.selectedBackground: darken($TextField.background,12%) diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt index a7392ccb..230e340d 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt @@ -1570,6 +1570,22 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI [style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1 +#---- [style]CheckBox ---- + +[style]CheckBox.large icon.scale: @largeScale; iconTextGap: 5 +[style]CheckBox.medium icon.scale: @mediumScale +[style]CheckBox.mini icon.scale: @miniScale; iconTextGap: 3 +[style]CheckBox.small icon.scale: @smallScale; iconTextGap: 3 + + +#---- [style]RadioButton ---- + +[style]RadioButton.large icon.scale: @largeScale; iconTextGap: 5 +[style]RadioButton.medium icon.scale: @mediumScale +[style]RadioButton.mini icon.scale: @miniScale; iconTextGap: 3 +[style]RadioButton.small icon.scale: @smallScale; iconTextGap: 3 + + #---- [style]ToggleButton ---- [style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1 diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewFonts.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewFonts.jfd index e0dfb9b3..740e7227 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewFonts.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewFonts.jfd @@ -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 ) } ) } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.java index a87491c5..d3df6ecc 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.java @@ -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); diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.jfd index 6bfb0a9b..c57f7eb1 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePreviewSwitches.jfd @@ -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 ) } ) } } diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt index 3c93a6ae..d4c750f7 100644 --- a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt @@ -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