From 0bc2513c4678a8b90dc8b5ee8d164ab9f53f1d80 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 9 Mar 2025 00:15:00 +0100 Subject: [PATCH] for PR #982: - updated CHANGELOG.md - updated styling unit tests - updated UI defaults dumps - Demo: error/warning/success hints in a single row - Demo: reduced height of "Data comp" tab to make Demo window smaller - IntelliJ themes: fixed missing/overwritten success colors --- CHANGELOG.md | 2 + .../com/formdev/flatlaf/IntelliJTheme.java | 2 + .../flatlaf/ui/TestFlatStyleableInfo.java | 2 + .../flatlaf/ui/TestFlatStyleableValue.java | 4 + .../formdev/flatlaf/ui/TestFlatStyling.java | 4 + .../flatlaf/demo/BasicComponentsPanel.java | 98 ++++++----------- .../flatlaf/demo/BasicComponentsPanel.jfd | 101 ++++++------------ .../flatlaf/demo/DataComponentsPanel.java | 2 +- .../flatlaf/demo/DataComponentsPanel.jfd | 2 +- .../dumps/uidefaults/FlatDarkLaf_1.8.0.txt | 2 + .../dumps/uidefaults/FlatLightLaf_1.8.0.txt | 2 + .../dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt | 2 + .../uidefaults/FlatMacLightLaf_1.8.0.txt | 2 + .../flatlaf/themeeditor/FlatLafUIKeys.txt | 2 + 14 files changed, 94 insertions(+), 133 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5822943..a765fa48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ FlatLaf Change Log (issue #649) - Support multi-prefixed keys (e.g. `[dark][gnome]TitlePane.buttonBackground`). The value is only used if all prefixes match current platform/theme. +- Support new component border color to indicate success state (set client + property `JComponent.outline` to `success`). (PR #982, issue #945) #### Fixed bugs diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java index d352d728..8992328d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -725,6 +725,8 @@ public class IntelliJTheme uiKeyMapping.put( "Component.errorFocusColor", "Component.error.focusedBorderColor" ); uiKeyMapping.put( "Component.inactiveWarningFocusColor", "Component.warning.borderColor" ); uiKeyMapping.put( "Component.warningFocusColor", "Component.warning.focusedBorderColor" ); + uiKeyMapping.put( "Component.inactiveSuccessFocusColor", "Component.success.borderColor" ); + uiKeyMapping.put( "Component.successFocusColor", "Component.success.focusedBorderColor" ); // Label uiKeyMapping.put( "Label.disabledForegroundColor", "" ); // ignore (used in Material Theme UI Lite) diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java index 56b97b77..4366f280 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableInfo.java @@ -1080,6 +1080,8 @@ public class TestFlatStyleableInfo "error.focusedBorderColor", Color.class, "warning.borderColor", Color.class, "warning.focusedBorderColor", Color.class, + "success.borderColor", Color.class, + "success.focusedBorderColor", Color.class, "custom.borderColor", Color.class, "outline", String.class, diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableValue.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableValue.java index e0c0de16..d4276768 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableValue.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyleableValue.java @@ -1024,6 +1024,8 @@ public class TestFlatStyleableValue testColor( c, ui, "error.focusedBorderColor", 0x123456 ); testColor( c, ui, "warning.borderColor", 0x123456 ); testColor( c, ui, "warning.focusedBorderColor", 0x123456 ); + testColor( c, ui, "success.borderColor", 0x123456 ); + testColor( c, ui, "success.focusedBorderColor", 0x123456 ); testColor( c, ui, "custom.borderColor", 0x123456 ); testString( c, ui, "outline", "error" ); @@ -1121,6 +1123,8 @@ public class TestFlatStyleableValue testValue( border, "error.focusedBorderColor", Color.WHITE ); testValue( border, "warning.borderColor", Color.WHITE ); testValue( border, "warning.focusedBorderColor", Color.WHITE ); + testValue( border, "success.borderColor", Color.WHITE ); + testValue( border, "success.focusedBorderColor", Color.WHITE ); testValue( border, "custom.borderColor", Color.WHITE ); } diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java index 930f4376..a2057080 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/ui/TestFlatStyling.java @@ -1278,6 +1278,8 @@ public class TestFlatStyling applyStyle.accept( "error.focusedBorderColor: #fff" ); applyStyle.accept( "warning.borderColor: #fff" ); applyStyle.accept( "warning.focusedBorderColor: #fff" ); + applyStyle.accept( "success.borderColor: #fff" ); + applyStyle.accept( "success.focusedBorderColor: #fff" ); applyStyle.accept( "custom.borderColor: desaturate(#f00,50%,relative derived noAutoInverse)" ); applyStyle.accept( "outline: error" ); @@ -1363,6 +1365,8 @@ public class TestFlatStyling border.applyStyleProperty( "error.focusedBorderColor", Color.WHITE ); border.applyStyleProperty( "warning.borderColor", Color.WHITE ); border.applyStyleProperty( "warning.focusedBorderColor", Color.WHITE ); + border.applyStyleProperty( "success.borderColor", Color.WHITE ); + border.applyStyleProperty( "success.focusedBorderColor", Color.WHITE ); border.applyStyleProperty( "custom.borderColor", Color.WHITE ); } diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java index 8983809c..f9ccb6fd 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java @@ -179,14 +179,10 @@ class BasicComponentsPanel JScrollPane scrollPane12 = new JScrollPane(); JTextPane textPane4 = new JTextPane(); JTextPane textPane5 = new JTextPane(); - JLabel errorHintsLabel = new JLabel(); + JLabel hintsLabel = new JLabel(); JTextField errorHintsTextField = new JTextField(); - JComboBox errorHintsComboBox = new JComboBox<>(); - JSpinner errorHintsSpinner = new JSpinner(); - JLabel warningHintsLabel = new JLabel(); JTextField warningHintsTextField = new JTextField(); - JComboBox warningHintsComboBox = new JComboBox<>(); - JSpinner warningHintsSpinner = new JSpinner(); + JTextField successHintsTextField = new JTextField(); JLabel iconsLabel = new JLabel(); leadingIconTextField = new JTextField(); trailingIconTextField = new JTextField(); @@ -241,7 +237,6 @@ class BasicComponentsPanel "[]" + "[]" + "[]" + - "[]" + "[]0" + "[]")); @@ -698,145 +693,122 @@ class BasicComponentsPanel textPane5.setText("No scroll pane"); add(textPane5, "cell 5 11,growx"); - //---- errorHintsLabel ---- - errorHintsLabel.setText("Error hints:"); - add(errorHintsLabel, "cell 0 12"); + //---- hintsLabel ---- + hintsLabel.setText("Error/warning/success:"); + add(hintsLabel, "cell 0 12"); //---- errorHintsTextField ---- errorHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR); add(errorHintsTextField, "cell 1 12,growx"); - //---- errorHintsComboBox ---- - errorHintsComboBox.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR); - errorHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] { - "Editable" - })); - errorHintsComboBox.setEditable(true); - add(errorHintsComboBox, "cell 2 12,growx"); - - //---- errorHintsSpinner ---- - errorHintsSpinner.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR); - add(errorHintsSpinner, "cell 3 12,growx"); - - //---- warningHintsLabel ---- - warningHintsLabel.setText("Warning hints:"); - add(warningHintsLabel, "cell 0 13"); - //---- warningHintsTextField ---- warningHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING); - add(warningHintsTextField, "cell 1 13,growx"); + add(warningHintsTextField, "cell 2 12,growx"); - //---- warningHintsComboBox ---- - warningHintsComboBox.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING); - warningHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] { - "Not editable" - })); - add(warningHintsComboBox, "cell 2 13,growx"); - - //---- warningHintsSpinner ---- - warningHintsSpinner.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING); - add(warningHintsSpinner, "cell 3 13,growx"); + //---- successHintsTextField ---- + successHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, "success"); + add(successHintsTextField, "cell 3 12,growx"); //---- iconsLabel ---- iconsLabel.setText("Leading/trailing icons:"); - add(iconsLabel, "cell 0 14"); - add(leadingIconTextField, "cell 1 14,growx"); + add(iconsLabel, "cell 0 13"); + add(leadingIconTextField, "cell 1 13,growx"); //---- trailingIconTextField ---- trailingIconTextField.setText("text"); - add(trailingIconTextField, "cell 2 14,growx"); + add(trailingIconTextField, "cell 2 13,growx"); //---- iconsTextField ---- iconsTextField.setText("text"); - add(iconsTextField, "cell 3 14,growx"); + add(iconsTextField, "cell 3 13,growx"); //---- compsLabel ---- compsLabel.setText("Leading/trailing comp.:"); - add(compsLabel, "cell 0 15"); - add(compsTextField, "cell 1 15 2 1,growx"); + add(compsLabel, "cell 0 14"); + add(compsTextField, "cell 1 14 2 1,growx"); //---- clearTextField ---- clearTextField.setText("clear me"); - add(clearTextField, "cell 3 15,growx"); + add(clearTextField, "cell 3 14,growx"); //---- fontsLabel ---- fontsLabel.setText("Typography / Fonts:"); - add(fontsLabel, "cell 0 16"); + add(fontsLabel, "cell 0 15"); //---- h00Label ---- h00Label.setText("H00"); h00Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h00"); - add(h00Label, "cell 1 16 5 1"); + add(h00Label, "cell 1 15 5 1"); //---- h0Label ---- h0Label.setText("H0"); h0Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h0"); - add(h0Label, "cell 1 16 5 1"); + add(h0Label, "cell 1 15 5 1"); //---- h1Label ---- h1Label.setText("H1"); h1Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1"); - add(h1Label, "cell 1 16 5 1"); + add(h1Label, "cell 1 15 5 1"); //---- h2Label ---- h2Label.setText("H2"); h2Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h2"); - add(h2Label, "cell 1 16 5 1"); + add(h2Label, "cell 1 15 5 1"); //---- h3Label ---- h3Label.setText("H3"); h3Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3"); - add(h3Label, "cell 1 16 5 1"); + add(h3Label, "cell 1 15 5 1"); //---- h4Label ---- h4Label.setText("H4"); h4Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h4"); - add(h4Label, "cell 1 16 5 1"); + add(h4Label, "cell 1 15 5 1"); //---- lightLabel ---- lightLabel.setText("light"); lightLabel.putClientProperty(FlatClientProperties.STYLE, "font: 200% $light.font"); - add(lightLabel, "cell 1 16 5 1,gapx 30"); + add(lightLabel, "cell 1 15 5 1,gapx 30"); //---- semiboldLabel ---- semiboldLabel.setText("semibold"); semiboldLabel.putClientProperty(FlatClientProperties.STYLE, "font: 200% $semibold.font"); - add(semiboldLabel, "cell 1 16 5 1"); + add(semiboldLabel, "cell 1 15 5 1"); //---- fontZoomLabel ---- fontZoomLabel.setText("(200%)"); fontZoomLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small"); fontZoomLabel.setEnabled(false); - add(fontZoomLabel, "cell 1 16 5 1"); + add(fontZoomLabel, "cell 1 15 5 1"); //---- largeLabel ---- largeLabel.setText("large"); largeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "large"); - add(largeLabel, "cell 1 17 5 1"); + add(largeLabel, "cell 1 16 5 1"); //---- defaultLabel ---- defaultLabel.setText("default"); - add(defaultLabel, "cell 1 17 5 1"); + add(defaultLabel, "cell 1 16 5 1"); //---- mediumLabel ---- mediumLabel.setText("medium"); mediumLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium"); - add(mediumLabel, "cell 1 17 5 1"); + add(mediumLabel, "cell 1 16 5 1"); //---- smallLabel ---- smallLabel.setText("small"); smallLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small"); - add(smallLabel, "cell 1 17 5 1"); + add(smallLabel, "cell 1 16 5 1"); //---- miniLabel ---- miniLabel.setText("mini"); miniLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "mini"); - add(miniLabel, "cell 1 17 5 1"); + add(miniLabel, "cell 1 16 5 1"); //---- monospacedLabel ---- monospacedLabel.setText("monospaced"); monospacedLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "monospaced"); - add(monospacedLabel, "cell 1 17 5 1,gapx 30"); + add(monospacedLabel, "cell 1 16 5 1,gapx 30"); //======== popupMenu1 ======== { @@ -875,8 +847,7 @@ class BasicComponentsPanel editorPaneLabel, scrollPane5, scrollPane6, scrollPane7, scrollPane8, editorPane5, textPaneLabel, scrollPane9, scrollPane10, scrollPane11, scrollPane12, textPane5, - errorHintsLabel, errorHintsTextField, errorHintsComboBox, errorHintsSpinner, - warningHintsLabel, warningHintsTextField, warningHintsComboBox, warningHintsSpinner, + hintsLabel, errorHintsTextField, warningHintsTextField, successHintsTextField, fontZoomLabel, }; @@ -899,8 +870,7 @@ class BasicComponentsPanel rows[11].setGapBefore( zeroGap ); rows[11].setGapAfter( zeroGap ); rows[12].setGapBefore( zeroGap ); - rows[13].setGapBefore( zeroGap ); - rows[16].setGapBefore( zeroGap ); + rows[15].setGapBefore( zeroGap ); layout.setRowConstraints( ac ); // move two text field into same row as spinners diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd index a7e257b3..f287164c 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.5.0.404" Java: "17" 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": "[][sizegroup 1][sizegroup 1][sizegroup 1][][]" - "$rowConstraints": "[][][][][][][][][][][][]para[][][][][]0[]" + "$rowConstraints": "[][][][][][][][][][][][]para[][][][]0[]" } ) { name: "this" add( new FormComponent( "javax.swing.JLabel" ) { @@ -595,8 +595,8 @@ new FormModel { "value": "cell 5 11,growx" } ) add( new FormComponent( "javax.swing.JLabel" ) { - name: "errorHintsLabel" - "text": "Error hints:" + name: "hintsLabel" + "text": "Error/warning/success:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 12" } ) @@ -606,56 +606,23 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 12,growx" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { - name: "errorHintsComboBox" - "$client.JComponent.outline": "error" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "Editable" - addElement( "Editable" ) - } - "editable": true - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 2 12,growx" - } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "errorHintsSpinner" - "$client.JComponent.outline": "error" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 12,growx" - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "warningHintsLabel" - "text": "Warning hints:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 13" - } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "warningHintsTextField" "$client.JComponent.outline": "warning" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 13,growx" + "value": "cell 2 12,growx" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { - name: "warningHintsComboBox" - "$client.JComponent.outline": "warning" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "Not editable" - addElement( "Not editable" ) - } + add( new FormComponent( "javax.swing.JTextField" ) { + name: "successHintsTextField" + "$client.JComponent.outline": "success" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 2 13,growx" - } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "warningHintsSpinner" - "$client.JComponent.outline": "warning" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 13,growx" + "value": "cell 3 12,growx" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "iconsLabel" "text": "Leading/trailing icons:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 14" + "value": "cell 0 13" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "leadingIconTextField" @@ -663,7 +630,7 @@ new FormModel { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 14,growx" + "value": "cell 1 13,growx" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "trailingIconTextField" @@ -672,7 +639,7 @@ new FormModel { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 2 14,growx" + "value": "cell 2 13,growx" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "iconsTextField" @@ -681,13 +648,13 @@ new FormModel { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 14,growx" + "value": "cell 3 13,growx" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "compsLabel" "text": "Leading/trailing comp.:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 15" + "value": "cell 0 14" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "compsTextField" @@ -695,7 +662,7 @@ new FormModel { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 15 2 1,growx" + "value": "cell 1 14 2 1,growx" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "clearTextField" @@ -704,69 +671,69 @@ new FormModel { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 15,growx" + "value": "cell 3 14,growx" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "fontsLabel" "text": "Typography / Fonts:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 16" + "value": "cell 0 15" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "h00Label" "text": "H00" "$client.FlatLaf.styleClass": "h00" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "h0Label" "text": "H0" "$client.FlatLaf.styleClass": "h0" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "h1Label" "text": "H1" "$client.FlatLaf.styleClass": "h1" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "h2Label" "text": "H2" "$client.FlatLaf.styleClass": "h2" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "h3Label" "text": "H3" "$client.FlatLaf.styleClass": "h3" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "h4Label" "text": "H4" "$client.FlatLaf.styleClass": "h4" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "lightLabel" "text": "light" "$client.FlatLaf.style": "font: 200% $light.font" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1,gapx 30" + "value": "cell 1 15 5 1,gapx 30" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "semiboldLabel" "text": "semibold" "$client.FlatLaf.style": "font: 200% $semibold.font" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "fontZoomLabel" @@ -774,52 +741,52 @@ new FormModel { "$client.FlatLaf.styleClass": "small" "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 16 5 1" + "value": "cell 1 15 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "largeLabel" "text": "large" "$client.FlatLaf.styleClass": "large" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 17 5 1" + "value": "cell 1 16 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "defaultLabel" "text": "default" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 17 5 1" + "value": "cell 1 16 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "mediumLabel" "text": "medium" "$client.FlatLaf.styleClass": "medium" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 17 5 1" + "value": "cell 1 16 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "smallLabel" "text": "small" "$client.FlatLaf.styleClass": "small" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 17 5 1" + "value": "cell 1 16 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "miniLabel" "text": "mini" "$client.FlatLaf.styleClass": "mini" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 17 5 1" + "value": "cell 1 16 5 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "monospacedLabel" "text": "monospaced" "$client.FlatLaf.styleClass": "monospaced" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 17 5 1,gapx 30" + "value": "cell 1 16 5 1,gapx 30" } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 920, 550 ) + "size": new java.awt.Dimension( 840, 565 ) } ) add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) { name: "popupMenu1" @@ -839,7 +806,7 @@ new FormModel { "mnemonic": 80 } ) }, new FormLayoutConstraints( null ) { - "location": new java.awt.Point( 0, 570 ) + "location": new java.awt.Point( 0, 605 ) "size": new java.awt.Dimension( 91, 87 ) } ) } diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.java index 25aeb28b..fd17f93a 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.java @@ -252,7 +252,7 @@ class DataComponentsPanel "[]" + "[150,grow,sizegroup 1,fill]" + "[150,grow,sizegroup 1,fill]" + - "[150,grow,sizegroup 1,fill]")); + "[150,grow,fill]")); //---- label1 ---- label1.setText("Square Selection"); diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.jfd index c51f3cfb..1527eb9e 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.jfd +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DataComponentsPanel.jfd @@ -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": "[][150,fill][150,fill][150,fill][fill]" - "$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill]" + "$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,fill]" } ) { name: "this" add( new FormComponent( "javax.swing.JLabel" ) { diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt index 7ecb6604..d5866f93 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt @@ -250,6 +250,8 @@ Component.innerFocusWidth 0.5 Component.innerOutlineWidth 1 Component.linkColor #579bf6 HSL 214 90 65 javax.swing.plaf.ColorUIResource [UI] Component.minimumWidth 64 +Component.success.borderColor #647255 HSL 89 15 39 javax.swing.plaf.ColorUIResource [UI] +Component.success.focusedBorderColor #648b3c HSL 90 40 39 javax.swing.plaf.ColorUIResource [UI] Component.warning.borderColor #725627 HSL 38 49 30 javax.swing.plaf.ColorUIResource [UI] Component.warning.focusedBorderColor #ac7920 HSL 38 69 40 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt index b11db57d..8e36270a 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt @@ -254,6 +254,8 @@ Component.innerFocusWidth 0.5 Component.innerOutlineWidth 1 Component.linkColor #236db2 HSL 209 67 42 javax.swing.plaf.ColorUIResource [UI] Component.minimumWidth 64 +Component.success.borderColor #8be5c4 HSL 158 63 72 javax.swing.plaf.ColorUIResource [UI] +Component.success.focusedBorderColor #14dc92 HSL 158 83 47 javax.swing.plaf.ColorUIResource [UI] Component.warning.borderColor #fed284 HSL 38 98 76 javax.swing.plaf.ColorUIResource [UI] Component.warning.focusedBorderColor #e2a53a HSL 38 74 56 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt index be41dff7..6c876704 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt @@ -256,6 +256,8 @@ Component.innerFocusWidth 0 Component.innerOutlineWidth 0 Component.linkColor #007aff HSL 211 100 50 javax.swing.plaf.ColorUIResource [UI] Component.minimumWidth 64 +Component.success.borderColor #647255 HSL 89 15 39 javax.swing.plaf.ColorUIResource [UI] +Component.success.focusedBorderColor #648b3c HSL 90 40 39 javax.swing.plaf.ColorUIResource [UI] Component.warning.borderColor #725627 HSL 38 49 30 javax.swing.plaf.ColorUIResource [UI] Component.warning.focusedBorderColor #ac7920 HSL 38 69 40 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt index e99b2145..89d3bce3 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt @@ -260,6 +260,8 @@ Component.innerFocusWidth 0 Component.innerOutlineWidth 0 Component.linkColor #007aff HSL 211 100 50 javax.swing.plaf.ColorUIResource [UI] Component.minimumWidth 64 +Component.success.borderColor #8be5c4 HSL 158 63 72 javax.swing.plaf.ColorUIResource [UI] +Component.success.focusedBorderColor #14dc92 HSL 158 83 47 javax.swing.plaf.ColorUIResource [UI] Component.warning.borderColor #fed284 HSL 38 98 76 javax.swing.plaf.ColorUIResource [UI] Component.warning.focusedBorderColor #e2a53a HSL 38 74 56 javax.swing.plaf.ColorUIResource [UI] 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 6bdfa4d2..9d4f9b76 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 @@ -272,6 +272,8 @@ Component.innerFocusWidth Component.innerOutlineWidth Component.linkColor Component.minimumWidth +Component.success.borderColor +Component.success.focusedBorderColor Component.warning.borderColor Component.warning.focusedBorderColor DatePickerUI