From de93e19a80c01954648452048296fd399c07b73a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 17 Nov 2020 12:13:01 +0100 Subject: [PATCH 001/178] JIDE: RangeSlider: updated UI defaults dumps --- flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt | 5 +++++ flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt | 5 +++++ flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt | 5 +++++ .../com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt | 1 + 4 files changed, 16 insertions(+) diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index d1e539e2..f37f4fe6 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -752,6 +752,11 @@ RadioButtonMenuItemUI com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI RadioButtonUI com.formdev.flatlaf.ui.FlatRadioButtonUI +#---- RangeSlider ---- + +RangeSliderUI com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI + + #---- Resizable ---- Resizable.resizeBorder [lazy] 4,4,4,4 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#5e5e5e javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000 diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 6da5e87e..9d9059b0 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -757,6 +757,11 @@ RadioButtonMenuItemUI com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI RadioButtonUI com.formdev.flatlaf.ui.FlatRadioButtonUI +#---- RangeSlider ---- + +RangeSliderUI com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI + + #---- Resizable ---- Resizable.resizeBorder [lazy] 4,4,4,4 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#adadad javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000 diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index b05ebcdb..5e1b71d9 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -749,6 +749,11 @@ RadioButtonMenuItemUI com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI RadioButtonUI com.formdev.flatlaf.ui.FlatRadioButtonUI +#---- RangeSlider ---- + +RangeSliderUI com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI + + #---- Resizable ---- Resizable.resizeBorder [lazy] 4,4,4,4 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#0000ff javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000 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 7df9a413..ce120e79 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 @@ -521,6 +521,7 @@ RadioButtonMenuItem.selectionBackground RadioButtonMenuItem.selectionForeground RadioButtonMenuItemUI RadioButtonUI +RangeSliderUI Resizable.resizeBorder RootPane.activeBorderColor RootPane.ancestorInputMap From a16db38a6f72592b7aedc0abd772d493a4090605 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 18 Nov 2020 18:32:08 +0100 Subject: [PATCH 002/178] Testing: FlatBaselineTest added --- .../flatlaf/testing/FlatBaselineTest.java | 328 +++++++++++++++++ .../flatlaf/testing/FlatBaselineTest.jfd | 331 ++++++++++++++++++ 2 files changed, 659 insertions(+) create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.java create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.jfd diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.java new file mode 100644 index 00000000..22a4851c --- /dev/null +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.java @@ -0,0 +1,328 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.testing; + +import javax.swing.*; +import javax.swing.table.*; +import javax.swing.tree.*; +import net.miginfocom.swing.*; + +/** + * @author Karl Tauber + */ +public class FlatBaselineTest + extends FlatTestPanel +{ + public static void main( String[] args ) { + SwingUtilities.invokeLater( () -> { + FlatTestFrame frame = FlatTestFrame.create( args, "FlatBaselineTest" ); + frame.showFrame( FlatBaselineTest::new ); + } ); + } + + public FlatBaselineTest() { + initComponents(); + } + + private void initComponents() { + // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents + JLabel label1 = new JLabel(); + JButton button1 = new JButton(); + JToggleButton toggleButton1 = new JToggleButton(); + JCheckBox checkBox1 = new JCheckBox(); + JRadioButton radioButton1 = new JRadioButton(); + JTextField textField4 = new JTextField(); + JLabel label2 = new JLabel(); + JTextField textField1 = new JTextField(); + JFormattedTextField formattedTextField1 = new JFormattedTextField(); + JPasswordField passwordField1 = new JPasswordField(); + JComboBox comboBox1 = new JComboBox<>(); + JSpinner spinner1 = new JSpinner(); + JLabel label6 = new JLabel(); + JScrollPane scrollPane1 = new JScrollPane(); + JTextArea textArea1 = new JTextArea(); + JTextArea textArea2 = new JTextArea(); + JTextField textField2 = new JTextField(); + JLabel label7 = new JLabel(); + JScrollPane scrollPane3 = new JScrollPane(); + JList list1 = new JList<>(); + JScrollPane scrollPane4 = new JScrollPane(); + JTree tree1 = new JTree(); + JScrollPane scrollPane5 = new JScrollPane(); + JTable table1 = new JTable(); + JTextField textField3 = new JTextField(); + JLabel label3 = new JLabel(); + JSlider slider1 = new JSlider(); + JSlider slider6 = new JSlider(); + JLabel label8 = new JLabel(); + JSlider slider7 = new JSlider(); + JSlider slider8 = new JSlider(); + JLabel label4 = new JLabel(); + JProgressBar progressBar1 = new JProgressBar(); + JProgressBar progressBar3 = new JProgressBar(); + JSeparator separator1 = new JSeparator(); + JLabel label5 = new JLabel(); + JSlider slider2 = new JSlider(); + JSlider slider3 = new JSlider(); + JProgressBar progressBar2 = new JProgressBar(); + JProgressBar progressBar4 = new JProgressBar(); + JPanel hSpacer1 = new JPanel(null); + JLabel label9 = new JLabel(); + JSlider slider4 = new JSlider(); + JSlider slider5 = new JSlider(); + JPanel hSpacer2 = new JPanel(null); + + //======== this ======== + setLayout(new MigLayout( + "insets dialog,hidemode 3,debug", + // columns + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]", + // rows + "[]" + + "[]" + + "[50]" + + "[::80]" + + "[]" + + "[]" + + "[]" + + "[]" + + "[]")); + + //---- label1 ---- + label1.setText("Dext"); + add(label1, "cell 0 0"); + + //---- button1 ---- + button1.setText("Dext"); + add(button1, "cell 1 0"); + + //---- toggleButton1 ---- + toggleButton1.setText("Dext"); + add(toggleButton1, "cell 2 0"); + + //---- checkBox1 ---- + checkBox1.setText("Dext"); + add(checkBox1, "cell 3 0"); + + //---- radioButton1 ---- + radioButton1.setText("Dext"); + add(radioButton1, "cell 4 0"); + + //---- textField4 ---- + textField4.setText("Dext field"); + add(textField4, "cell 6 0"); + + //---- label2 ---- + label2.setText("Dext"); + add(label2, "cell 0 1"); + + //---- textField1 ---- + textField1.setText("Dext"); + add(textField1, "cell 1 1"); + + //---- formattedTextField1 ---- + formattedTextField1.setText("Dext"); + add(formattedTextField1, "cell 2 1"); + + //---- passwordField1 ---- + passwordField1.setText("Dext"); + add(passwordField1, "cell 3 1"); + add(comboBox1, "cell 4 1"); + add(spinner1, "cell 5 1"); + + //---- label6 ---- + label6.setText("Dext"); + add(label6, "cell 0 2"); + + //======== scrollPane1 ======== + { + + //---- textArea1 ---- + textArea1.setText("Dext"); + textArea1.setRows(4); + scrollPane1.setViewportView(textArea1); + } + add(scrollPane1, "cell 1 2"); + + //---- textArea2 ---- + textArea2.setText("Dext"); + textArea2.setRows(4); + add(textArea2, "cell 2 2"); + + //---- textField2 ---- + textField2.setText("Dext field"); + add(textField2, "cell 6 2"); + + //---- label7 ---- + label7.setText("Dext"); + add(label7, "cell 0 3"); + + //======== scrollPane3 ======== + { + + //---- list1 ---- + list1.setModel(new AbstractListModel() { + String[] values = { + "Dext", + "Dext", + "Dext" + }; + @Override + public int getSize() { return values.length; } + @Override + public String getElementAt(int i) { return values[i]; } + }); + scrollPane3.setViewportView(list1); + } + add(scrollPane3, "cell 1 3"); + + //======== scrollPane4 ======== + { + + //---- tree1 ---- + tree1.setModel(new DefaultTreeModel( + new DefaultMutableTreeNode("Dext") { + { + add(new DefaultMutableTreeNode("Dext")); + add(new DefaultMutableTreeNode("Dext")); + } + })); + scrollPane4.setViewportView(tree1); + } + add(scrollPane4, "cell 2 3"); + + //======== scrollPane5 ======== + { + + //---- table1 ---- + table1.setModel(new DefaultTableModel( + new Object[][] { + {"Dext", "0"}, + {"Dext ", "1"}, + }, + new String[] { + "Dext", null + } + )); + scrollPane5.setViewportView(table1); + } + add(scrollPane5, "cell 3 3,wmax 100"); + + //---- textField3 ---- + textField3.setText("Dext field"); + add(textField3, "cell 6 3"); + + //---- label3 ---- + label3.setText("Dext"); + add(label3, "cell 0 4"); + add(slider1, "cell 1 4 6 1"); + + //---- slider6 ---- + slider6.setPaintTicks(true); + slider6.setMajorTickSpacing(25); + slider6.setMinorTickSpacing(5); + add(slider6, "cell 1 4 6 1"); + + //---- label8 ---- + label8.setText("Dext"); + add(label8, "cell 0 5"); + + //---- slider7 ---- + slider7.setPaintLabels(true); + slider7.setMajorTickSpacing(25); + slider7.setMinorTickSpacing(5); + add(slider7, "cell 1 5 6 1"); + + //---- slider8 ---- + slider8.setPaintLabels(true); + slider8.setPaintTicks(true); + slider8.setMajorTickSpacing(25); + slider8.setMinorTickSpacing(5); + add(slider8, "cell 1 5 6 1"); + + //---- label4 ---- + label4.setText("Dext"); + add(label4, "cell 0 6"); + + //---- progressBar1 ---- + progressBar1.setValue(30); + add(progressBar1, "cell 1 6 6 1"); + + //---- progressBar3 ---- + progressBar3.setStringPainted(true); + progressBar3.setValue(30); + add(progressBar3, "cell 1 6 6 1"); + add(separator1, "cell 1 6 6 1"); + + //---- label5 ---- + label5.setText("Dext"); + add(label5, "cell 0 7"); + + //---- slider2 ---- + slider2.setOrientation(SwingConstants.VERTICAL); + add(slider2, "cell 1 7 6 1"); + + //---- slider3 ---- + slider3.setOrientation(SwingConstants.VERTICAL); + slider3.setPaintTicks(true); + slider3.setMajorTickSpacing(25); + slider3.setMinorTickSpacing(5); + add(slider3, "cell 1 7 6 1"); + + //---- progressBar2 ---- + progressBar2.setOrientation(SwingConstants.VERTICAL); + progressBar2.setValue(30); + add(progressBar2, "cell 1 7 6 1"); + + //---- progressBar4 ---- + progressBar4.setOrientation(SwingConstants.VERTICAL); + progressBar4.setStringPainted(true); + progressBar4.setValue(30); + add(progressBar4, "cell 1 7 6 1"); + add(hSpacer1, "cell 1 7 6 1,growx"); + + //---- label9 ---- + label9.setText("Dext"); + add(label9, "cell 0 8"); + + //---- slider4 ---- + slider4.setOrientation(SwingConstants.VERTICAL); + slider4.setPaintLabels(true); + slider4.setMajorTickSpacing(25); + slider4.setMinorTickSpacing(5); + add(slider4, "cell 1 8 6 1"); + + //---- slider5 ---- + slider5.setOrientation(SwingConstants.VERTICAL); + slider5.setPaintLabels(true); + slider5.setPaintTicks(true); + slider5.setMajorTickSpacing(25); + slider5.setMinorTickSpacing(5); + add(slider5, "cell 1 8 6 1"); + add(hSpacer2, "cell 1 8 6 1,growx"); + // JFormDesigner - End of component initialization //GEN-END:initComponents + } + + // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables + // JFormDesigner - End of variables declaration //GEN-END:variables +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.jfd new file mode 100644 index 00000000..b41f8d16 --- /dev/null +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatBaselineTest.jfd @@ -0,0 +1,331 @@ +JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + auxiliary() { + "JavaCodeGenerator.defaultVariableLocal": true + } + add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "insets dialog,hidemode 3,debug" + "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill]" + "$rowConstraints": "[][][50][::80][][][][][]" + } ) { + name: "this" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "button1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 0" + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "toggleButton1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "checkBox1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 0" + } ) + add( new FormComponent( "javax.swing.JRadioButton" ) { + name: "radioButton1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 0" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "textField4" + "text": "Dext field" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label2" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "textField1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) + add( new FormComponent( "javax.swing.JFormattedTextField" ) { + name: "formattedTextField1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 1" + } ) + add( new FormComponent( "javax.swing.JPasswordField" ) { + name: "passwordField1" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 1" + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "comboBox1" + auxiliary() { + "JavaCodeGenerator.typeParameters": "String" + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 1" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "spinner1" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label6" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane1" + add( new FormComponent( "javax.swing.JTextArea" ) { + name: "textArea1" + "text": "Dext" + "rows": 4 + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 2" + } ) + add( new FormComponent( "javax.swing.JTextArea" ) { + name: "textArea2" + "text": "Dext" + "rows": 4 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 2" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "textField2" + "text": "Dext field" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label7" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane3" + add( new FormComponent( "javax.swing.JList" ) { + name: "list1" + "model": new javax.swing.DefaultListModel { + addElement( "Dext" ) + addElement( "Dext" ) + addElement( "Dext" ) + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 3" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane4" + add( new FormComponent( "javax.swing.JTree" ) { + name: "tree1" + "model": new javax.swing.tree.DefaultTreeModel( new javax.swing.tree.DefaultMutableTreeNode { + userObject: "Dext" + add( new javax.swing.tree.DefaultMutableTreeNode { + userObject: "Dext" + } ) + add( new javax.swing.tree.DefaultMutableTreeNode { + userObject: "Dext" + } ) + } ) + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 3" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane5" + add( new FormComponent( "javax.swing.JTable" ) { + name: "table1" + "model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector { + add( new java.util.Vector { + add( "Dext" ) + add( "0" ) + } ) + add( new java.util.Vector { + add( "Dext " ) + add( "1" ) + } ) + }, new java.util.Vector { + add( "Dext" ) + add( null ) + }, new java.util.Vector { + add( null ) + add( null ) + }, new java.util.Vector { + add( null ) + add( null ) + }, new java.util.Vector { + add( null ) + add( null ) + } ) + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 3,wmax 100" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "textField3" + "text": "Dext field" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 3" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label3" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 4" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider1" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4 6 1" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider6" + "paintTicks": true + "majorTickSpacing": 25 + "minorTickSpacing": 5 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4 6 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label8" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 5" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider7" + "paintLabels": true + "majorTickSpacing": 25 + "minorTickSpacing": 5 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 5 6 1" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider8" + "paintLabels": true + "paintTicks": true + "majorTickSpacing": 25 + "minorTickSpacing": 5 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 5 6 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label4" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6" + } ) + add( new FormComponent( "javax.swing.JProgressBar" ) { + name: "progressBar1" + "value": 30 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 6 6 1" + } ) + add( new FormComponent( "javax.swing.JProgressBar" ) { + name: "progressBar3" + "stringPainted": true + "value": 30 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 6 6 1" + } ) + add( new FormComponent( "javax.swing.JSeparator" ) { + name: "separator1" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 6 6 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label5" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 7" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider2" + "orientation": 1 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 7 6 1" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider3" + "orientation": 1 + "paintTicks": true + "majorTickSpacing": 25 + "minorTickSpacing": 5 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 7 6 1" + } ) + add( new FormComponent( "javax.swing.JProgressBar" ) { + name: "progressBar2" + "orientation": 1 + "value": 30 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 7 6 1" + } ) + add( new FormComponent( "javax.swing.JProgressBar" ) { + name: "progressBar4" + "orientation": 1 + "stringPainted": true + "value": 30 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 7 6 1" + } ) + add( new FormComponent( "com.jformdesigner.designer.wrapper.HSpacer" ) { + name: "hSpacer1" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 7 6 1,growx" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label9" + "text": "Dext" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 8" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider4" + "orientation": 1 + "paintLabels": true + "majorTickSpacing": 25 + "minorTickSpacing": 5 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 8 6 1" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "slider5" + "orientation": 1 + "paintLabels": true + "paintTicks": true + "majorTickSpacing": 25 + "minorTickSpacing": 5 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 8 6 1" + } ) + add( new FormComponent( "com.jformdesigner.designer.wrapper.HSpacer" ) { + name: "hSpacer2" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 8 6 1,growx" + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 650, 660 ) + } ) + } +} From 06cab0d4b5f82e4cd206c93e6e366ec3e55bfc06 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 18 Nov 2020 18:34:12 +0100 Subject: [PATCH 003/178] updated svgSalamander to version 1.1.2.4 --- flatlaf-extras/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatlaf-extras/build.gradle.kts b/flatlaf-extras/build.gradle.kts index 831288e6..8be930dc 100644 --- a/flatlaf-extras/build.gradle.kts +++ b/flatlaf-extras/build.gradle.kts @@ -22,7 +22,7 @@ plugins { dependencies { implementation( project( ":flatlaf-core" ) ) - implementation( "com.formdev:svgSalamander:1.1.2.3" ) + implementation( "com.formdev:svgSalamander:1.1.2.4" ) } flatlafModuleInfo { From 59879f493e85fa4300048f7df88c9afacedd094a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 18 Nov 2020 18:45:13 +0100 Subject: [PATCH 004/178] FlatTestFrame: fixed exception when using FlatPropertiesLaf and changing scale factor, which re-sets the current Laf --- .../com/formdev/flatlaf/FlatPropertiesLaf.java | 4 ++++ .../formdev/flatlaf/testing/FlatTestFrame.java | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatPropertiesLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatPropertiesLaf.java index 534f2115..002400e6 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatPropertiesLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatPropertiesLaf.java @@ -88,6 +88,10 @@ public class FlatPropertiesLaf return dark; } + public Properties getProperties() { + return properties; + } + @Override protected ArrayList> getLafClassesForDefaultsLoading() { ArrayList> lafClasses = new ArrayList<>(); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index 02b99e06..4595dd85 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -22,6 +22,7 @@ import java.awt.event.ComponentEvent; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.util.Properties; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.Supplier; @@ -35,6 +36,7 @@ import com.formdev.flatlaf.FlatDarkLaf; import com.formdev.flatlaf.FlatIntelliJLaf; import com.formdev.flatlaf.FlatLaf; import com.formdev.flatlaf.FlatLightLaf; +import com.formdev.flatlaf.FlatPropertiesLaf; import com.formdev.flatlaf.FlatSystemProperties; import com.formdev.flatlaf.IntelliJTheme; import com.formdev.flatlaf.demo.LookAndFeelsComboBox; @@ -331,10 +333,12 @@ public class FlatTestFrame // hide popup to avoid occasional StackOverflowError when updating UI lookAndFeelComboBox.setPopupVisible( false ); - applyLookAndFeel( lafClassName, null, false ); + applyLookAndFeel( lafClassName, null, null, null, false ); } - private void applyLookAndFeel( String lafClassName, IntelliJTheme theme, boolean pack ) { + private void applyLookAndFeel( String lafClassName, IntelliJTheme theme, + String nameForProperties, Properties properties, boolean pack ) + { EventQueue.invokeLater( () -> { try { // clear custom default font before switching to other LaF @@ -349,6 +353,8 @@ public class FlatTestFrame // change look and feel if( theme != null ) UIManager.setLookAndFeel( IntelliJTheme.createLaf( theme ) ); + else if( properties != null ) + UIManager.setLookAndFeel( new FlatPropertiesLaf( nameForProperties, properties ) ); else UIManager.setLookAndFeel( lafClassName ); @@ -507,7 +513,13 @@ public class FlatTestFrame IntelliJTheme theme = (lookAndFeel instanceof IntelliJTheme.ThemeLaf) ? ((IntelliJTheme.ThemeLaf)lookAndFeel).getTheme() : null; - applyLookAndFeel( lookAndFeel.getClass().getName(), theme, true ); + String nameForProperties = null; + Properties properties = null; + if( lookAndFeel instanceof FlatPropertiesLaf ) { + nameForProperties = lookAndFeel.getName(); + properties = ((FlatPropertiesLaf)lookAndFeel).getProperties(); + } + applyLookAndFeel( lookAndFeel.getClass().getName(), theme, nameForProperties, properties, true ); } private void updateScaleFactorComboBox() { From d923c8df8170901880ebf9d91739b25bb389606a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 18 Nov 2020 23:31:04 +0100 Subject: [PATCH 005/178] Window decorations: title bar was not hidden if window is in full-screen mode (issue #212) --- CHANGELOG.md | 6 ++++++ .../com/formdev/flatlaf/ui/FlatRootPaneUI.java | 5 +++-- .../java/com/formdev/flatlaf/ui/FlatUIUtils.java | 13 +++++++++++++ .../com/formdev/flatlaf/ui/FlatWindowResizer.java | 8 +++++--- .../flatlaf/testing/FlatWindowDecorationsTest.java | 14 ++++++++++++++ .../flatlaf/testing/FlatWindowDecorationsTest.jfd | 10 ++++++++++ 6 files changed, 51 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a3b24fc..f1832ed2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ FlatLaf Change Log - JIDE Common Layer: Support `RangeSlider`. (PR #209) +#### Fixed bugs + +- Custom window decorations: Title bar was not hidden if window is in + full-screen mode. (issue #212) + + ## 0.44 #### New features and improvements diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java index 82098cda..c7e89ca7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java @@ -285,6 +285,7 @@ public class FlatRootPaneUI @Override public void layoutContainer( Container parent ) { JRootPane rootPane = (JRootPane) parent; + boolean isFullScreen = FlatUIUtils.isFullScreen( rootPane ); Insets insets = rootPane.getInsets(); int x = insets.left; @@ -298,7 +299,7 @@ public class FlatRootPaneUI rootPane.getGlassPane().setBounds( x, y, width, height ); int nextY = 0; - if( titlePane != null ) { + if( !isFullScreen && titlePane != null ) { Dimension prefSize = titlePane.getPreferredSize(); titlePane.setBounds( 0, 0, width, prefSize.height ); nextY += prefSize.height; @@ -306,7 +307,7 @@ public class FlatRootPaneUI JMenuBar menuBar = rootPane.getJMenuBar(); if( menuBar != null && menuBar.isVisible() ) { - if( titlePane != null && titlePane.isMenuBarEmbedded() ) { + if( !isFullScreen && titlePane != null && titlePane.isMenuBarEmbedded() ) { titlePane.validate(); menuBar.setBounds( titlePane.getMenuBarBounds() ); } else { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index 0d8efb20..a43fcad7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -23,11 +23,14 @@ import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; import java.awt.Insets; import java.awt.KeyboardFocusManager; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Shape; +import java.awt.Window; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.awt.event.MouseAdapter; @@ -181,6 +184,16 @@ public class FlatUIUtils keyboardFocusManager.getActiveWindow() == SwingUtilities.windowForComponent( c ); } + /** + * Returns whether the given component is in a window that is in full-screen mode. + */ + public static boolean isFullScreen( Component c ) { + GraphicsConfiguration gc = c.getGraphicsConfiguration(); + GraphicsDevice gd = (gc != null) ? gc.getDevice() : null; + Window fullScreenWindow = (gd != null) ? gd.getFullScreenWindow() : null; + return (fullScreenWindow != null && fullScreenWindow == SwingUtilities.windowForComponent( c )); + } + public static Boolean isRoundRect( Component c ) { return (c instanceof JComponent) ? FlatClientProperties.clientPropertyBooleanStrict( diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java index cd1c3784..22821b11 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java @@ -256,6 +256,8 @@ public abstract class FlatWindowResizer @Override protected boolean isWindowResizable() { + if( FlatUIUtils.isFullScreen( resizeComp ) ) + return false; if( window instanceof Frame ) return ((Frame)window).isResizable() && (((Frame)window).getExtendedState() & Frame.MAXIMIZED_BOTH) == 0; if( window instanceof Dialog ) @@ -429,9 +431,9 @@ public abstract class FlatWindowResizer protected void paintComponent( Graphics g ) { super.paintChildren( g ); - // this is necessary because Dialog.setResizable() does not fire events - if( isDialog() ) - updateVisibility(); + // for dialogs: necessary because Dialog.setResizable() does not fire events + // for frames: necessary because GraphicsDevice.setFullScreenWindow() does not fire events + updateVisibility(); /*debug int width = getWidth(); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.java index b513149d..f82312e4 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.java @@ -186,6 +186,13 @@ public class FlatWindowDecorationsTest } } + private void fullScreenChanged() { + boolean fullScreen = fullScreenCheckBox.isSelected(); + + GraphicsDevice gd = getGraphicsConfiguration().getDevice(); + gd.setFullScreenWindow( fullScreen ? SwingUtilities.windowForComponent( this ) : null ); + } + private void menuItemActionPerformed(ActionEvent e) { SwingUtilities.invokeLater( () -> { JOptionPane.showMessageDialog( this, e.getActionCommand(), "Menu Item", JOptionPane.PLAIN_MESSAGE ); @@ -263,6 +270,7 @@ public class FlatWindowDecorationsTest resizableCheckBox = new JCheckBox(); maximizedBoundsCheckBox = new JCheckBox(); undecoratedCheckBox = new JCheckBox(); + fullScreenCheckBox = new JCheckBox(); JLabel label1 = new JLabel(); JLabel label2 = new JLabel(); JPanel panel1 = new JPanel(); @@ -372,6 +380,11 @@ public class FlatWindowDecorationsTest undecoratedCheckBox.addActionListener(e -> undecoratedChanged()); add(undecoratedCheckBox, "cell 0 4"); + //---- fullScreenCheckBox ---- + fullScreenCheckBox.setText("full screen"); + fullScreenCheckBox.addActionListener(e -> fullScreenChanged()); + add(fullScreenCheckBox, "cell 1 4"); + //---- label1 ---- label1.setText("Style:"); add(label1, "cell 0 5"); @@ -677,6 +690,7 @@ public class FlatWindowDecorationsTest private JCheckBox resizableCheckBox; private JCheckBox maximizedBoundsCheckBox; private JCheckBox undecoratedCheckBox; + private JCheckBox fullScreenCheckBox; private JRadioButton styleNoneRadioButton; private JRadioButton styleFrameRadioButton; private JRadioButton stylePlainRadioButton; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.jfd index f73e537f..d536cc39 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatWindowDecorationsTest.jfd @@ -106,6 +106,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 4" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "fullScreenCheckBox" + "text": "full screen" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "fullScreenChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4" + } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label1" "text": "Style:" From cd6b55c846f1da5d6febb40dd0e528c106d18e68 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 20 Nov 2020 00:40:10 +0100 Subject: [PATCH 006/178] Demo: Alt+UP and Alt+DOWN now switch to previous/next theme --- .../java/com/formdev/flatlaf/demo/ControlBar.java | 10 ++++++++++ .../main/java/com/formdev/flatlaf/demo/DemoFrame.java | 2 +- .../main/java/com/formdev/flatlaf/demo/DemoFrame.jfd | 1 + .../flatlaf/demo/intellijthemes/IJThemesPanel.java | 11 +++++++++++ .../com/formdev/flatlaf/testing/FlatTestFrame.java | 10 ++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java index c527959b..534c5570 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java @@ -136,6 +136,16 @@ class ControlBar registerSwitchToLookAndFeel( KeyEvent.VK_F12, MetalLookAndFeel.class.getName() ); registerSwitchToLookAndFeel( KeyEvent.VK_F11, NimbusLookAndFeel.class.getName() ); + // register Alt+UP and Alt+DOWN to switch to previous/next theme + ((JComponent)frame.getContentPane()).registerKeyboardAction( + e -> frame.themesPanel.selectPreviousTheme(), + KeyStroke.getKeyStroke( KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK ), + JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + ((JComponent)frame.getContentPane()).registerKeyboardAction( + e -> frame.themesPanel.selectNextTheme(), + KeyStroke.getKeyStroke( KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK ), + JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + // register ESC key to close frame ((JComponent)frame.getContentPane()).registerKeyboardAction( e -> { diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java index 7f702505..195237c9 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java @@ -749,6 +749,6 @@ class DemoFrame private JCheckBoxMenuItem animatedLafChangeMenuItem; private JTabbedPane tabbedPane; private ControlBar controlBar; - private IJThemesPanel themesPanel; + IJThemesPanel themesPanel; // JFormDesigner - End of variables declaration //GEN-END:variables } diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd index ef2ac5cb..ba2075b6 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd @@ -117,6 +117,7 @@ new FormModel { name: "themesPanel" auxiliary() { "JavaCodeGenerator.variableLocal": false + "JavaCodeGenerator.variableModifiers": 0 } }, new FormLayoutConstraints( class java.lang.String ) { "value": "East" diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java index 3566322a..f3922624 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java @@ -220,6 +220,17 @@ public class IJThemesPanel } } + public void selectPreviousTheme() { + int sel = themesList.getSelectedIndex(); + if( sel > 0 ) + themesList.setSelectedIndex( sel - 1 ); + } + + public void selectNextTheme() { + int sel = themesList.getSelectedIndex(); + themesList.setSelectedIndex( sel + 1 ); + } + private void themesListValueChanged( ListSelectionEvent e ) { IJThemeInfo themeInfo = themesList.getSelectedValue(); boolean bundledTheme = (themeInfo != null && themeInfo.resourceName != null); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index 4595dd85..c6172a72 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -198,6 +198,16 @@ public class FlatTestFrame KeyStroke.getKeyStroke( KeyEvent.VK_MINUS, menuShortcutKeyMask ), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + // register Alt+UP and Alt+DOWN to switch to previous/next theme + ((JComponent)getContentPane()).registerKeyboardAction( + e -> themesPanel.selectPreviousTheme(), + KeyStroke.getKeyStroke( KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK ), + JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + ((JComponent)getContentPane()).registerKeyboardAction( + e -> themesPanel.selectNextTheme(), + KeyStroke.getKeyStroke( KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK ), + JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + // register ESC key to close frame ((JComponent)getContentPane()).registerKeyboardAction( e -> { From ccd4f99aeacbc3572903393001c7ec78c0d54897 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 20 Nov 2020 10:12:28 +0100 Subject: [PATCH 007/178] Window decorations: removed 1px window border if window is in full-screen mode (issue #212) --- .../src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java index c7e89ca7..070eb896 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java @@ -357,7 +357,7 @@ public class FlatRootPaneUI @Override public Insets getBorderInsets( Component c, Insets insets ) { - if( isWindowMaximized( c ) ) { + if( isWindowMaximized( c ) || FlatUIUtils.isFullScreen( c ) ) { // hide border if window is maximized insets.top = insets.left = insets.bottom = insets.right = 0; return insets; @@ -367,7 +367,7 @@ public class FlatRootPaneUI @Override public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) { - if( isWindowMaximized( c ) ) + if( isWindowMaximized( c ) || FlatUIUtils.isFullScreen( c ) ) return; Container parent = c.getParent(); From 2177ee45cca86a490e8b3a0bd4d0f6ee3fccdedc Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 20 Nov 2020 11:50:03 +0100 Subject: [PATCH 008/178] FlatUIUtils: replaced quadratic curves with bezier curves in createRoundRectanglePath() to get perfect circle when using large arcs (currently only used for SwingX) --- .../com/formdev/flatlaf/ui/FlatUIUtils.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index a43fcad7..b85d7e93 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -519,15 +519,31 @@ public class FlatUIUtils float x2 = x + width; float y2 = y + height; + // same constant as in java.awt.geom.EllipseIterator.CtrlVal used to paint circles + double c = 0.5522847498307933; + double ci = 1. - c; + double ciTopLeft = arcTopLeft * ci; + double ciTopRight = arcTopRight * ci; + double ciBottomLeft = arcBottomLeft * ci; + double ciBottomRight = arcBottomRight * ci; + Path2D rect = new Path2D.Float(); - rect.moveTo( x2 - arcTopRight, y ); - rect.quadTo( x2, y, x2, y + arcTopRight ); - rect.lineTo( x2, y2 - arcBottomRight ); - rect.quadTo( x2, y2, x2 - arcBottomRight, y2 ); - rect.lineTo( x + arcBottomLeft, y2 ); - rect.quadTo( x, y2, x, y2 - arcBottomLeft ); - rect.lineTo( x, y + arcTopLeft ); - rect.quadTo( x, y, x + arcTopLeft, y ); + rect.moveTo( x2 - arcTopRight, y ); + rect.curveTo( x2 - ciTopRight, y, + x2, y + ciTopRight, + x2, y + arcTopRight ); + rect.lineTo( x2, y2 - arcBottomRight ); + rect.curveTo( x2, y2 - ciBottomRight, + x2 - ciBottomRight, y2, + x2 - arcBottomRight, y2 ); + rect.lineTo( x + arcBottomLeft, y2 ); + rect.curveTo( x + ciBottomLeft, y2, + x, y2 - ciBottomLeft, + x, y2 - arcBottomLeft ); + rect.lineTo( x, y + arcTopLeft ); + rect.curveTo( x, y + ciTopLeft, + x + ciTopLeft, y, + x + arcTopLeft, y ); rect.closePath(); return rect; From d83704b7cb927d8cb9ef549ff2964f4664c4689e Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 20 Nov 2020 11:55:24 +0100 Subject: [PATCH 009/178] FlatPaintingTest: added test case for circular components --- .../flatlaf/testing/FlatPaintingTest.java | 70 ++++++++++++----- .../flatlaf/testing/FlatPaintingTest.jfd | 76 ++++++++++++++----- 2 files changed, 111 insertions(+), 35 deletions(-) diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java index e6d48dc6..9c2b934f 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java @@ -50,6 +50,7 @@ public class FlatPaintingTest FlatPaintingTest.BorderPainter borderPainter1 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter6 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter13 = new FlatPaintingTest.BorderPainter(); + FlatPaintingTest.BorderPainter borderPainter25 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter17 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter21 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter29 = new FlatPaintingTest.BorderPainter(); @@ -57,6 +58,7 @@ public class FlatPaintingTest FlatPaintingTest.BorderPainter borderPainter2 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter7 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter14 = new FlatPaintingTest.BorderPainter(); + FlatPaintingTest.BorderPainter borderPainter30 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter18 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter22 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter28 = new FlatPaintingTest.BorderPainter(); @@ -64,6 +66,7 @@ public class FlatPaintingTest FlatPaintingTest.BorderPainter borderPainter3 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter5 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter15 = new FlatPaintingTest.BorderPainter(); + FlatPaintingTest.BorderPainter borderPainter31 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter19 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter23 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter27 = new FlatPaintingTest.BorderPainter(); @@ -71,6 +74,7 @@ public class FlatPaintingTest FlatPaintingTest.BorderPainter borderPainter4 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter8 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter16 = new FlatPaintingTest.BorderPainter(); + FlatPaintingTest.BorderPainter borderPainter32 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter20 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter24 = new FlatPaintingTest.BorderPainter(); FlatPaintingTest.BorderPainter borderPainter26 = new FlatPaintingTest.BorderPainter(); @@ -78,6 +82,7 @@ public class FlatPaintingTest JLabel label2 = new JLabel(); JLabel label3 = new JLabel(); JLabel label4 = new JLabel(); + JLabel label8 = new JLabel(); JLabel label5 = new JLabel(); JLabel label6 = new JLabel(); JLabel label7 = new JLabel(); @@ -91,8 +96,9 @@ public class FlatPaintingTest "ltr,insets dialog,hidemode 3", // columns "[fill]" + - "[left]" + - "[left]" + + "[fill]" + + "[fill]" + + "[fill]" + "[fill]" + "[fill]" + "[fill]" + @@ -134,27 +140,34 @@ public class FlatPaintingTest borderPainter13.setArc(20); flatTestPanel1.add(borderPainter13, "cell 3 0"); + //---- borderPainter25 ---- + borderPainter25.setScale(8.0F); + borderPainter25.setPaintBorder(false); + borderPainter25.setPaintFocus(false); + borderPainter25.setArc(20); + flatTestPanel1.add(borderPainter25, "cell 4 0"); + //---- borderPainter17 ---- borderPainter17.setScale(8.0F); borderPainter17.setPaintBorder(false); borderPainter17.setPaintFocus(false); borderPainter17.setFocusWidth(0); borderPainter17.setArc(0); - flatTestPanel1.add(borderPainter17, "cell 4 0"); + flatTestPanel1.add(borderPainter17, "cell 5 0"); //---- borderPainter21 ---- borderPainter21.setScale(8.0F); borderPainter21.setPaintBorder(false); borderPainter21.setPaintFocus(false); borderPainter21.setArc(0); - flatTestPanel1.add(borderPainter21, "cell 5 0"); + flatTestPanel1.add(borderPainter21, "cell 6 0"); //---- borderPainter29 ---- borderPainter29.setScale(8.0F); borderPainter29.setArc(3); borderPainter29.setFocusWidth(1); borderPainter29.setLineWidth(3); - flatTestPanel1.add(borderPainter29, "cell 7 0"); + flatTestPanel1.add(borderPainter29, "cell 8 0"); //---- borderPainter10 ---- borderPainter10.setScale(8.0F); @@ -185,27 +198,34 @@ public class FlatPaintingTest borderPainter14.setArc(20); flatTestPanel1.add(borderPainter14, "cell 3 1"); + //---- borderPainter30 ---- + borderPainter30.setScale(8.0F); + borderPainter30.setPaintBackground(false); + borderPainter30.setPaintFocus(false); + borderPainter30.setArc(20); + flatTestPanel1.add(borderPainter30, "cell 4 1"); + //---- borderPainter18 ---- borderPainter18.setScale(8.0F); borderPainter18.setPaintBackground(false); borderPainter18.setPaintFocus(false); borderPainter18.setFocusWidth(0); borderPainter18.setArc(0); - flatTestPanel1.add(borderPainter18, "cell 4 1"); + flatTestPanel1.add(borderPainter18, "cell 5 1"); //---- borderPainter22 ---- borderPainter22.setScale(8.0F); borderPainter22.setPaintBackground(false); borderPainter22.setPaintFocus(false); borderPainter22.setArc(0); - flatTestPanel1.add(borderPainter22, "cell 5 1"); + flatTestPanel1.add(borderPainter22, "cell 6 1"); //---- borderPainter28 ---- borderPainter28.setScale(8.0F); borderPainter28.setArc(2); borderPainter28.setFocusWidth(1); borderPainter28.setLineWidth(3); - flatTestPanel1.add(borderPainter28, "cell 7 1"); + flatTestPanel1.add(borderPainter28, "cell 8 1"); //---- borderPainter11 ---- borderPainter11.setScale(8.0F); @@ -236,27 +256,34 @@ public class FlatPaintingTest borderPainter15.setW(25); flatTestPanel1.add(borderPainter15, "cell 3 2"); + //---- borderPainter31 ---- + borderPainter31.setScale(8.0F); + borderPainter31.setPaintBorder(false); + borderPainter31.setPaintBackground(false); + borderPainter31.setArc(20); + flatTestPanel1.add(borderPainter31, "cell 4 2"); + //---- borderPainter19 ---- borderPainter19.setScale(8.0F); borderPainter19.setPaintBorder(false); borderPainter19.setPaintBackground(false); borderPainter19.setFocusWidth(0); borderPainter19.setArc(0); - flatTestPanel1.add(borderPainter19, "cell 4 2"); + flatTestPanel1.add(borderPainter19, "cell 5 2"); //---- borderPainter23 ---- borderPainter23.setScale(8.0F); borderPainter23.setPaintBorder(false); borderPainter23.setPaintBackground(false); borderPainter23.setArc(0); - flatTestPanel1.add(borderPainter23, "cell 5 2"); + flatTestPanel1.add(borderPainter23, "cell 6 2"); //---- borderPainter27 ---- borderPainter27.setScale(8.0F); borderPainter27.setArc(1); borderPainter27.setFocusWidth(1); borderPainter27.setLineWidth(3); - flatTestPanel1.add(borderPainter27, "cell 7 2"); + flatTestPanel1.add(borderPainter27, "cell 8 2"); //---- borderPainter12 ---- borderPainter12.setScale(8.0F); @@ -279,23 +306,28 @@ public class FlatPaintingTest borderPainter16.setArc(20); flatTestPanel1.add(borderPainter16, "cell 3 3"); + //---- borderPainter32 ---- + borderPainter32.setScale(8.0F); + borderPainter32.setArc(20); + flatTestPanel1.add(borderPainter32, "cell 4 3"); + //---- borderPainter20 ---- borderPainter20.setScale(8.0F); borderPainter20.setFocusWidth(0); borderPainter20.setArc(0); - flatTestPanel1.add(borderPainter20, "cell 4 3"); + flatTestPanel1.add(borderPainter20, "cell 5 3"); //---- borderPainter24 ---- borderPainter24.setScale(8.0F); borderPainter24.setArc(0); - flatTestPanel1.add(borderPainter24, "cell 5 3"); + flatTestPanel1.add(borderPainter24, "cell 6 3"); //---- borderPainter26 ---- borderPainter26.setScale(8.0F); borderPainter26.setArc(0); borderPainter26.setFocusWidth(1); borderPainter26.setLineWidth(3); - flatTestPanel1.add(borderPainter26, "cell 7 3"); + flatTestPanel1.add(borderPainter26, "cell 8 3"); //---- label1 ---- label1.setText("fw 0, lw 1, arc 6"); @@ -313,17 +345,21 @@ public class FlatPaintingTest label4.setText("fw 2, lw 1, arc 20"); flatTestPanel1.add(label4, "cell 3 4"); + //---- label8 ---- + label8.setText("fw 2, lw 1, arc 20"); + flatTestPanel1.add(label8, "cell 4 4"); + //---- label5 ---- label5.setText("fw 0, lw 1, arc 0"); - flatTestPanel1.add(label5, "cell 4 4"); + flatTestPanel1.add(label5, "cell 5 4"); //---- label6 ---- label6.setText("fw 2, lw 1, arc 0"); - flatTestPanel1.add(label6, "cell 5 4"); + flatTestPanel1.add(label6, "cell 6 4"); //---- label7 ---- label7.setText("fw 1, lw 3, arc 3,2,1,0"); - flatTestPanel1.add(label7, "cell 7 4"); + flatTestPanel1.add(label7, "cell 8 4"); } setViewportView(flatTestPanel1); // JFormDesigner - End of component initialization //GEN-END:initComponents diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.jfd index dd8dc38d..38abfc3f 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -11,7 +11,7 @@ new FormModel { "border": sfield com.jformdesigner.model.FormObject NULL_VALUE add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "ltr,insets dialog,hidemode 3" - "$columnConstraints": "[fill][left][left][fill][fill][fill][fill][fill]" + "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][fill]" "$rowConstraints": "[top][top][top][top][]" } ) { name: "flatTestPanel1" @@ -52,6 +52,15 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 0" } ) + add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { + name: "borderPainter25" + "scale": 8.0f + "paintBorder": false + "paintFocus": false + "arc": 20 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 0" + } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter17" "scale": 8.0f @@ -60,7 +69,7 @@ new FormModel { "focusWidth": 0 "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 0" + "value": "cell 5 0" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter21" @@ -69,7 +78,7 @@ new FormModel { "paintFocus": false "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 0" + "value": "cell 6 0" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter29" @@ -78,7 +87,7 @@ new FormModel { "focusWidth": 1 "lineWidth": 3 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 7 0" + "value": "cell 8 0" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter10" @@ -117,6 +126,15 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 1" } ) + add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { + name: "borderPainter30" + "scale": 8.0f + "paintBackground": false + "paintFocus": false + "arc": 20 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 1" + } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter18" "scale": 8.0f @@ -125,7 +143,7 @@ new FormModel { "focusWidth": 0 "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 1" + "value": "cell 5 1" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter22" @@ -134,7 +152,7 @@ new FormModel { "paintFocus": false "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 1" + "value": "cell 6 1" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter28" @@ -143,7 +161,7 @@ new FormModel { "focusWidth": 1 "lineWidth": 3 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 7 1" + "value": "cell 8 1" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter11" @@ -182,6 +200,15 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 2" } ) + add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { + name: "borderPainter31" + "scale": 8.0f + "paintBorder": false + "paintBackground": false + "arc": 20 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 2" + } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter19" "scale": 8.0f @@ -190,7 +217,7 @@ new FormModel { "focusWidth": 0 "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 2" + "value": "cell 5 2" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter23" @@ -199,7 +226,7 @@ new FormModel { "paintBackground": false "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 2" + "value": "cell 6 2" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter27" @@ -208,7 +235,7 @@ new FormModel { "focusWidth": 1 "lineWidth": 3 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 7 2" + "value": "cell 8 2" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter12" @@ -239,20 +266,27 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 3" } ) + add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { + name: "borderPainter32" + "scale": 8.0f + "arc": 20 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 3" + } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter20" "scale": 8.0f "focusWidth": 0 "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 3" + "value": "cell 5 3" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter24" "scale": 8.0f "arc": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 3" + "value": "cell 6 3" } ) add( new FormComponent( "com.formdev.flatlaf.testing.FlatPaintingTest$BorderPainter" ) { name: "borderPainter26" @@ -261,7 +295,7 @@ new FormModel { "focusWidth": 1 "lineWidth": 3 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 7 3" + "value": "cell 8 3" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label1" @@ -287,28 +321,34 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 4" } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label8" + "text": "fw 2, lw 1, arc 20" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 4" + } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label5" "text": "fw 0, lw 1, arc 0" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 4" + "value": "cell 5 4" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label6" "text": "fw 2, lw 1, arc 0" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 4" + "value": "cell 6 4" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label7" "text": "fw 1, lw 3, arc 3,2,1,0" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 7 4" + "value": "cell 8 4" } ) } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 1435, 880 ) + "size": new java.awt.Dimension( 1610, 880 ) } ) } } From 4fe707e5199c884facf8b7aee56ce87fc9f8df6f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 00:19:46 +0100 Subject: [PATCH 010/178] GitHub Actions: initial commit --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .travis.yml | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..404f2c56 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: CI + +on: + push: + branches: [github-actions] + pull_request: + branches: [github-actions] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Gradle + run: ./gradlew build diff --git a/.travis.yml b/.travis.yml index 5f64d6a7..ddb9577f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,9 @@ before_install: stages: - name: test + if: branch = disabled - name: snapshot - if: branch = master AND type IN (push) AND tag IS blank + if: branch = disabled AND type IN (push) AND tag IS blank - name: release if: type IN (push) AND tag IS present From 0c679167fa761e00813ce79864e041ececa55f24 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 00:48:27 +0100 Subject: [PATCH 011/178] GitHub Actions: cache gradle dependencies --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 404f2c56..dd7a74a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,5 +19,11 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle - name: Build with Gradle run: ./gradlew build From a0f6affb6888bf2e65eef5bcb5cebacef4860f71 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 01:37:28 +0100 Subject: [PATCH 012/178] GitHub Actions: cache gradle wrapper; fixed key for caching gradle cache --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd7a74a8..bbbb5b4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,24 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - - name: Cache Gradle packages + + - name: Cache Gradle wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + + - name: Cache Gradle cache uses: actions/cache@v2 with: path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} restore-keys: ${{ runner.os }}-gradle + - name: Build with Gradle run: ./gradlew build From f784ff2c84b2d4114728e44de4093d3682ad905c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 01:57:37 +0100 Subject: [PATCH 013/178] GitHub Actions: test also against Java 9 --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbbb5b4c..7d8eccb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,14 +12,17 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + java: [1.8, 9] steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: ${{ matrix.java }} - name: Cache Gradle wrapper uses: actions/cache@v1 From 57df7d28b505e098d7d8e4485c555e096ff0527f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 11:51:41 +0100 Subject: [PATCH 014/178] GitHub Actions: added steps for snapshots and releases --- .github/workflows/ci.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d8eccb7..3b5d23b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,13 +10,19 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: matrix: - java: [1.8, 9] + # test against + # - Java 1.8 (minimum requirement) + # - Java 9 (first version with JPMS) + # - Java LTS versions (11, 17, ...) + # - last two Java versions + java: [1.8, 9, 11, 14, 15] steps: + - uses: actions/checkout@v2 - name: Setup Java ${{ matrix.java }} @@ -38,4 +44,20 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Build with Gradle - run: ./gradlew build + run: echo ./gradlew build + + - name: Publish snapshot to oss.jfrog.org + run: echo ./gradlew artifactoryPublish + if: | + matrix.java == '11' && + github.event_name == 'push' && + github.ref == 'ref/head/github-actions' && + github.repository == 'JFormDesigner/FlatLaf' + + - name: Release a new stable version to bintray + run: echo ./gradlew bintrayUpload -Drelease=true + if: | + matrix.java == '11' && + github.event_name == 'push' && + startsWith( github.ref, 'refs/tags/' ) && + github.repository == 'JFormDesigner/FlatLaf' From 7ad176f98dbcb487e540f13ac89e535a22508db1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 12:02:08 +0100 Subject: [PATCH 015/178] GitHub Actions: info step added --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b5d23b8..377e56db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,13 @@ jobs: steps: + - name: info + run: | + echo ${{ matrix.java }} + echo ${{ github.event_name }} + echo ${{ github.ref }} + echo ${{ github.repository }} + - uses: actions/checkout@v2 - name: Setup Java ${{ matrix.java }} From 4d5242cd61ad5bdd6272c14533c0aa4c6e36a3b1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 12:06:18 +0100 Subject: [PATCH 016/178] GitHub Actions: fixed typo in snapshot step condition --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 377e56db..fae3748e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: if: | matrix.java == '11' && github.event_name == 'push' && - github.ref == 'ref/head/github-actions' && + github.ref == 'refs/heads/github-actions' && github.repository == 'JFormDesigner/FlatLaf' - name: Release a new stable version to bintray From f8c7ccf06422b24fc6fdab97acf1ae41e8c49090 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 13:38:21 +0100 Subject: [PATCH 017/178] GitHub Actions: run if tags are pushed --- .github/workflows/ci.yml | 93 ++++++++++++++++++++++------------------ .travis.yml | 4 +- 2 files changed, 53 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fae3748e..2421fed0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,13 @@ name: CI on: push: - branches: [github-actions] + branches: + - github-actions + tags: + - '[0-9]*' pull_request: - branches: [github-actions] + branches: + - github-actions jobs: build: @@ -18,53 +22,58 @@ jobs: # - Java 1.8 (minimum requirement) # - Java 9 (first version with JPMS) # - Java LTS versions (11, 17, ...) - # - last two Java versions - java: [1.8, 9, 11, 14, 15] + # - lastest Java version(s) + java: + - 1.8 + - 9 + - 14 + - 15 + - 11 # always last because used to build snapshots and releases steps: - - name: info - run: | - echo ${{ matrix.java }} - echo ${{ github.event_name }} - echo ${{ github.ref }} - echo ${{ github.repository }} + - name: info + run: | + echo ${{ matrix.java }} + echo ${{ github.event_name }} + echo ${{ github.ref }} + echo ${{ github.repository }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} + - name: Setup Java ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} - - name: Cache Gradle wrapper - uses: actions/cache@v1 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + - name: Cache Gradle wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Cache Gradle cache - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} - restore-keys: ${{ runner.os }}-gradle + - name: Cache Gradle cache + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} + restore-keys: ${{ runner.os }}-gradle - - name: Build with Gradle - run: echo ./gradlew build + - name: Build with Gradle + run: echo ./gradlew build - - name: Publish snapshot to oss.jfrog.org - run: echo ./gradlew artifactoryPublish - if: | - matrix.java == '11' && - github.event_name == 'push' && - github.ref == 'refs/heads/github-actions' && - github.repository == 'JFormDesigner/FlatLaf' + - name: Publish snapshot to oss.jfrog.org + run: echo ./gradlew artifactoryPublish + if: | + matrix.java == '11' && + github.event_name == 'push' && + github.ref == 'refs/heads/github-actions' && + github.repository == 'JFormDesigner/FlatLaf' - - name: Release a new stable version to bintray - run: echo ./gradlew bintrayUpload -Drelease=true - if: | - matrix.java == '11' && - github.event_name == 'push' && - startsWith( github.ref, 'refs/tags/' ) && - github.repository == 'JFormDesigner/FlatLaf' + - name: Release a new stable version to bintray + run: echo ./gradlew bintrayUpload -Drelease=true + if: | + matrix.java == '11' && + github.event_name == 'push' && + startsWith( github.ref, 'refs/tags/' ) && + github.repository == 'JFormDesigner/FlatLaf' diff --git a/.travis.yml b/.travis.yml index ddb9577f..8f573e63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,8 @@ stages: if: branch = disabled - name: snapshot if: branch = disabled AND type IN (push) AND tag IS blank - - name: release - if: type IN (push) AND tag IS present +# - name: release +# if: type IN (push) AND tag IS present jobs: include: From a1f78345e6036145a419730140311af91fed482a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 14:04:32 +0100 Subject: [PATCH 018/178] GitHub Actions: use separate jobs for snapshots and releases to be sure that build succeeded for all Java versions --- .github/workflows/ci.yml | 80 ++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2421fed0..8d70d7bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,19 +26,11 @@ jobs: java: - 1.8 - 9 + - 11 # LTS - 14 - 15 - - 11 # always last because used to build snapshots and releases steps: - - - name: info - run: | - echo ${{ matrix.java }} - echo ${{ github.event_name }} - echo ${{ github.ref }} - echo ${{ github.repository }} - - uses: actions/checkout@v2 - name: Setup Java ${{ matrix.java }} @@ -62,18 +54,68 @@ jobs: - name: Build with Gradle run: echo ./gradlew build + + snapshot: + runs-on: ubuntu-latest + needs: build + if: | + github.event_name == 'push' && + github.ref == 'refs/heads/github-actions' && + github.repository == 'JFormDesigner/FlatLaf' + + steps: + - uses: actions/checkout@v2 + + - name: Setup Java 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache Gradle wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + + - name: Cache Gradle cache + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} + restore-keys: ${{ runner.os }}-gradle + - name: Publish snapshot to oss.jfrog.org run: echo ./gradlew artifactoryPublish - if: | - matrix.java == '11' && - github.event_name == 'push' && - github.ref == 'refs/heads/github-actions' && - github.repository == 'JFormDesigner/FlatLaf' + + + release: + runs-on: ubuntu-latest + needs: build + if: | + github.event_name == 'push' && + startsWith( github.ref, 'refs/tags/' ) && + github.repository == 'JFormDesigner/FlatLaf' + + steps: + - uses: actions/checkout@v2 + + - name: Setup Java 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache Gradle wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + + - name: Cache Gradle cache + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} + restore-keys: ${{ runner.os }}-gradle - name: Release a new stable version to bintray run: echo ./gradlew bintrayUpload -Drelease=true - if: | - matrix.java == '11' && - github.event_name == 'push' && - startsWith( github.ref, 'refs/tags/' ) && - github.repository == 'JFormDesigner/FlatLaf' From 19ed53857382912cd109af1db111543716a101c2 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 14:24:56 +0100 Subject: [PATCH 019/178] GitHub Actions: added secrets for snapshot and release jobs --- .github/workflows/ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d70d7bb..826689b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Build with Gradle - run: echo ./gradlew build + run: ./gradlew build snapshot: @@ -85,7 +85,10 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Publish snapshot to oss.jfrog.org - run: echo ./gradlew artifactoryPublish + run: ./gradlew artifactoryPublish + env: + BINTRAY_USER: ${{ secrets.BINTRAY_USER }} + BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} release: @@ -118,4 +121,7 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Release a new stable version to bintray - run: echo ./gradlew bintrayUpload -Drelease=true + run: ./gradlew bintrayUpload -Drelease=true + env: + BINTRAY_USER: ${{ secrets.BINTRAY_USER }} + BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} From cce99c803eb205c07789c68b1c5bf005c149a80b Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 14:32:36 +0100 Subject: [PATCH 020/178] GitHub Actions: test release job without publishing --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index a000073c..bab1dacd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,7 +48,7 @@ extra["bintray.dryRun"] = false // if true, uploaded artifacts are visible to all // if false, only visible to owner when logged into bintray -extra["bintray.publish"] = true +extra["bintray.publish"] = false allprojects { From d04ec982ab127fc6b4e9e57c46b3950d079929ab Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 14:42:09 +0100 Subject: [PATCH 021/178] GitHub Actions: 2nd attempt to test release job without publishing --- .github/workflows/ci.yml | 1 + build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 826689b5..d5302fe4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ on: jobs: build: runs-on: ubuntu-latest + if: false strategy: matrix: diff --git a/build.gradle.kts b/build.gradle.kts index bab1dacd..29e8694f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ * limitations under the License. */ -val releaseVersion = "0.44" +val releaseVersion = "0.0.2" val developmentVersion = "0.45-SNAPSHOT" version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion From d16a3c117b2fe9911c8704f6550dbf71e2c73f35 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 14:45:02 +0100 Subject: [PATCH 022/178] GitHub Actions: 3rd attempt to test release job without publishing --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5302fe4..234e1758 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: release: runs-on: ubuntu-latest - needs: build +# needs: build if: | github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' ) && From d95b1b0ec4225da752307cffe2baa296164adef6 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 15:08:07 +0100 Subject: [PATCH 023/178] GitHub Actions: upload build artifacts --- .github/workflows/ci.yml | 23 ++++++++++++++++++----- build.gradle.kts | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 234e1758..2eeae8fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ on: jobs: build: runs-on: ubuntu-latest - if: false strategy: matrix: @@ -26,10 +25,10 @@ jobs: # - lastest Java version(s) java: - 1.8 - - 9 +# - 9 - 11 # LTS - - 14 - - 15 +# - 14 +# - 15 steps: - uses: actions/checkout@v2 @@ -55,11 +54,25 @@ jobs: - name: Build with Gradle run: ./gradlew build + - name: Upload artifacts + uses: actions/upload-artifact@v2 + if: matrix.java == '11' + with: + name: FlatLaf-build-artifacts + path: | + flatlaf-core/build/libs + flatlaf-demo/build/libs + flatlaf-extras/build/libs + flatlaf-intellij-themes/build/libs + flatlaf-jide-oss/build/libs + flatlaf-swingx/build/libs + snapshot: runs-on: ubuntu-latest needs: build if: | + false && github.event_name == 'push' && github.ref == 'refs/heads/github-actions' && github.repository == 'JFormDesigner/FlatLaf' @@ -94,7 +107,7 @@ jobs: release: runs-on: ubuntu-latest -# needs: build + needs: build if: | github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' ) && diff --git a/build.gradle.kts b/build.gradle.kts index 29e8694f..bab1dacd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ * limitations under the License. */ -val releaseVersion = "0.0.2" +val releaseVersion = "0.44" val developmentVersion = "0.45-SNAPSHOT" version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion From 18e838bffda0b117b41e2108f106abde42efa9f3 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 15:21:33 +0100 Subject: [PATCH 024/178] GitHub Actions: exclude javadoc and sources from build artifacts --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2eeae8fe..c38ebaba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: # - Java LTS versions (11, 17, ...) # - lastest Java version(s) java: - - 1.8 +# - 1.8 # - 9 - 11 # LTS # - 14 @@ -66,6 +66,8 @@ jobs: flatlaf-intellij-themes/build/libs flatlaf-jide-oss/build/libs flatlaf-swingx/build/libs + !**/*-javadoc.jar + !**/*-sources.jar snapshot: From 80bdf69eafed801903bc6e2c4c5c39979610eff9 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 17:31:52 +0100 Subject: [PATCH 025/178] GitHub Actions: build on all branches; produce snapshots only on master branch; disable Travis CI --- .github/workflows/ci.yml | 15 +++++++-------- .travis.yml | 41 ---------------------------------------- 2 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c38ebaba..2ae5efd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,12 @@ name: CI on: push: branches: - - github-actions + - '*' tags: - '[0-9]*' pull_request: branches: - - github-actions + - '*' jobs: build: @@ -24,11 +24,11 @@ jobs: # - Java LTS versions (11, 17, ...) # - lastest Java version(s) java: -# - 1.8 -# - 9 + - 1.8 + - 9 - 11 # LTS -# - 14 -# - 15 + - 14 + - 15 steps: - uses: actions/checkout@v2 @@ -74,9 +74,8 @@ jobs: runs-on: ubuntu-latest needs: build if: | - false && github.event_name == 'push' && - github.ref == 'refs/heads/github-actions' && + github.ref == 'refs/heads/master' && github.repository == 'JFormDesigner/FlatLaf' steps: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8f573e63..00000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: java -sudo: false - -jdk: - - openjdk8 - - openjdk9 - - openjdk11 - - openjdk14 - - openjdk15 - -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ -cache: - directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ - -before_install: - - ./gradlew --version - - java -version - -stages: - - name: test - if: branch = disabled - - name: snapshot - if: branch = disabled AND type IN (push) AND tag IS blank -# - name: release -# if: type IN (push) AND tag IS present - -jobs: - include: - # publish snapshot to oss.jfrog.org - - stage: snapshot - jdk: openjdk11 - script: ./gradlew artifactoryPublish - - # release a new stable version to bintray - - stage: release - jdk: openjdk11 - script: ./gradlew bintrayUpload -Drelease=true From 6e55e0a1837b9bcda28a62cd1acaea3681f01133 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 17 Nov 2020 14:03:26 +0100 Subject: [PATCH 026/178] Slider: - hover feedback only when mouse is over thumb - pressed feedback added - separate disabled colors for track and thumb - made private fields protected --- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 140 +++++++++++++----- .../formdev/flatlaf/FlatDarkLaf.properties | 6 +- .../formdev/flatlaf/FlatLightLaf.properties | 6 +- .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 6 +- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 6 +- .../uidefaults/FlatTestLaf_1.8.0_202.txt | 6 +- .../flatlaf/testing/FlatTestLaf.properties | 6 +- .../flatlaf/themeeditor/FlatLafUIKeys.txt | 6 +- 8 files changed, 127 insertions(+), 55 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 9115a87e..83a1e7e2 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -20,7 +20,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; -import java.awt.event.MouseListener; +import java.awt.event.MouseEvent; import java.awt.geom.Path2D; import java.awt.geom.RoundRectangle2D; import javax.swing.JComponent; @@ -53,25 +53,29 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault Slider.trackColor Color * @uiDefault Slider.thumbColor Color * @uiDefault Slider.focusedColor Color optional; defaults to Component.focusColor - * @uiDefault Slider.hoverColor Color optional; defaults to Slider.focusedColor - * @uiDefault Slider.disabledForeground Color used for track and thumb is disabled + * @uiDefault Slider.hoverThumbColor Color optional + * @uiDefault Slider.pressedThumbColor Color optional + * @uiDefault Slider.disabledTrackColor Color + * @uiDefault Slider.disabledThumbColor Color * * @author Karl Tauber */ public class FlatSliderUI extends BasicSliderUI { - private int trackWidth; - private int thumbWidth; + protected int trackWidth; + protected int thumbWidth; - private Color trackColor; - private Color thumbColor; - private Color focusColor; - private Color hoverColor; - private Color disabledForeground; + protected Color trackColor; + protected Color thumbColor; + protected Color focusColor; + protected Color hoverThumbColor; + protected Color pressedThumbColor; + protected Color disabledTrackColor; + protected Color disabledThumbColor; - private MouseListener hoverListener; - private boolean hover; + protected boolean thumbHover; + protected boolean thumbPressed; public static ComponentUI createUI( JComponent c ) { return new FlatSliderUI(); @@ -81,24 +85,6 @@ public class FlatSliderUI super( null ); } - @Override - protected void installListeners( JSlider slider ) { - super.installListeners( slider ); - - hoverListener = new FlatUIUtils.HoverListener( slider, h -> { - hover = h; - } ); - slider.addMouseListener( hoverListener ); - } - - @Override - protected void uninstallListeners( JSlider slider ) { - super.uninstallListeners( slider ); - - slider.removeMouseListener( hoverListener ); - hoverListener = null; - } - @Override protected void installDefaults( JSlider slider ) { super.installDefaults( slider ); @@ -111,8 +97,10 @@ public class FlatSliderUI trackColor = UIManager.getColor( "Slider.trackColor" ); thumbColor = UIManager.getColor( "Slider.thumbColor" ); focusColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); - hoverColor = FlatUIUtils.getUIColor( "Slider.hoverColor", focusColor ); - disabledForeground = UIManager.getColor( "Slider.disabledForeground" ); + hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" ); + pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" ); + disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" ); + disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" ); } @Override @@ -122,8 +110,15 @@ public class FlatSliderUI trackColor = null; thumbColor = null; focusColor = null; - hoverColor = null; - disabledForeground = null; + hoverThumbColor = null; + pressedThumbColor = null; + disabledTrackColor = null; + disabledThumbColor = null; + } + + @Override + protected TrackListener createTrackListener( JSlider slider ) { + return new FlatTrackListener(); } @Override @@ -201,20 +196,17 @@ public class FlatSliderUI } if( coloredTrack != null ) { - g.setColor( FlatUIUtils.deriveColor( FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor), thumbColor ) ); + g.setColor( thumbColor ); ((Graphics2D)g).fill( coloredTrack ); } - g.setColor( enabled ? trackColor : disabledForeground ); + g.setColor( enabled ? trackColor : disabledTrackColor ); ((Graphics2D)g).fill( track ); } @Override public void paintThumb( Graphics g ) { - g.setColor( FlatUIUtils.deriveColor( slider.isEnabled() - ? (FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor)) - : disabledForeground, - thumbColor ) ); + g.setColor( FlatUIUtils.deriveColor( getThumbColor(), thumbColor ) ); if( isRoundThumb() ) g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); @@ -244,7 +236,73 @@ public class FlatSliderUI } } - private boolean isRoundThumb() { + protected Color getThumbColor() { + if( !slider.isEnabled() ) + return disabledThumbColor; + if( thumbPressed && pressedThumbColor != null ) + return pressedThumbColor; + if( thumbHover && hoverThumbColor != null ) + return hoverThumbColor; + if( FlatUIUtils.isPermanentFocusOwner( slider ) ) + return focusColor; + return thumbColor; + } + + protected boolean isRoundThumb() { return !slider.getPaintTicks() && !slider.getPaintLabels(); } + + //---- class FlatTrackListener -------------------------------------------- + + protected class FlatTrackListener + extends TrackListener + { + @Override + public void mouseEntered( MouseEvent e ) { + setThumbHover( isOverThumb( e ) ); + super.mouseEntered( e ); + } + + @Override + public void mouseExited( MouseEvent e ) { + setThumbHover( false ); + super.mouseExited( e ); + } + + @Override + public void mouseMoved( MouseEvent e ) { + setThumbHover( isOverThumb( e ) ); + super.mouseMoved( e ); + } + + @Override + public void mousePressed( MouseEvent e ) { + setThumbPressed( isOverThumb( e ) ); + super.mousePressed( e ); + } + + @Override + public void mouseReleased( MouseEvent e ) { + setThumbPressed( false ); + super.mouseReleased( e ); + } + + protected void setThumbHover( boolean hover ) { + if( hover != thumbHover ) { + thumbHover = hover; + slider.repaint( thumbRect ); + } + } + + protected void setThumbPressed( boolean pressed ) { + if( pressed != thumbPressed ) { + thumbPressed = pressed; + slider.repaint( thumbRect ); + } + } + + protected boolean isOverThumb( MouseEvent e ) { + return e != null && slider.isEnabled() && thumbRect.contains( e.getX(), e.getY() ); + } + } } diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 93c22262..83a89615 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -240,8 +240,10 @@ Separator.foreground=#515151 Slider.trackColor=#646464 Slider.thumbColor=#A6A6A6 Slider.tickColor=#888 -Slider.hoverColor=darken($Slider.thumbColor,15%,derived) -Slider.disabledForeground=#4c5052 +Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived) +Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived) +Slider.disabledTrackColor=#4c5052 +Slider.disabledThumbColor=$Slider.disabledTrackColor #---- SplitPane ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 029a3868..7d96b7e2 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -252,8 +252,10 @@ Separator.foreground=#d1d1d1 Slider.trackColor=#c4c4c4 Slider.thumbColor=#6e6e6e Slider.tickColor=#888 -Slider.hoverColor=lighten($Slider.thumbColor,15%,derived) -Slider.disabledForeground=#c0c0c0 +Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived) +Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived) +Slider.disabledTrackColor=#c0c0c0 +Slider.disabledThumbColor=$Slider.disabledTrackColor #---- SplitPane ---- diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index f37f4fe6..6dbe410b 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -841,17 +841,19 @@ SeparatorUI com.formdev.flatlaf.ui.FlatSeparatorUI #---- Slider ---- Slider.background #3c3f41 javax.swing.plaf.ColorUIResource [UI] -Slider.disabledForeground #4c5052 javax.swing.plaf.ColorUIResource [UI] +Slider.disabledThumbColor #4c5052 javax.swing.plaf.ColorUIResource [UI] +Slider.disabledTrackColor #4c5052 javax.swing.plaf.ColorUIResource [UI] Slider.focus #7e7e7e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] Slider.font [active] $defaultFont [UI] Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI] Slider.horizontalSize 200,21 java.awt.Dimension -Slider.hoverColor #808080 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse) +Slider.hoverThumbColor #8d8d8d com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) Slider.minimumHorizontalSize 36,21 java.awt.Dimension Slider.minimumVerticalSize 21,36 java.awt.Dimension Slider.onlyLeftMouseButtonDrag true +Slider.pressedThumbColor #808080 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse) Slider.shadow #646464 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] Slider.thumbWidth 11 diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 9d9059b0..526ebb03 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -846,17 +846,19 @@ SeparatorUI com.formdev.flatlaf.ui.FlatSeparatorUI #---- Slider ---- Slider.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI] -Slider.disabledForeground #c0c0c0 javax.swing.plaf.ColorUIResource [UI] +Slider.disabledThumbColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI] +Slider.disabledTrackColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI] Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] Slider.font [active] $defaultFont [UI] Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI] Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] Slider.horizontalSize 200,21 java.awt.Dimension -Slider.hoverColor #949494 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse) +Slider.hoverThumbColor #888888 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse) Slider.minimumHorizontalSize 36,21 java.awt.Dimension Slider.minimumVerticalSize 21,36 java.awt.Dimension Slider.onlyLeftMouseButtonDrag true +Slider.pressedThumbColor #949494 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse) Slider.shadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #6e6e6e javax.swing.plaf.ColorUIResource [UI] Slider.thumbWidth 11 diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index 5e1b71d9..488f902e 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -833,7 +833,8 @@ SeparatorUI com.formdev.flatlaf.ui.FlatSeparatorUI #---- Slider ---- Slider.background #ccffcc javax.swing.plaf.ColorUIResource [UI] -Slider.disabledForeground #000088 javax.swing.plaf.ColorUIResource [UI] +Slider.disabledThumbColor #888800 javax.swing.plaf.ColorUIResource [UI] +Slider.disabledTrackColor #ffff88 javax.swing.plaf.ColorUIResource [UI] Slider.focus #696969 javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] Slider.focusedColor #97c3f3 javax.swing.plaf.ColorUIResource [UI] @@ -841,10 +842,11 @@ Slider.font [active] $defaultFont [UI] Slider.foreground #ff0000 javax.swing.plaf.ColorUIResource [UI] Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] Slider.horizontalSize 200,21 java.awt.Dimension -Slider.hoverColor #0000ff javax.swing.plaf.ColorUIResource [UI] +Slider.hoverThumbColor #0000ff javax.swing.plaf.ColorUIResource [UI] Slider.minimumHorizontalSize 36,21 java.awt.Dimension Slider.minimumVerticalSize 21,36 java.awt.Dimension Slider.onlyLeftMouseButtonDrag true +Slider.pressedThumbColor #00ff00 javax.swing.plaf.ColorUIResource [UI] Slider.shadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #880000 javax.swing.plaf.ColorUIResource [UI] Slider.thumbWidth 11 diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index b4e350ba..33437c7c 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -261,8 +261,10 @@ Slider.trackColor=#0b0 Slider.thumbColor=#800 Slider.tickColor=#f00 Slider.focusedColor=$Component.focusColor -Slider.hoverColor=#00f -Slider.disabledForeground=#008 +Slider.hoverThumbColor=#00f +Slider.pressedThumbColor=#0f0 +Slider.disabledTrackColor=#ff8 +Slider.disabledThumbColor=#880 #---- SplitPane ---- 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 ce120e79..4dc094fb 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 @@ -581,7 +581,8 @@ Separator.stripeIndent Separator.stripeWidth SeparatorUI Slider.background -Slider.disabledForeground +Slider.disabledThumbColor +Slider.disabledTrackColor Slider.focus Slider.focusInputMap Slider.focusInputMap.RightToLeft @@ -590,10 +591,11 @@ Slider.font Slider.foreground Slider.highlight Slider.horizontalSize -Slider.hoverColor +Slider.hoverThumbColor Slider.minimumHorizontalSize Slider.minimumVerticalSize Slider.onlyLeftMouseButtonDrag +Slider.pressedThumbColor Slider.shadow Slider.thumbColor Slider.thumbWidth From e337e5bbd82cd30a3aad406ddf0ad5238f9190cc Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 17 Nov 2020 18:07:11 +0100 Subject: [PATCH 027/178] JIDE: RangeSlider: - updated with latest changes from FlatSliderUI - use static FlatSliderUI methods for thumb painting - hover/pressed feedback on single thumb - hover/pressed feedback on middle track and both thumbs - added JSlider components to FlatRangeSliderTest for easier testing/comparing --- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 37 ++++-- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 83 ++++++------- .../uidefaults/FlatTestLaf_1.8.0_202.txt | 2 + .../jideoss/FlatJideOssDefaultsTestAddon.java | 32 +++++ .../testing/jideoss/FlatRangeSliderTest.java | 115 +++++++++++++----- .../testing/jideoss/FlatRangeSliderTest.jfd | 93 ++++++++++++-- .../com.formdev.flatlaf.FlatDefaultsAddon | 1 + .../testing/jideoss/FlatTestLaf.properties | 20 +++ 8 files changed, 288 insertions(+), 95 deletions(-) create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssDefaultsTestAddon.java create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 83a1e7e2..d5323d11 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -20,6 +20,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.geom.Path2D; import java.awt.geom.RoundRectangle2D; @@ -206,9 +207,19 @@ public class FlatSliderUI @Override public void paintThumb( Graphics g ) { - g.setColor( FlatUIUtils.deriveColor( getThumbColor(), thumbColor ) ); + Color color = stateColor( slider, thumbHover, thumbPressed, + thumbColor, disabledThumbColor, focusColor, hoverThumbColor, pressedThumbColor ); + color = FlatUIUtils.deriveColor( color, thumbColor ); - if( isRoundThumb() ) + paintThumb( g, slider, thumbRect, isRoundThumb(), color ); + } + + public static void paintThumb( Graphics g, JSlider slider, Rectangle thumbRect, boolean roundThumb, + Color thumbColor ) + { + g.setColor( thumbColor ); + + if( roundThumb ) g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); else { double w = thumbRect.width; @@ -236,16 +247,18 @@ public class FlatSliderUI } } - protected Color getThumbColor() { - if( !slider.isEnabled() ) - return disabledThumbColor; - if( thumbPressed && pressedThumbColor != null ) - return pressedThumbColor; - if( thumbHover && hoverThumbColor != null ) - return hoverThumbColor; - if( FlatUIUtils.isPermanentFocusOwner( slider ) ) - return focusColor; - return thumbColor; + public static Color stateColor( JSlider slider, boolean hover, boolean pressed, + Color enabledColor, Color disabledColor, Color focusedColor, Color hoverColor, Color pressedColor ) + { + if( disabledColor != null && !slider.isEnabled() ) + return disabledColor; + if( pressedColor != null && pressed ) + return pressedColor; + if( hoverColor != null && hover ) + return hoverColor; + if( focusedColor != null && FlatUIUtils.isPermanentFocusOwner( slider ) ) + return focusedColor; + return enabledColor; } protected boolean isRoundThumb() { diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index 5e8ea9dc..3e2ccad5 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -22,7 +22,6 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; -import java.awt.geom.Path2D; import java.awt.geom.RoundRectangle2D; import java.util.Dictionary; import java.util.Enumeration; @@ -31,6 +30,7 @@ import javax.swing.JSlider; import javax.swing.LookAndFeel; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; +import com.formdev.flatlaf.ui.FlatSliderUI; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.UIScale; import com.jidesoft.plaf.basic.BasicRangeSliderUI; @@ -41,14 +41,18 @@ import com.jidesoft.plaf.basic.BasicRangeSliderUI; public class FlatRangeSliderUI extends BasicRangeSliderUI { - private int trackWidth; - private int thumbWidth; + protected int trackWidth; + protected int thumbWidth; - private Color trackColor; - private Color thumbColor; - private Color focusColor; - private Color hoverColor; - private Color disabledForeground; + protected Color trackColor; + protected Color thumbColor; + protected Color focusColor; + protected Color hoverTrackColor; + protected Color hoverThumbColor; + protected Color pressedTrackColor; + protected Color pressedThumbColor; + protected Color disabledTrackColor; + protected Color disabledThumbColor; private Rectangle firstThumbRect; @@ -102,8 +106,12 @@ public class FlatRangeSliderUI trackColor = UIManager.getColor( "Slider.trackColor" ); thumbColor = UIManager.getColor( "Slider.thumbColor" ); focusColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); - hoverColor = FlatUIUtils.getUIColor( "Slider.hoverColor", focusColor ); - disabledForeground = UIManager.getColor( "Slider.disabledForeground" ); + hoverTrackColor = FlatUIUtils.getUIColor( "Slider.hoverTrackColor", "Slider.hoverThumbColor" ); + hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" ); + pressedTrackColor = FlatUIUtils.getUIColor( "Slider.pressedTrackColor", "Slider.pressedThumbColor" ); + pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" ); + disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" ); + disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" ); } @Override @@ -113,8 +121,12 @@ public class FlatRangeSliderUI trackColor = null; thumbColor = null; focusColor = null; - hoverColor = null; - disabledForeground = null; + hoverTrackColor = null; + hoverThumbColor = null; + pressedTrackColor = null; + pressedThumbColor = null; + disabledTrackColor = null; + disabledThumbColor = null; } @Override @@ -220,50 +232,33 @@ public class FlatRangeSliderUI } if( coloredTrack != null ) { - g.setColor( FlatUIUtils.deriveColor( FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor), thumbColor ) ); + boolean trackHover = hover && rollover1 && rollover2; + boolean trackPressed = pressed1 && pressed2; + + Color color = FlatSliderUI.stateColor( slider, trackHover, trackPressed, + thumbColor, null, null, hoverTrackColor, pressedTrackColor ); + + g.setColor( FlatUIUtils.deriveColor( color, thumbColor ) ); ((Graphics2D)g).fill( coloredTrack ); } - g.setColor( enabled ? trackColor : disabledForeground ); + g.setColor( enabled ? trackColor : disabledTrackColor ); ((Graphics2D)g).fill( track ); } @Override public void paintThumb( Graphics g ) { - g.setColor( FlatUIUtils.deriveColor( slider.isEnabled() - ? (FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor)) - : disabledForeground, - thumbColor ) ); + boolean thumbHover = hover && ((!second && rollover1) || (second && rollover2)); + boolean thumbPressed = (!second && pressed1) || (second && pressed2); - if( isRoundThumb() ) - g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); - else { - double w = thumbRect.width; - double h = thumbRect.height; - double wh = w / 2; + Color color = FlatSliderUI.stateColor( slider, thumbHover, thumbPressed, + thumbColor, disabledThumbColor, focusColor, hoverThumbColor, pressedThumbColor ); + color = FlatUIUtils.deriveColor( color, thumbColor ); - Path2D thumb = FlatUIUtils.createPath( 0,0, w,0, w,(h - wh), wh,h, 0,(h - wh) ); - - Graphics2D g2 = (Graphics2D) g.create(); - try { - g2.translate( thumbRect.x, thumbRect.y ); - if( slider.getOrientation() == JSlider.VERTICAL ) { - if( slider.getComponentOrientation().isLeftToRight() ) { - g2.translate( 0, thumbRect.height ); - g2.rotate( Math.toRadians( 270 ) ); - } else { - g2.translate( thumbRect.width, 0 ); - g2.rotate( Math.toRadians( 90 ) ); - } - } - g2.fill( thumb ); - } finally { - g2.dispose(); - } - } + FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color ); } - private boolean isRoundThumb() { + protected boolean isRoundThumb() { return !slider.getPaintTicks() && !slider.getPaintLabels(); } } diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index 488f902e..d656b7f1 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -843,10 +843,12 @@ Slider.foreground #ff0000 javax.swing.plaf.ColorUIResource [UI] Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] Slider.horizontalSize 200,21 java.awt.Dimension Slider.hoverThumbColor #0000ff javax.swing.plaf.ColorUIResource [UI] +Slider.hoverTrackColor #4444ff javax.swing.plaf.ColorUIResource [UI] Slider.minimumHorizontalSize 36,21 java.awt.Dimension Slider.minimumVerticalSize 21,36 java.awt.Dimension Slider.onlyLeftMouseButtonDrag true Slider.pressedThumbColor #00ff00 javax.swing.plaf.ColorUIResource [UI] +Slider.pressedTrackColor #88ff88 javax.swing.plaf.ColorUIResource [UI] Slider.shadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #880000 javax.swing.plaf.ColorUIResource [UI] Slider.thumbWidth 11 diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssDefaultsTestAddon.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssDefaultsTestAddon.java new file mode 100644 index 00000000..f1219583 --- /dev/null +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssDefaultsTestAddon.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.testing.jideoss; + +import com.formdev.flatlaf.FlatDefaultsAddon; + +/** + * JIDE Common Layer addon for FlatLaf for testing. + *

+ * Finds JIDE Common Layer addon .properties file for the given LaF class + * in the same package as this class. + * + * @author Karl Tauber + */ +public class FlatJideOssDefaultsTestAddon + extends FlatDefaultsAddon +{ +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java index 1b54b8ef..00eaa0a5 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.testing.jideoss; import javax.swing.JCheckBox; import javax.swing.JLabel; +import javax.swing.JSlider; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.UIManager; @@ -50,13 +51,19 @@ public class FlatRangeSliderTest } private void paintLabels() { - horizontalRangeSlider.setPaintLabels( paintLabel.isSelected() ); - verticalRangeSlider.setPaintLabels( paintLabel.isSelected() ); + boolean selected = paintLabel.isSelected(); + horizontalRangeSlider.setPaintLabels( selected ); + verticalRangeSlider.setPaintLabels( selected ); + horizontalSlider.setPaintLabels( selected ); + verticalSlider.setPaintLabels( selected ); } private void paintTicks() { - horizontalRangeSlider.setPaintTicks( paintTick.isSelected() ); - verticalRangeSlider.setPaintTicks( paintTick.isSelected() ); + boolean selected = paintTick.isSelected(); + horizontalRangeSlider.setPaintTicks( selected ); + verticalRangeSlider.setPaintTicks( selected ); + horizontalSlider.setPaintTicks( selected ); + verticalSlider.setPaintTicks( selected ); } private void initComponents() { @@ -64,8 +71,14 @@ public class FlatRangeSliderTest JLabel tabbedPaneLabel = new JLabel(); JLabel horizontalLabel = new JLabel(); horizontalRangeSlider = new RangeSlider(); + horizontalSlider = new JSlider(); + horizontalRangeSlider2 = new RangeSlider(); + horizontalSlider2 = new JSlider(); JLabel verticalLabel = new JLabel(); verticalRangeSlider = new RangeSlider(); + verticalSlider = new JSlider(); + verticalRangeSlider2 = new RangeSlider(); + verticalSlider2 = new JSlider(); paintTick = new JCheckBox(); paintLabel = new JCheckBox(); @@ -74,10 +87,13 @@ public class FlatRangeSliderTest "insets dialog,hidemode 3", // columns "[left]" + - "[fill]", + "[240,left]", // rows "[fill]" + "[center]" + + "[]" + + "[]" + + "[]" + "[grow,fill]" + "[]")); @@ -88,57 +104,92 @@ public class FlatRangeSliderTest //---- horizontalLabel ---- horizontalLabel.setText("Horizontal"); add(horizontalLabel, "cell 0 1"); - add(horizontalRangeSlider, "cell 1 1"); + + //---- horizontalRangeSlider ---- + horizontalRangeSlider.setLowValue(30); + horizontalRangeSlider.setHighValue(80); + horizontalRangeSlider.setMajorTickSpacing(10); + horizontalRangeSlider.setMinorTickSpacing(5); + horizontalRangeSlider.setPaintTicks(true); + horizontalRangeSlider.setPaintLabels(true); + add(horizontalRangeSlider, "cell 1 1,growx"); + + //---- horizontalSlider ---- + horizontalSlider.setMinorTickSpacing(5); + horizontalSlider.setPaintTicks(true); + horizontalSlider.setMajorTickSpacing(10); + horizontalSlider.setPaintLabels(true); + horizontalSlider.setValue(30); + add(horizontalSlider, "cell 1 2,growx"); + + //---- horizontalRangeSlider2 ---- + horizontalRangeSlider2.setLowValue(30); + horizontalRangeSlider2.setHighValue(80); + add(horizontalRangeSlider2, "cell 1 3,growx"); + + //---- horizontalSlider2 ---- + horizontalSlider2.setValue(30); + add(horizontalSlider2, "cell 1 4,growx"); //---- verticalLabel ---- verticalLabel.setText("Vertical"); - add(verticalLabel, "cell 0 2,aligny top,growy 0"); + add(verticalLabel, "cell 0 5,aligny top,growy 0"); //---- verticalRangeSlider ---- verticalRangeSlider.setOrientation(SwingConstants.VERTICAL); - add(verticalRangeSlider, "cell 1 2,alignx left,growx 0"); + verticalRangeSlider.setLowValue(30); + verticalRangeSlider.setHighValue(80); + verticalRangeSlider.setMajorTickSpacing(10); + verticalRangeSlider.setMinorTickSpacing(5); + verticalRangeSlider.setPaintTicks(true); + verticalRangeSlider.setPaintLabels(true); + add(verticalRangeSlider, "cell 1 5,alignx left,growx 0"); + + //---- verticalSlider ---- + verticalSlider.setMinorTickSpacing(5); + verticalSlider.setPaintTicks(true); + verticalSlider.setMajorTickSpacing(10); + verticalSlider.setPaintLabels(true); + verticalSlider.setOrientation(SwingConstants.VERTICAL); + verticalSlider.setValue(30); + add(verticalSlider, "cell 1 5"); + + //---- verticalRangeSlider2 ---- + verticalRangeSlider2.setOrientation(SwingConstants.VERTICAL); + verticalRangeSlider2.setLowValue(30); + verticalRangeSlider2.setHighValue(80); + add(verticalRangeSlider2, "cell 1 5"); + + //---- verticalSlider2 ---- + verticalSlider2.setOrientation(SwingConstants.VERTICAL); + verticalSlider2.setValue(30); + add(verticalSlider2, "cell 1 5"); //---- paintTick ---- paintTick.setText("PaintTicks"); paintTick.setMnemonic('T'); paintTick.setSelected(true); paintTick.addActionListener(e -> paintTicks()); - add(paintTick, "cell 0 3 2 1"); + add(paintTick, "cell 0 6 2 1"); //---- paintLabel ---- paintLabel.setText("PaintLabels"); paintLabel.setMnemonic('L'); paintLabel.setSelected(true); paintLabel.addActionListener(e -> paintLabels()); - add(paintLabel, "cell 0 3 2 1"); + add(paintLabel, "cell 0 6 2 1"); // JFormDesigner - End of component initialization //GEN-END:initComponents - - horizontalRangeSlider.setOrientation( SwingConstants.HORIZONTAL ); - horizontalRangeSlider.setMinimum( 0 ); - horizontalRangeSlider.setMaximum( 100 ); - horizontalRangeSlider.setLowValue( 10 ); - horizontalRangeSlider.setHighValue( 90 ); - horizontalRangeSlider.setLabelTable( horizontalRangeSlider.createStandardLabels( 10 ) ); - horizontalRangeSlider.setMinorTickSpacing( 5 ); - horizontalRangeSlider.setMajorTickSpacing( 10 ); - horizontalRangeSlider.setPaintTicks( true ); - horizontalRangeSlider.setPaintLabels( true ); - - verticalRangeSlider.setOrientation( SwingConstants.VERTICAL ); - verticalRangeSlider.setMinimum( 0 ); - verticalRangeSlider.setMaximum( 100 ); - verticalRangeSlider.setLowValue( 10 ); - verticalRangeSlider.setHighValue( 90 ); - verticalRangeSlider.setLabelTable( horizontalRangeSlider.createStandardLabels( 10 ) ); - verticalRangeSlider.setMinorTickSpacing( 5 ); - verticalRangeSlider.setMajorTickSpacing( 10 ); - verticalRangeSlider.setPaintTicks( true ); - verticalRangeSlider.setPaintLabels( true ); } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private RangeSlider horizontalRangeSlider; + private JSlider horizontalSlider; + private RangeSlider horizontalRangeSlider2; + private JSlider horizontalSlider2; private RangeSlider verticalRangeSlider; + private JSlider verticalSlider; + private RangeSlider verticalRangeSlider2; + private JSlider verticalSlider2; private JCheckBox paintTick; private JCheckBox paintLabel; // JFormDesigner - End of variables declaration //GEN-END:variables diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd index 2cef9f84..7cd55f14 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd @@ -8,8 +8,8 @@ new FormModel { } add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets dialog,hidemode 3" - "$columnConstraints": "[left][fill]" - "$rowConstraints": "[fill][center][grow,fill][]" + "$columnConstraints": "[left][240,left]" + "$rowConstraints": "[fill][center][][][][grow,fill][]" } ) { name: "this" add( new FormComponent( "javax.swing.JLabel" ) { @@ -26,26 +26,105 @@ new FormModel { } ) add( new FormComponent( "com.jidesoft.swing.RangeSlider" ) { name: "horizontalRangeSlider" + "lowValue": 30 + "highValue": 80 + "majorTickSpacing": 10 + "minorTickSpacing": 5 + "paintTicks": true + "paintLabels": true auxiliary() { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 1" + "value": "cell 1 1,growx" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "horizontalSlider" + "minorTickSpacing": 5 + "paintTicks": true + "majorTickSpacing": 10 + "paintLabels": true + "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 2,growx" + } ) + add( new FormComponent( "com.jidesoft.swing.RangeSlider" ) { + name: "horizontalRangeSlider2" + "lowValue": 30 + "highValue": 80 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 3,growx" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "horizontalSlider2" + "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4,growx" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "verticalLabel" "text": "Vertical" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2,aligny top,growy 0" + "value": "cell 0 5,aligny top,growy 0" } ) add( new FormComponent( "com.jidesoft.swing.RangeSlider" ) { name: "verticalRangeSlider" "orientation": 1 + "lowValue": 30 + "highValue": 80 + "majorTickSpacing": 10 + "minorTickSpacing": 5 + "paintTicks": true + "paintLabels": true auxiliary() { "JavaCodeGenerator.variableLocal": false } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 2,alignx left,growx 0" + "value": "cell 1 5,alignx left,growx 0" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "verticalSlider" + "minorTickSpacing": 5 + "paintTicks": true + "majorTickSpacing": 10 + "paintLabels": true + "orientation": 1 + "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 5" + } ) + add( new FormComponent( "com.jidesoft.swing.RangeSlider" ) { + name: "verticalRangeSlider2" + "orientation": 1 + "lowValue": 30 + "highValue": 80 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 5" + } ) + add( new FormComponent( "javax.swing.JSlider" ) { + name: "verticalSlider2" + "orientation": 1 + "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 5" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "paintTick" @@ -57,7 +136,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "paintTicks", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3 2 1" + "value": "cell 0 6 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "paintLabel" @@ -69,7 +148,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "paintLabels", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3 2 1" + "value": "cell 0 6 2 1" } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) diff --git a/flatlaf-testing/src/main/resources/META-INF/services/com.formdev.flatlaf.FlatDefaultsAddon b/flatlaf-testing/src/main/resources/META-INF/services/com.formdev.flatlaf.FlatDefaultsAddon index d0cccba9..b2b6b9dc 100644 --- a/flatlaf-testing/src/main/resources/META-INF/services/com.formdev.flatlaf.FlatDefaultsAddon +++ b/flatlaf-testing/src/main/resources/META-INF/services/com.formdev.flatlaf.FlatDefaultsAddon @@ -1 +1,2 @@ +com.formdev.flatlaf.testing.jideoss.FlatJideOssDefaultsTestAddon com.formdev.flatlaf.testing.swingx.FlatSwingXDefaultsTestAddon diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties new file mode 100644 index 00000000..31b74e10 --- /dev/null +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties @@ -0,0 +1,20 @@ +# +# Copyright 2020 FormDev Software GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#---- RangeSlider ---- + +Slider.hoverTrackColor=#44f +Slider.pressedTrackColor=#8f8 From 10b2a94c70d1e5ddfc34ba89a33b3d264672e26c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 17 Nov 2020 18:49:58 +0100 Subject: [PATCH 028/178] JIDE: RangeSlider: avoid that middle track is painted over first thumb --- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 84 +++++++++---------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index 3e2ccad5..41887f3b 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -163,23 +163,23 @@ public class FlatRangeSliderUI public void paint( Graphics g, JComponent c ) { FlatUIUtils.setRenderingHints( (Graphics2D) g ); - second = false; - super.paint( g, c ); - - Rectangle clip = g.getClipBounds(); - - firstThumbRect = new Rectangle( thumbRect ); - - second = true; +/*debug + g.setColor( Color.gray ); + g.drawRect( 0, 0, c.getWidth() - 1, c.getHeight() - 1 ); + g.setColor( Color.orange ); + g.drawRect( focusRect.x, focusRect.y, focusRect.width - 1, focusRect.height - 1 ); + g.setColor( Color.magenta ); + g.drawRect( contentRect.x, contentRect.y, contentRect.width - 1, contentRect.height - 1 ); + g.setColor( Color.blue ); + g.drawRect( trackRect.x, trackRect.y, trackRect.width - 1, trackRect.height - 1 ); + g.setColor( Color.red ); + g.drawRect( thumbRect.x, thumbRect.y, thumbRect.width - 1, thumbRect.height - 1 ); Point p = adjustThumbForHighValue(); - - if( clip.intersects( thumbRect ) ) { - paintTrack( g ); - paintThumb( g ); - } - + g.drawRect( thumbRect.x, thumbRect.y, thumbRect.width - 1, thumbRect.height - 1 ); restoreThumbForLowValue( p ); - second = false; +debug*/ + + super.paint( g, c ); } @Override @@ -193,44 +193,41 @@ public class FlatRangeSliderUI float tw = UIScale.scale( (float) trackWidth ); float arc = tw; + // get rectangle of second thumb + Point p = adjustThumbForHighValue(); + Rectangle thumbRect2 = new Rectangle( thumbRect ); + restoreThumbForLowValue( p ); + RoundRectangle2D coloredTrack = null; RoundRectangle2D track; if( slider.getOrientation() == JSlider.HORIZONTAL ) { float y = trackRect.y + (trackRect.height - tw) / 2f; if( enabled ) { - if( slider.getComponentOrientation().isLeftToRight() ) { - int cw = thumbRect.x + (thumbRect.width / 2) - trackRect.x; - if( second ) { - track = new RoundRectangle2D.Float( trackRect.x + cw, y, trackRect.width - cw, tw, arc, arc ); - int firstCw = firstThumbRect.x + (firstThumbRect.width / 2) - trackRect.x; - coloredTrack = new RoundRectangle2D.Float( trackRect.x + firstCw, y, cw - firstCw, tw, arc, arc ); - } else - track = new RoundRectangle2D.Float( trackRect.x, y, cw, tw, arc, arc ); - } else { - int cw = trackRect.x + trackRect.width - thumbRect.x - (thumbRect.width / 2); - if( second ) { - int firstCw = trackRect.x + trackRect.width - firstThumbRect.x - (firstThumbRect.width / 2); - track = new RoundRectangle2D.Float( trackRect.x, y, trackRect.width - cw, tw, arc, arc ); - coloredTrack = new RoundRectangle2D.Float( trackRect.x + trackRect.width - cw, y, cw - firstCw, tw, arc, arc ); - } else - track = new RoundRectangle2D.Float( trackRect.x + trackRect.width - cw, y, cw, tw, arc, arc ); + Rectangle thumbRect1 = thumbRect; + if( !slider.getComponentOrientation().isLeftToRight() ) { + Rectangle temp = thumbRect1; + thumbRect1 = thumbRect2; + thumbRect2 = temp; } - } else - track = new RoundRectangle2D.Float( trackRect.x, y, trackRect.width, tw, arc, arc ); + + int cx = thumbRect1.x + (thumbRect1.width / 2); + int cw = thumbRect2.x - thumbRect1.x; + coloredTrack = new RoundRectangle2D.Float( cx, y, cw, tw, arc, arc ); + } + track = new RoundRectangle2D.Float( trackRect.x, y, trackRect.width, tw, arc, arc ); } else { float x = trackRect.x + (trackRect.width - tw) / 2f; if( enabled ) { - int ch = thumbRect.y + (thumbRect.height / 2) - trackRect.y; - if( second ) { - int firstCh = firstThumbRect.y + (firstThumbRect.height / 2) - trackRect.y; - track = new RoundRectangle2D.Float( x, trackRect.y, tw, ch, arc, arc ); - coloredTrack = new RoundRectangle2D.Float( x, trackRect.y + ch, tw, firstCh - ch, arc, arc ); - } else - track = new RoundRectangle2D.Float( x, trackRect.y + ch, tw, trackRect.height - ch, arc, arc ); - } else - track = new RoundRectangle2D.Float( x, trackRect.y, tw, trackRect.height, arc, arc ); + int cy = thumbRect2.y + (thumbRect2.height / 2); + int ch = thumbRect.y - thumbRect2.y; + coloredTrack = new RoundRectangle2D.Float( x, cy, tw, ch, arc, arc ); + } + track = new RoundRectangle2D.Float( x, trackRect.y, tw, trackRect.height, arc, arc ); } + g.setColor( enabled ? trackColor : disabledTrackColor ); + ((Graphics2D)g).fill( track ); + if( coloredTrack != null ) { boolean trackHover = hover && rollover1 && rollover2; boolean trackPressed = pressed1 && pressed2; @@ -241,9 +238,6 @@ public class FlatRangeSliderUI g.setColor( FlatUIUtils.deriveColor( color, thumbColor ) ); ((Graphics2D)g).fill( coloredTrack ); } - - g.setColor( enabled ? trackColor : disabledTrackColor ); - ((Graphics2D)g).fill( track ); } @Override From 413b60e6301cf18cd92e25370c3bdac3114fd3c8 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 18 Nov 2020 11:38:29 +0100 Subject: [PATCH 029/178] Slider: - changed default color to bluish - made track thinner (2px, was 3px) - made thumb larger (12px, was 11px) - added thumb outline focus indicator (4px wide) - slider component height increased from 11px to 20px - support painting thumb border - support different colors for thumb background and colored track --- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 131 +++++++++++++++--- .../formdev/flatlaf/FlatDarkLaf.properties | 4 +- .../com/formdev/flatlaf/FlatLaf.properties | 5 +- .../formdev/flatlaf/FlatLightLaf.properties | 4 +- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 38 +++-- .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 13 +- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 13 +- .../uidefaults/FlatTestLaf_1.8.0_202.txt | 10 +- .../flatlaf/testing/FlatTestLaf.properties | 5 +- .../flatlaf/themeeditor/FlatLafUIKeys.txt | 3 + 10 files changed, 179 insertions(+), 47 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index d5323d11..25901e4f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -21,7 +21,9 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; +import java.awt.Shape; import java.awt.event.MouseEvent; +import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; import java.awt.geom.RoundRectangle2D; import javax.swing.JComponent; @@ -51,13 +53,18 @@ import com.formdev.flatlaf.util.UIScale; * * @uiDefault Slider.trackWidth int * @uiDefault Slider.thumbWidth int + * @uiDefault Slider.focusWidth int + * @uiDefault Slider.trackValueColor Color optional; defaults to Slider.thumbColor * @uiDefault Slider.trackColor Color * @uiDefault Slider.thumbColor Color + * @uiDefault Slider.thumbBorderColor Color optional; if null, no border is painted * @uiDefault Slider.focusedColor Color optional; defaults to Component.focusColor + * @uiDefault Slider.focusedThumbBorderColor Color optional; defaults to Component.focusedBorderColor * @uiDefault Slider.hoverThumbColor Color optional * @uiDefault Slider.pressedThumbColor Color optional * @uiDefault Slider.disabledTrackColor Color * @uiDefault Slider.disabledThumbColor Color + * @uiDefault Slider.disabledThumbBorderColor Color optional; defaults to Component.disabledBorderColor * * @author Karl Tauber */ @@ -66,14 +73,19 @@ public class FlatSliderUI { protected int trackWidth; protected int thumbWidth; + protected int focusWidth; + protected Color trackValueColor; protected Color trackColor; protected Color thumbColor; - protected Color focusColor; + protected Color thumbBorderColor; + protected Color focusedColor; + protected Color focusedThumbBorderColor; protected Color hoverThumbColor; protected Color pressedThumbColor; protected Color disabledTrackColor; protected Color disabledThumbColor; + protected Color disabledThumbBorderColor; protected boolean thumbHover; protected boolean thumbPressed; @@ -94,27 +106,36 @@ public class FlatSliderUI trackWidth = UIManager.getInt( "Slider.trackWidth" ); thumbWidth = UIManager.getInt( "Slider.thumbWidth" ); + focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 ); + trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" ); trackColor = UIManager.getColor( "Slider.trackColor" ); thumbColor = UIManager.getColor( "Slider.thumbColor" ); - focusColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); + thumbBorderColor = UIManager.getColor( "Slider.thumbBorderColor" ); + focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); + focusedThumbBorderColor = FlatUIUtils.getUIColor( "Slider.focusedThumbBorderColor", "Component.focusedBorderColor" ); hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" ); pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" ); disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" ); disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" ); + disabledThumbBorderColor = FlatUIUtils.getUIColor( "Slider.disabledThumbBorderColor", "Component.disabledBorderColor" ); } @Override protected void uninstallDefaults( JSlider slider ) { super.uninstallDefaults( slider ); + trackValueColor = null; trackColor = null; thumbColor = null; - focusColor = null; + thumbBorderColor = null; + focusedColor = null; + focusedThumbBorderColor = null; hoverThumbColor = null; pressedThumbColor = null; disabledTrackColor = null; disabledThumbColor = null; + disabledThumbBorderColor = null; } @Override @@ -149,13 +170,28 @@ public class FlatSliderUI @Override protected Dimension getThumbSize() { - return new Dimension( UIScale.scale( thumbWidth ), UIScale.scale( thumbWidth ) ); + int fw = UIScale.scale( focusWidth ); + int w = UIScale.scale( thumbWidth ) + fw + fw; + return new Dimension( w, w ); } @Override public void paint( Graphics g, JComponent c ) { FlatUIUtils.setRenderingHints( (Graphics2D) g ); +/*debug + g.setColor( Color.gray ); + g.drawRect( 0, 0, c.getWidth() - 1, c.getHeight() - 1 ); + g.setColor( Color.orange ); + g.drawRect( focusRect.x, focusRect.y, focusRect.width - 1, focusRect.height - 1 ); + g.setColor( Color.magenta ); + g.drawRect( contentRect.x, contentRect.y, contentRect.width - 1, contentRect.height - 1 ); + g.setColor( Color.blue ); + g.drawRect( trackRect.x, trackRect.y, trackRect.width - 1, trackRect.height - 1 ); + g.setColor( Color.red ); + g.drawRect( thumbRect.x, thumbRect.y, thumbRect.width - 1, thumbRect.height - 1 ); +debug*/ + super.paint( g, c ); } @@ -197,7 +233,7 @@ public class FlatSliderUI } if( coloredTrack != null ) { - g.setColor( thumbColor ); + g.setColor( trackValueColor ); ((Graphics2D)g).fill( coloredTrack ); } @@ -208,26 +244,49 @@ public class FlatSliderUI @Override public void paintThumb( Graphics g ) { Color color = stateColor( slider, thumbHover, thumbPressed, - thumbColor, disabledThumbColor, focusColor, hoverThumbColor, pressedThumbColor ); + thumbColor, disabledThumbColor, null, hoverThumbColor, pressedThumbColor ); color = FlatUIUtils.deriveColor( color, thumbColor ); - paintThumb( g, slider, thumbRect, isRoundThumb(), color ); + Color borderColor = (thumbBorderColor != null) + ? stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null ) + : null; + + paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); } public static void paintThumb( Graphics g, JSlider slider, Rectangle thumbRect, boolean roundThumb, - Color thumbColor ) + Color thumbColor, Color thumbBorderColor, Color focusedColor, int focusWidth ) { - g.setColor( thumbColor ); + int fw = UIScale.scale( focusWidth ); + int x = thumbRect.x + fw; + int y = thumbRect.y + fw; + int width = thumbRect.width - fw - fw; + int height = thumbRect.height - fw - fw; + boolean focused = FlatUIUtils.isPermanentFocusOwner( slider ); - if( roundThumb ) - g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); - else { - double w = thumbRect.width; - double h = thumbRect.height; - double wh = w / 2; + if( roundThumb ) { + // paint thumb focus border + if( focused ) { + g.setColor( focusedColor ); + g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); + } - Path2D thumb = FlatUIUtils.createPath( 0,0, w,0, w,(h - wh), wh,h, 0,(h - wh) ); + if( thumbBorderColor != null ) { + // paint thumb border + g.setColor( thumbBorderColor ); + g.fillOval( x, y, width, height ); + // paint thumb background + float lw = UIScale.scale( 1f ); + g.setColor( thumbColor ); + ((Graphics2D)g).fill( new Ellipse2D.Float( x + lw, y + lw, + width - lw - lw, height - lw - lw ) ); + } else { + // paint thumb background + g.setColor( thumbColor ); + g.fillOval( x, y, width, height ); + } + } else { Graphics2D g2 = (Graphics2D) g.create(); try { g2.translate( thumbRect.x, thumbRect.y ); @@ -240,13 +299,51 @@ public class FlatSliderUI g2.rotate( Math.toRadians( 90 ) ); } } - g2.fill( thumb ); + + // paint thumb focus border + if( focused ) { + g2.setColor( focusedColor ); + g2.fill( createDirectionalThumbShape( 0, 0, + thumbRect.width, thumbRect.height + (fw * 0.4142f), fw ) ); + } + + if( thumbBorderColor != null ) { + // paint thumb border + g2.setColor( thumbBorderColor ); + g2.fill( createDirectionalThumbShape( fw, fw, width, height, 0 ) ); + + // paint thumb background + float lw = UIScale.scale( 1f ); + g2.setColor( thumbColor ); + g2.fill( createDirectionalThumbShape( fw + lw, fw + lw, + width - lw - lw, height - lw - lw - (lw * 0.4142f), 0 ) ); + } else { + // paint thumb background + g2.setColor( thumbColor ); + g2.fill( createDirectionalThumbShape( fw, fw, width, height, 0 ) ); + } } finally { g2.dispose(); } } } + public static Shape createDirectionalThumbShape( double x, double y, double w, double h, double arc ) { + double wh = w / 2; + + Path2D path = new Path2D.Float(); + path.moveTo( x + wh, y + h ); + path.lineTo( x, y + (h - wh) ); + path.lineTo( x, y + arc ); + path.quadTo( x, y, x + arc, y ); + path.lineTo( x + (w - arc), y ); + path.quadTo( x + w, y, x + w, y + arc ); + path.lineTo( x + w, y + (h - wh) ); + path.closePath(); + + return path; + } + public static Color stateColor( JSlider slider, boolean hover, boolean pressed, Color enabledColor, Color disabledColor, Color focusedColor, Color hoverColor, Color pressedColor ) { diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 83a89615..783f79ab 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -237,9 +237,11 @@ Separator.foreground=#515151 #---- Slider ---- +Slider.trackValueColor=#4A88C7 Slider.trackColor=#646464 -Slider.thumbColor=#A6A6A6 +Slider.thumbColor=$Slider.trackValueColor Slider.tickColor=#888 +Slider.focusedColor=rgba($Component.focusColor,80%) Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived) Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived) Slider.disabledTrackColor=#4c5052 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 0b94527b..d4597965 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -506,8 +506,9 @@ Separator.stripeIndent=1 #---- Slider ---- Slider.focusInsets=0,0,0,0 -Slider.trackWidth=3 -Slider.thumbWidth=11 +Slider.trackWidth=2 +Slider.thumbWidth=12 +Slider.focusWidth=4 #---- Spinner ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 7d96b7e2..5ad1e7b2 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -249,9 +249,11 @@ Separator.foreground=#d1d1d1 #---- Slider ---- +Slider.trackValueColor=#1E82E6 Slider.trackColor=#c4c4c4 -Slider.thumbColor=#6e6e6e +Slider.thumbColor=$Slider.trackValueColor Slider.tickColor=#888 +Slider.focusedColor=rgba($Component.focusColor,50%) Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived) Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived) Slider.disabledTrackColor=#c0c0c0 diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index 41887f3b..9bbd1c36 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -43,18 +43,21 @@ public class FlatRangeSliderUI { protected int trackWidth; protected int thumbWidth; + protected int focusWidth; + protected Color trackValueColor; protected Color trackColor; protected Color thumbColor; - protected Color focusColor; + protected Color thumbBorderColor; + protected Color focusedColor; + protected Color focusedThumbBorderColor; protected Color hoverTrackColor; protected Color hoverThumbColor; protected Color pressedTrackColor; protected Color pressedThumbColor; protected Color disabledTrackColor; protected Color disabledThumbColor; - - private Rectangle firstThumbRect; + protected Color disabledThumbBorderColor; public static ComponentUI createUI( JComponent c ) { return new FlatRangeSliderUI(); @@ -102,31 +105,40 @@ public class FlatRangeSliderUI trackWidth = UIManager.getInt( "Slider.trackWidth" ); thumbWidth = UIManager.getInt( "Slider.thumbWidth" ); + focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 ); + trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" ); trackColor = UIManager.getColor( "Slider.trackColor" ); thumbColor = UIManager.getColor( "Slider.thumbColor" ); - focusColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); + thumbBorderColor = UIManager.getColor( "Slider.thumbBorderColor" ); + focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); + focusedThumbBorderColor = FlatUIUtils.getUIColor( "Slider.focusedThumbBorderColor", "Component.focusedBorderColor" ); hoverTrackColor = FlatUIUtils.getUIColor( "Slider.hoverTrackColor", "Slider.hoverThumbColor" ); hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" ); pressedTrackColor = FlatUIUtils.getUIColor( "Slider.pressedTrackColor", "Slider.pressedThumbColor" ); pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" ); disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" ); disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" ); + disabledThumbBorderColor = FlatUIUtils.getUIColor( "Slider.disabledThumbBorderColor", "Component.disabledBorderColor" ); } @Override protected void uninstallDefaults( JSlider slider ) { super.uninstallDefaults( slider ); + trackValueColor = null; trackColor = null; thumbColor = null; - focusColor = null; + thumbBorderColor = null; + focusedColor = null; + focusedThumbBorderColor = null; hoverTrackColor = null; hoverThumbColor = null; pressedTrackColor = null; pressedThumbColor = null; disabledTrackColor = null; disabledThumbColor = null; + disabledThumbBorderColor = null; } @Override @@ -156,7 +168,9 @@ public class FlatRangeSliderUI @Override protected Dimension getThumbSize() { - return new Dimension( UIScale.scale( thumbWidth ), UIScale.scale( thumbWidth ) ); + int fw = UIScale.scale( focusWidth ); + int w = UIScale.scale( thumbWidth ) + fw + fw; + return new Dimension( w, w ); } @Override @@ -233,9 +247,9 @@ debug*/ boolean trackPressed = pressed1 && pressed2; Color color = FlatSliderUI.stateColor( slider, trackHover, trackPressed, - thumbColor, null, null, hoverTrackColor, pressedTrackColor ); + trackValueColor, null, null, hoverTrackColor, pressedTrackColor ); - g.setColor( FlatUIUtils.deriveColor( color, thumbColor ) ); + g.setColor( FlatUIUtils.deriveColor( color, trackValueColor ) ); ((Graphics2D)g).fill( coloredTrack ); } } @@ -246,10 +260,14 @@ debug*/ boolean thumbPressed = (!second && pressed1) || (second && pressed2); Color color = FlatSliderUI.stateColor( slider, thumbHover, thumbPressed, - thumbColor, disabledThumbColor, focusColor, hoverThumbColor, pressedThumbColor ); + thumbColor, disabledThumbColor, null, hoverThumbColor, pressedThumbColor ); color = FlatUIUtils.deriveColor( color, thumbColor ); - FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color ); + Color borderColor = (thumbBorderColor != null) + ? FlatSliderUI.stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null ) + : null; + + FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); } protected boolean isRoundThumb() { diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 6dbe410b..555a57b8 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -845,21 +845,24 @@ Slider.disabledThumbColor #4c5052 javax.swing.plaf.ColorUIResource [UI] Slider.disabledTrackColor #4c5052 javax.swing.plaf.ColorUIResource [UI] Slider.focus #7e7e7e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] +Slider.focusWidth 4 +Slider.focusedColor #cc3d6185 javax.swing.plaf.ColorUIResource [UI] Slider.font [active] $defaultFont [UI] Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI] Slider.horizontalSize 200,21 java.awt.Dimension -Slider.hoverThumbColor #8d8d8d com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) +Slider.hoverThumbColor #346faa com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) Slider.minimumHorizontalSize 36,21 java.awt.Dimension Slider.minimumVerticalSize 21,36 java.awt.Dimension Slider.onlyLeftMouseButtonDrag true -Slider.pressedThumbColor #808080 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse) +Slider.pressedThumbColor #2e6296 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse) Slider.shadow #646464 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbWidth 11 +Slider.thumbColor #4a88c7 javax.swing.plaf.ColorUIResource [UI] +Slider.thumbWidth 12 Slider.tickColor #888888 javax.swing.plaf.ColorUIResource [UI] Slider.trackColor #646464 javax.swing.plaf.ColorUIResource [UI] -Slider.trackWidth 3 +Slider.trackValueColor #4a88c7 javax.swing.plaf.ColorUIResource [UI] +Slider.trackWidth 2 Slider.verticalSize 21,200 java.awt.Dimension SliderUI com.formdev.flatlaf.ui.FlatSliderUI diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 526ebb03..70bb803a 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -850,21 +850,24 @@ Slider.disabledThumbColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI] Slider.disabledTrackColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI] Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] +Slider.focusWidth 4 +Slider.focusedColor #7f97c3f3 javax.swing.plaf.ColorUIResource [UI] Slider.font [active] $defaultFont [UI] Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI] Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] Slider.horizontalSize 200,21 java.awt.Dimension -Slider.hoverThumbColor #888888 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse) +Slider.hoverThumbColor #1569bc com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse) Slider.minimumHorizontalSize 36,21 java.awt.Dimension Slider.minimumVerticalSize 21,36 java.awt.Dimension Slider.onlyLeftMouseButtonDrag true -Slider.pressedThumbColor #949494 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse) +Slider.pressedThumbColor #125ca5 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse) Slider.shadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbColor #6e6e6e javax.swing.plaf.ColorUIResource [UI] -Slider.thumbWidth 11 +Slider.thumbColor #1e82e6 javax.swing.plaf.ColorUIResource [UI] +Slider.thumbWidth 12 Slider.tickColor #888888 javax.swing.plaf.ColorUIResource [UI] Slider.trackColor #c4c4c4 javax.swing.plaf.ColorUIResource [UI] -Slider.trackWidth 3 +Slider.trackValueColor #1e82e6 javax.swing.plaf.ColorUIResource [UI] +Slider.trackWidth 2 Slider.verticalSize 21,200 java.awt.Dimension SliderUI com.formdev.flatlaf.ui.FlatSliderUI diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index d656b7f1..c816d1a4 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -837,6 +837,7 @@ Slider.disabledThumbColor #888800 javax.swing.plaf.ColorUIResource [UI] Slider.disabledTrackColor #ffff88 javax.swing.plaf.ColorUIResource [UI] Slider.focus #696969 javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] +Slider.focusWidth 4 Slider.focusedColor #97c3f3 javax.swing.plaf.ColorUIResource [UI] Slider.font [active] $defaultFont [UI] Slider.foreground #ff0000 javax.swing.plaf.ColorUIResource [UI] @@ -850,11 +851,12 @@ Slider.onlyLeftMouseButtonDrag true Slider.pressedThumbColor #00ff00 javax.swing.plaf.ColorUIResource [UI] Slider.pressedTrackColor #88ff88 javax.swing.plaf.ColorUIResource [UI] Slider.shadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbColor #880000 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbWidth 11 +Slider.thumbBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +Slider.thumbColor #ffaaaa javax.swing.plaf.ColorUIResource [UI] +Slider.thumbWidth 12 Slider.tickColor #ff0000 javax.swing.plaf.ColorUIResource [UI] -Slider.trackColor #00bb00 javax.swing.plaf.ColorUIResource [UI] -Slider.trackWidth 3 +Slider.trackColor #88ff88 javax.swing.plaf.ColorUIResource [UI] +Slider.trackWidth 2 Slider.verticalSize 21,200 java.awt.Dimension SliderUI com.formdev.flatlaf.ui.FlatSliderUI diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index 33437c7c..477c8ee9 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -257,8 +257,9 @@ Separator.stripeIndent=5 #---- Slider ---- -Slider.trackColor=#0b0 -Slider.thumbColor=#800 +Slider.trackColor=#8f8 +Slider.thumbColor=#faa +Slider.thumbBorderColor=#f00 Slider.tickColor=#f00 Slider.focusedColor=$Component.focusColor Slider.hoverThumbColor=#00f 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 4dc094fb..87b6b4ff 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 @@ -587,6 +587,8 @@ Slider.focus Slider.focusInputMap Slider.focusInputMap.RightToLeft Slider.focusInsets +Slider.focusWidth +Slider.focusedColor Slider.font Slider.foreground Slider.highlight @@ -601,6 +603,7 @@ Slider.thumbColor Slider.thumbWidth Slider.tickColor Slider.trackColor +Slider.trackValueColor Slider.trackWidth Slider.verticalSize SliderUI From 8b8ed0b9ff0e67bead982c387c56449008dc3a99 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 18 Nov 2020 18:26:30 +0100 Subject: [PATCH 030/178] Slider: - compute useful baseline for horizontal orientation so that the track is vertically centered - no baseline for vertical orientation --- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 17 +++++++++++++++++ .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 25901e4f..bc503667 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.ui; import java.awt.Color; import java.awt.Dimension; +import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; @@ -143,6 +144,22 @@ public class FlatSliderUI return new FlatTrackListener(); } + @Override + public int getBaseline( JComponent c, int width, int height ) { + if( c == null ) + throw new NullPointerException(); + if( width < 0 || height < 0 ) + throw new IllegalArgumentException(); + + // no baseline for vertical orientation + if( slider.getOrientation() == JSlider.VERTICAL ) + return -1; + + // compute a baseline so that the track is vertically centered + FontMetrics fm = slider.getFontMetrics( slider.getFont() ); + return trackRect.y + Math.round( (trackRect.height - fm.getHeight()) / 2f ) + fm.getAscent() - 1; + } + @Override public Dimension getPreferredHorizontalSize() { return UIScale.scale( super.getPreferredHorizontalSize() ); diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index 9bbd1c36..34c7a6d1 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.jideoss.ui; import java.awt.Color; import java.awt.Dimension; +import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; @@ -141,6 +142,22 @@ public class FlatRangeSliderUI disabledThumbBorderColor = null; } + @Override + public int getBaseline( JComponent c, int width, int height ) { + if( c == null ) + throw new NullPointerException(); + if( width < 0 || height < 0 ) + throw new IllegalArgumentException(); + + // no baseline for vertical orientation + if( slider.getOrientation() == JSlider.VERTICAL ) + return -1; + + // compute a baseline so that the track is vertically centered + FontMetrics fm = slider.getFontMetrics( slider.getFont() ); + return trackRect.y + Math.round( (trackRect.height - fm.getHeight()) / 2f ) + fm.getAscent() - 1; + } + @Override public Dimension getPreferredHorizontalSize() { return UIScale.scale( super.getPreferredHorizontalSize() ); From 0101171159c79b318a51ca974c13c80101c67d8c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 19 Nov 2020 11:31:38 +0100 Subject: [PATCH 031/178] UIDefaultsLoader: added fadein(), fadeout(), fade() and spin() color functions (inspired by Less CSS) --- .../com/formdev/flatlaf/UIDefaultsLoader.java | 64 ++++++++++++++++++- .../formdev/flatlaf/util/ColorFunctions.java | 52 +++++++++++---- .../formdev/flatlaf/FlatDarkLaf.properties | 2 +- .../com/formdev/flatlaf/FlatLaf.properties | 2 +- .../formdev/flatlaf/FlatLightLaf.properties | 2 +- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 2 +- .../testing/uidefaults/UIDefaultsDump.java | 8 ++- .../themeeditor/FlatCompletionProvider.java | 14 +++- .../theme-editor-test.properties | 9 +++ 9 files changed, 135 insertions(+), 20 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java index adc6e177..6a009b73 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java @@ -586,13 +586,17 @@ class UIDefaultsLoader case "darken": return parseColorHSLIncreaseDecrease( 2, false, params, resolver, reportError ); case "saturate": return parseColorHSLIncreaseDecrease( 1, true, params, resolver, reportError ); case "desaturate": return parseColorHSLIncreaseDecrease( 1, false, params, resolver, reportError ); + case "fadein": return parseColorHSLIncreaseDecrease( 3, true, params, resolver, reportError ); + case "fadeout": return parseColorHSLIncreaseDecrease( 3, false, params, resolver, reportError ); + case "fade": return parseColorFade( params, resolver, reportError ); + case "spin": return parseColorSpin( params, resolver, reportError ); } throw new IllegalArgumentException( "unknown color function '" + value + "'" ); } /** - * Syntax: rgb(red,green,blue) or rgba(red,green,blue,alpha) or rgba(color,alpha) + * Syntax: rgb(red,green,blue) or rgba(red,green,blue,alpha) * - red: an integer 0-255 or a percentage 0-100% * - green: an integer 0-255 or a percentage 0-100% * - blue: an integer 0-255 or a percentage 0-100% @@ -603,6 +607,8 @@ class UIDefaultsLoader { if( hasAlpha && params.size() == 2 ) { // syntax rgba(color,alpha), which allows adding alpha to any color + // NOTE: this syntax is deprecated + // use fade(color,alpha) instead String colorStr = params.get( 0 ); int alpha = parseInteger( params.get( 1 ), 0, 255, true ); @@ -639,7 +645,8 @@ class UIDefaultsLoader /** * Syntax: lighten(color,amount[,options]) or darken(color,amount[,options]) or - * saturate(color,amount[,options]) or desaturate(color,amount[,options]) + * saturate(color,amount[,options]) or desaturate(color,amount[,options]) or + * fadein(color,amount[,options]) or fadeout(color,amount[,options]) * - color: a color (e.g. #f00) or a color function * - amount: percentage 0-100% * - options: [relative] [autoInverse] [noAutoInverse] [lazy] [derived] @@ -679,6 +686,59 @@ class UIDefaultsLoader }; } + // parse base color, apply function and create derived color + return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError ); + } + + /** + * Syntax: fade(color,amount[,options]) + * - color: a color (e.g. #f00) or a color function + * - amount: percentage 0-100% + * - options: [derived] + */ + private static Object parseColorFade( List params, Function resolver, boolean reportError ) { + String colorStr = params.get( 0 ); + int amount = parsePercentage( params.get( 1 ) ); + boolean derived = false; + + if( params.size() > 2 ) { + String options = params.get( 2 ); + derived = options.contains( "derived" ); + } + + // create function + ColorFunction function = new ColorFunctions.Fade( amount ); + + // parse base color, apply function and create derived color + return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError ); + } + + /** + * Syntax: spin(color,angle[,options]) + * - color: a color (e.g. #f00) or a color function + * - angle: number of degrees to rotate + * - options: [derived] + */ + private static Object parseColorSpin( List params, Function resolver, boolean reportError ) { + String colorStr = params.get( 0 ); + int amount = parseInteger( params.get( 1 ), true ); + boolean derived = false; + + if( params.size() > 2 ) { + String options = params.get( 2 ); + derived = options.contains( "derived" ); + } + + // create function + ColorFunction function = new ColorFunctions.HSLIncreaseDecrease( 0, true, amount, false, false ); + + // parse base color, apply function and create derived color + return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError ); + } + + private static Object parseFunctionBaseColor( String colorStr, ColorFunction function, + boolean derived, Function resolver, boolean reportError ) + { // parse base color String resolvedColorStr = resolver.apply( colorStr ); ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolvedColorStr, resolver, reportError ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java index 471dd7c0..4996ba75 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java @@ -28,11 +28,12 @@ public class ColorFunctions public static Color applyFunctions( Color color, ColorFunction... functions ) { float[] hsl = HSLColor.fromRGB( color ); float alpha = color.getAlpha() / 255f; + float[] hsla = { hsl[0], hsl[1], hsl[2], alpha * 100 }; for( ColorFunction function : functions ) - function.apply( hsl ); + function.apply( hsla ); - return HSLColor.toRGB( hsl, alpha ); + return HSLColor.toRGB( hsla[0], hsla[1], hsla[2], hsla[3] / 100 ); } public static float clamp( float value ) { @@ -46,13 +47,13 @@ public class ColorFunctions //---- interface ColorFunction -------------------------------------------- public interface ColorFunction { - void apply( float[] hsl ); + void apply( float[] hsla ); } //---- class HSLIncreaseDecrease ------------------------------------------ /** - * Increase or decrease hue, saturation or luminance of a color in the HSL color space + * Increase or decrease hue, saturation, luminance or alpha of a color in the HSL color space * by an absolute or relative amount. */ public static class HSLIncreaseDecrease @@ -75,18 +76,45 @@ public class ColorFunctions } @Override - public void apply( float[] hsl ) { + public void apply( float[] hsla ) { float amount2 = increase ? amount : -amount; - amount2 = autoInverse && shouldInverse( hsl ) ? -amount2 : amount2; - hsl[hslIndex] = clamp( relative - ? (hsl[hslIndex] * ((100 + amount2) / 100)) - : (hsl[hslIndex] + amount2) ); + + if( hslIndex == 0 ) { + // hue is range 0-360 + hsla[0] = (hsla[0] + amount2) % 360; + return; + } + + amount2 = autoInverse && shouldInverse( hsla ) ? -amount2 : amount2; + hsla[hslIndex] = clamp( relative + ? (hsla[hslIndex] * ((100 + amount2) / 100)) + : (hsla[hslIndex] + amount2) ); } - protected boolean shouldInverse( float[] hsl ) { + protected boolean shouldInverse( float[] hsla ) { return increase - ? hsl[hslIndex] >= 50 - : hsl[hslIndex] < 50; + ? hsla[hslIndex] >= 50 + : hsla[hslIndex] < 50; + } + } + + //---- class HSLIncreaseDecrease ------------------------------------------ + + /** + * Set the alpha of a color. + */ + public static class Fade + implements ColorFunction + { + public final float amount; + + public Fade( float amount ) { + this.amount = amount; + } + + @Override + public void apply( float[] hsla ) { + hsla[3] = clamp( amount ); } } } diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 783f79ab..f3e13263 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -241,7 +241,7 @@ Slider.trackValueColor=#4A88C7 Slider.trackColor=#646464 Slider.thumbColor=$Slider.trackValueColor Slider.tickColor=#888 -Slider.focusedColor=rgba($Component.focusColor,80%) +Slider.focusedColor=fade($Component.focusColor,80%) Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived) Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived) Slider.disabledTrackColor=#4c5052 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 d4597965..dbf91b85 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -682,7 +682,7 @@ TitlePane.foreground=@foreground TitlePane.inactiveForeground=@disabledText TitlePane.closeHoverBackground=#e81123 -TitlePane.closePressedBackground=rgba($TitlePane.closeHoverBackground,60%) +TitlePane.closePressedBackground=fade($TitlePane.closeHoverBackground,60%) TitlePane.closeHoverForeground=#fff TitlePane.closePressedForeground=#fff diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 5ad1e7b2..6d57c99d 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -253,7 +253,7 @@ Slider.trackValueColor=#1E82E6 Slider.trackColor=#c4c4c4 Slider.thumbColor=$Slider.trackValueColor Slider.tickColor=#888 -Slider.focusedColor=rgba($Component.focusColor,50%) +Slider.focusedColor=fade($Component.focusColor,50%) Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived) Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived) Slider.disabledTrackColor=#c0c0c0 diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 70bb803a..dc533773 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -851,7 +851,7 @@ Slider.disabledTrackColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI] Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] Slider.focusWidth 4 -Slider.focusedColor #7f97c3f3 javax.swing.plaf.ColorUIResource [UI] +Slider.focusedColor #8097c3f3 javax.swing.plaf.ColorUIResource [UI] Slider.font [active] $defaultFont [UI] Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI] Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java index ac36c871..d29490a5 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java @@ -64,6 +64,7 @@ import com.formdev.flatlaf.intellijthemes.FlatAllIJThemes; import com.formdev.flatlaf.testing.FlatTestLaf; import com.formdev.flatlaf.ui.FlatLineBorder; import com.formdev.flatlaf.util.ColorFunctions.ColorFunction; +import com.formdev.flatlaf.util.ColorFunctions.Fade; import com.formdev.flatlaf.util.ColorFunctions.HSLIncreaseDecrease; import com.formdev.flatlaf.util.DerivedColor; import com.formdev.flatlaf.util.StringUtils; @@ -399,13 +400,18 @@ public class UIDefaultsDump HSLIncreaseDecrease func = (HSLIncreaseDecrease) function; String name; switch( func.hslIndex ) { - case 2: name = func.increase ? "lighten" : "darken"; break; + case 0: name = "spin"; break; case 1: name = func.increase ? "saturate" : "desaturate"; break; + case 2: name = func.increase ? "lighten" : "darken"; break; + case 3: name = func.increase ? "fadein" : "fadeout"; break; default: throw new IllegalArgumentException(); } out.printf( "%s(%.0f%%%s%s)", name, func.amount, (func.relative ? " relative" : ""), (func.autoInverse ? " autoInverse" : "") ); + } else if( function instanceof Fade ) { + Fade func = (Fade) function; + out.printf( "fade(%.0f%%)", func.amount ); } else throw new IllegalArgumentException( "unknown color function: " + function ); } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatCompletionProvider.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatCompletionProvider.java index e709bc28..c26f9bde 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatCompletionProvider.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatCompletionProvider.java @@ -336,8 +336,9 @@ class FlatCompletionProvider "lightness", "0-100%", "alpha", "0-100%" ); + String colorParamDesc = "a color (e.g. #f00), a reference (e.g. $Other.key) or a color function"; String[] hslIncreaseDecreaseParams = { - "color", "a color (e.g. #f00), a reference (e.g. $Other.key) or a color function", + "color", colorParamDesc, "amount", "0-100%", "options", "(optional) [relative] [autoInverse] [noAutoInverse] [lazy] [derived]" }; @@ -345,6 +346,17 @@ class FlatCompletionProvider addFunction( "darken", hslIncreaseDecreaseParams ); addFunction( "saturate", hslIncreaseDecreaseParams ); addFunction( "desaturate", hslIncreaseDecreaseParams ); + addFunction( "fadein", hslIncreaseDecreaseParams ); + addFunction( "fadeout", hslIncreaseDecreaseParams ); + + addFunction( "fade", + "color", colorParamDesc, + "amount", "0-100%", + "options", "(optional) [derived]" ); + addFunction( "spin", + "color", colorParamDesc, + "angle", "number of degrees to rotate", + "options", "(optional) [derived]" ); } private void addFunction( String name, String... paramNamesAndDescs ) { diff --git a/flatlaf-theme-editor/theme-editor-test.properties b/flatlaf-theme-editor/theme-editor-test.properties index 889569e1..75ece812 100644 --- a/flatlaf-theme-editor/theme-editor-test.properties +++ b/flatlaf-theme-editor/theme-editor-test.properties @@ -40,3 +40,12 @@ Prop.colorFunc5=lighten(#fe1289,20%) Prop.colorFunc6=darken(#fe1289,20%) Prop.colorFunc7=lighten($Prop.colorFunc4,20%,relative autoInverse) Prop.colorFunc8=lighten(Prop.colorFunc4,20%,lazy) +Prop.colorFunc9=fadein(#ff000000,30%) +Prop.colorFunc10=fadeout(#ff0000,40%) +Prop.colorFunc11=fade(#ff0000,50%) + +Prop.colorFunc12=#f00 +Prop.colorFunc13=spin($Prop.colorFunc12,40) +Prop.colorFunc14=spin($Prop.colorFunc12,-40) +Prop.colorFunc15=spin($Prop.colorFunc12,400) +Prop.colorFunc16=spin($Prop.colorFunc12,-400) From 1d3ce76b270ae8edb73dcd74d46377c4fe464660 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 19 Nov 2020 16:46:46 +0100 Subject: [PATCH 032/178] Slider: replaced Slider.thumbWidth with Slider.thumbSize to support non-square sized thumbs (as used in Windows 10) --- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 49 ++++++++++++++----- .../com/formdev/flatlaf/FlatLaf.properties | 2 +- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 8 ++- .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 2 +- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 2 +- .../uidefaults/FlatTestLaf_1.8.0_202.txt | 2 +- .../flatlaf/themeeditor/FlatLafUIKeys.txt | 2 +- 7 files changed, 45 insertions(+), 22 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index bc503667..845a3160 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -53,7 +53,7 @@ import com.formdev.flatlaf.util.UIScale; * * * @uiDefault Slider.trackWidth int - * @uiDefault Slider.thumbWidth int + * @uiDefault Slider.thumbSize Dimension * @uiDefault Slider.focusWidth int * @uiDefault Slider.trackValueColor Color optional; defaults to Slider.thumbColor * @uiDefault Slider.trackColor Color @@ -73,7 +73,7 @@ public class FlatSliderUI extends BasicSliderUI { protected int trackWidth; - protected int thumbWidth; + protected Dimension thumbSize; protected int focusWidth; protected Color trackValueColor; @@ -106,7 +106,12 @@ public class FlatSliderUI LookAndFeel.installProperty( slider, "opaque", false ); trackWidth = UIManager.getInt( "Slider.trackWidth" ); - thumbWidth = UIManager.getInt( "Slider.thumbWidth" ); + thumbSize = UIManager.getDimension( "Slider.thumbSize" ); + if( thumbSize == null ) { + // fallback for compatibility with old versions + int thumbWidth = UIManager.getInt( "Slider.thumbWidth" ); + thumbSize = new Dimension( thumbWidth, thumbWidth ); + } focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 ); trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" ); @@ -187,9 +192,16 @@ public class FlatSliderUI @Override protected Dimension getThumbSize() { + return calcThumbSize( slider, thumbSize, focusWidth ); + } + + public static Dimension calcThumbSize( JSlider slider, Dimension thumbSize, int focusWidth ) { int fw = UIScale.scale( focusWidth ); - int w = UIScale.scale( thumbWidth ) + fw + fw; - return new Dimension( w, w ); + int w = UIScale.scale( thumbSize.width ) + fw + fw; + int h = UIScale.scale( thumbSize.height ) + fw + fw; + return (slider.getOrientation() == JSlider.HORIZONTAL) + ? new Dimension( w, h ) + : new Dimension( h, w ); } @Override @@ -285,23 +297,23 @@ debug*/ // paint thumb focus border if( focused ) { g.setColor( focusedColor ); - g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); + ((Graphics2D)g).fill( createRoundThumbShape( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ) ); } if( thumbBorderColor != null ) { // paint thumb border g.setColor( thumbBorderColor ); - g.fillOval( x, y, width, height ); + ((Graphics2D)g).fill( createRoundThumbShape( x, y, width, height ) ); // paint thumb background float lw = UIScale.scale( 1f ); g.setColor( thumbColor ); - ((Graphics2D)g).fill( new Ellipse2D.Float( x + lw, y + lw, + ((Graphics2D)g).fill( createRoundThumbShape( x + lw, y + lw, width - lw - lw, height - lw - lw ) ); } else { // paint thumb background g.setColor( thumbColor ); - g.fillOval( x, y, width, height ); + ((Graphics2D)g).fill( createRoundThumbShape( x, y, width, height ) ); } } else { Graphics2D g2 = (Graphics2D) g.create(); @@ -315,13 +327,17 @@ debug*/ g2.translate( thumbRect.width, 0 ); g2.rotate( Math.toRadians( 90 ) ); } + + int temp = width; + width = height; + height = temp; } // paint thumb focus border if( focused ) { g2.setColor( focusedColor ); g2.fill( createDirectionalThumbShape( 0, 0, - thumbRect.width, thumbRect.height + (fw * 0.4142f), fw ) ); + width + fw + fw, height + fw + fw + (fw * 0.4142f), fw ) ); } if( thumbBorderColor != null ) { @@ -345,8 +361,17 @@ debug*/ } } - public static Shape createDirectionalThumbShape( double x, double y, double w, double h, double arc ) { - double wh = w / 2; + public static Shape createRoundThumbShape( float x, float y, float w, float h ) { + if( w == h ) + return new Ellipse2D.Float( x, y, w, h ); + else { + float arc = Math.min( w, h ); + return new RoundRectangle2D.Float( x, y, w, h, arc, arc ); + } + } + + public static Shape createDirectionalThumbShape( float x, float y, float w, float h, float arc ) { + float wh = w / 2; Path2D path = new Path2D.Float(); path.moveTo( x + wh, y + h ); 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 dbf91b85..95015d5c 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -507,7 +507,7 @@ Separator.stripeIndent=1 Slider.focusInsets=0,0,0,0 Slider.trackWidth=2 -Slider.thumbWidth=12 +Slider.thumbSize=12,12 Slider.focusWidth=4 diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index 34c7a6d1..aa51b1fe 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -43,7 +43,7 @@ public class FlatRangeSliderUI extends BasicRangeSliderUI { protected int trackWidth; - protected int thumbWidth; + protected Dimension thumbSize; protected int focusWidth; protected Color trackValueColor; @@ -105,7 +105,7 @@ public class FlatRangeSliderUI LookAndFeel.installProperty( slider, "opaque", false ); trackWidth = UIManager.getInt( "Slider.trackWidth" ); - thumbWidth = UIManager.getInt( "Slider.thumbWidth" ); + thumbSize = UIManager.getDimension( "Slider.thumbSize" ); focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 ); trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" ); @@ -185,9 +185,7 @@ public class FlatRangeSliderUI @Override protected Dimension getThumbSize() { - int fw = UIScale.scale( focusWidth ); - int w = UIScale.scale( thumbWidth ) + fw + fw; - return new Dimension( w, w ); + return FlatSliderUI.calcThumbSize( slider, thumbSize, focusWidth ); } @Override diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 555a57b8..5236f05a 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -858,7 +858,7 @@ Slider.onlyLeftMouseButtonDrag true Slider.pressedThumbColor #2e6296 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse) Slider.shadow #646464 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #4a88c7 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbWidth 12 +Slider.thumbSize 12,12 javax.swing.plaf.DimensionUIResource [UI] Slider.tickColor #888888 javax.swing.plaf.ColorUIResource [UI] Slider.trackColor #646464 javax.swing.plaf.ColorUIResource [UI] Slider.trackValueColor #4a88c7 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index dc533773..8af0db86 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -863,7 +863,7 @@ Slider.onlyLeftMouseButtonDrag true Slider.pressedThumbColor #125ca5 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse) Slider.shadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #1e82e6 javax.swing.plaf.ColorUIResource [UI] -Slider.thumbWidth 12 +Slider.thumbSize 12,12 javax.swing.plaf.DimensionUIResource [UI] Slider.tickColor #888888 javax.swing.plaf.ColorUIResource [UI] Slider.trackColor #c4c4c4 javax.swing.plaf.ColorUIResource [UI] Slider.trackValueColor #1e82e6 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index c816d1a4..142a62b6 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -853,7 +853,7 @@ Slider.pressedTrackColor #88ff88 javax.swing.plaf.ColorUIResource [UI] Slider.shadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] Slider.thumbBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI] Slider.thumbColor #ffaaaa javax.swing.plaf.ColorUIResource [UI] -Slider.thumbWidth 12 +Slider.thumbSize 12,12 javax.swing.plaf.DimensionUIResource [UI] Slider.tickColor #ff0000 javax.swing.plaf.ColorUIResource [UI] Slider.trackColor #88ff88 javax.swing.plaf.ColorUIResource [UI] Slider.trackWidth 2 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 87b6b4ff..e09ea5df 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 @@ -600,7 +600,7 @@ Slider.onlyLeftMouseButtonDrag Slider.pressedThumbColor Slider.shadow Slider.thumbColor -Slider.thumbWidth +Slider.thumbSize Slider.tickColor Slider.trackColor Slider.trackValueColor From b5e7aa855336565df844f198fd828dd2e4144b2a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 19 Nov 2020 18:59:24 +0100 Subject: [PATCH 033/178] Slider: fixed painting issues: - needle of directional thumb was not painted while dragging - artifacts on HiDPI screen while dragging - cut off focus indicator on HiDPI screen --- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 89 ++++++++++++++----- 1 file changed, 69 insertions(+), 20 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 845a3160..32cdab69 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -30,9 +30,11 @@ import java.awt.geom.RoundRectangle2D; import javax.swing.JComponent; import javax.swing.JSlider; import javax.swing.LookAndFeel; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicSliderUI; +import com.formdev.flatlaf.util.HiDPIUtils; import com.formdev.flatlaf.util.UIScale; /** @@ -286,74 +288,95 @@ debug*/ public static void paintThumb( Graphics g, JSlider slider, Rectangle thumbRect, boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, int focusWidth ) { - int fw = UIScale.scale( focusWidth ); - int x = thumbRect.x + fw; - int y = thumbRect.y + fw; - int width = thumbRect.width - fw - fw; - int height = thumbRect.height - fw - fw; + double systemScaleFactor = UIScale.getSystemScaleFactor( (Graphics2D) g ); + if( systemScaleFactor != 1 && systemScaleFactor != 2 ) { + // paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175% + HiDPIUtils.paintAtScale1x( (Graphics2D) g, thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height, + (g2d, x2, y2, width2, height2, scaleFactor) -> { + paintThumbImpl( g, slider, x2, y2, width2, height2, + roundThumb, thumbColor, thumbBorderColor, focusedColor, + (float) (focusWidth * scaleFactor) ); + } ); + return; + } + + paintThumbImpl( g, slider, thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height, + roundThumb, thumbColor, thumbBorderColor, focusedColor, focusWidth ); + + } + + private static void paintThumbImpl( Graphics g, JSlider slider, int x, int y, int width, int height, + boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, float focusWidth ) + { + int fw = Math.round( UIScale.scale( focusWidth ) ); + int tx = x + fw; + int ty = y + fw; + int tw = width - fw - fw; + int th = height - fw - fw; boolean focused = FlatUIUtils.isPermanentFocusOwner( slider ); if( roundThumb ) { // paint thumb focus border if( focused ) { g.setColor( focusedColor ); - ((Graphics2D)g).fill( createRoundThumbShape( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ) ); + ((Graphics2D)g).fill( createRoundThumbShape( x, y, width, height ) ); } if( thumbBorderColor != null ) { // paint thumb border g.setColor( thumbBorderColor ); - ((Graphics2D)g).fill( createRoundThumbShape( x, y, width, height ) ); + ((Graphics2D)g).fill( createRoundThumbShape( tx, ty, tw, th ) ); // paint thumb background float lw = UIScale.scale( 1f ); g.setColor( thumbColor ); - ((Graphics2D)g).fill( createRoundThumbShape( x + lw, y + lw, - width - lw - lw, height - lw - lw ) ); + ((Graphics2D)g).fill( createRoundThumbShape( tx + lw, ty + lw, + tw - lw - lw, th - lw - lw ) ); } else { // paint thumb background g.setColor( thumbColor ); - ((Graphics2D)g).fill( createRoundThumbShape( x, y, width, height ) ); + ((Graphics2D)g).fill( createRoundThumbShape( tx, ty, tw, th ) ); } } else { Graphics2D g2 = (Graphics2D) g.create(); try { - g2.translate( thumbRect.x, thumbRect.y ); + g2.translate( x, y ); if( slider.getOrientation() == JSlider.VERTICAL ) { if( slider.getComponentOrientation().isLeftToRight() ) { - g2.translate( 0, thumbRect.height ); + g2.translate( 0, height ); g2.rotate( Math.toRadians( 270 ) ); } else { - g2.translate( thumbRect.width, 0 ); + g2.translate( width, 0 ); g2.rotate( Math.toRadians( 90 ) ); } - int temp = width; - width = height; - height = temp; + // rotate thumb width/height + int temp = tw; + tw = th; + th = temp; } // paint thumb focus border if( focused ) { g2.setColor( focusedColor ); g2.fill( createDirectionalThumbShape( 0, 0, - width + fw + fw, height + fw + fw + (fw * 0.4142f), fw ) ); + tw + fw + fw, th + fw + fw + (fw * 0.4142f), fw ) ); } if( thumbBorderColor != null ) { // paint thumb border g2.setColor( thumbBorderColor ); - g2.fill( createDirectionalThumbShape( fw, fw, width, height, 0 ) ); + g2.fill( createDirectionalThumbShape( fw, fw, tw, th, 0 ) ); // paint thumb background float lw = UIScale.scale( 1f ); g2.setColor( thumbColor ); g2.fill( createDirectionalThumbShape( fw + lw, fw + lw, - width - lw - lw, height - lw - lw - (lw * 0.4142f), 0 ) ); + tw - lw - lw, th - lw - lw - (lw * 0.4142f), 0 ) ); } else { // paint thumb background g2.setColor( thumbColor ); - g2.fill( createDirectionalThumbShape( fw, fw, width, height, 0 ) ); + g2.fill( createDirectionalThumbShape( fw, fw, tw, th, 0 ) ); } } finally { g2.dispose(); @@ -404,6 +427,32 @@ debug*/ return !slider.getPaintTicks() && !slider.getPaintLabels(); } + @Override + public void setThumbLocation( int x, int y ) { + if( !isRoundThumb() ) { + // the needle of the directional thumb is painted outside of thumbRect + // --> must increase repaint rectangle + + // set new thumb location and compute union of old and new thumb bounds + Rectangle r = new Rectangle( thumbRect ); + thumbRect.setLocation( x, y ); + SwingUtilities.computeUnion( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height, r ); + + // increase union rectangle for repaint + int extra = (int) Math.ceil( UIScale.scale( focusWidth ) * 0.4142f ); + if( slider.getOrientation() == JSlider.HORIZONTAL ) + r.height += extra; + else { + r.width += extra; + if( !slider.getComponentOrientation().isLeftToRight() ) + r.x -= extra; + } + + slider.repaint( r ); + } else + super.setThumbLocation( x, y ); + } + //---- class FlatTrackListener -------------------------------------------- protected class FlatTrackListener From 1fb0783808cd6529d7dc44cc131b138fc2bb7923 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 20 Nov 2020 00:32:45 +0100 Subject: [PATCH 034/178] Slider: fixed slider colors in IntelliJ themes --- .../java/com/formdev/flatlaf/IntelliJTheme.java | 5 +++++ .../com/formdev/flatlaf/ui/FlatSliderUI.java | 7 ++++++- .../com/formdev/flatlaf/FlatDarkLaf.properties | 2 +- .../com/formdev/flatlaf/FlatLightLaf.properties | 2 +- .../flatlaf/IntelliJTheme$ThemeLaf.properties | 16 ++++++++++++++++ .../dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt | 2 +- .../dumps/uidefaults/FlatLightLaf_1.8.0_202.txt | 2 +- 7 files changed, 31 insertions(+), 5 deletions(-) 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 5fd9b4dc..d943cad6 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -475,7 +475,9 @@ public class IntelliJTheme } } + /** Rename UI default keys (key --> value). */ private static Map uiKeyMapping = new HashMap<>(); + /** Copy UI default keys (value --> key). */ private static Map uiKeyCopying = new HashMap<>(); private static Map uiKeyInverseMapping = new HashMap<>(); private static Map checkboxKeyMapping = new HashMap<>(); @@ -529,6 +531,9 @@ public class IntelliJTheme // Slider uiKeyMapping.put( "Slider.trackWidth", "" ); // ignore (used in Material Theme UI Lite) + uiKeyCopying.put( "Slider.trackValueColor", "ProgressBar.foreground" ); + uiKeyCopying.put( "Slider.thumbColor", "ProgressBar.foreground" ); + uiKeyCopying.put( "Slider.trackColor", "ProgressBar.background" ); // TitlePane uiKeyCopying.put( "TitlePane.inactiveBackground", "TitlePane.background" ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 32cdab69..d286aa70 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -82,6 +82,7 @@ public class FlatSliderUI protected Color trackColor; protected Color thumbColor; protected Color thumbBorderColor; + protected Color focusBaseColor; protected Color focusedColor; protected Color focusedThumbBorderColor; protected Color hoverThumbColor; @@ -120,7 +121,8 @@ public class FlatSliderUI trackColor = UIManager.getColor( "Slider.trackColor" ); thumbColor = UIManager.getColor( "Slider.thumbColor" ); thumbBorderColor = UIManager.getColor( "Slider.thumbBorderColor" ); - focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); + focusBaseColor = UIManager.getColor( "Component.focusColor" ); + focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", focusBaseColor ); focusedThumbBorderColor = FlatUIUtils.getUIColor( "Slider.focusedThumbBorderColor", "Component.focusedBorderColor" ); hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" ); pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" ); @@ -137,6 +139,7 @@ public class FlatSliderUI trackColor = null; thumbColor = null; thumbBorderColor = null; + focusBaseColor = null; focusedColor = null; focusedThumbBorderColor = null; hoverThumbColor = null; @@ -282,6 +285,8 @@ debug*/ ? stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null ) : null; + Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, focusBaseColor ); + paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); } diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index f3e13263..201e8cd5 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -241,7 +241,7 @@ Slider.trackValueColor=#4A88C7 Slider.trackColor=#646464 Slider.thumbColor=$Slider.trackValueColor Slider.tickColor=#888 -Slider.focusedColor=fade($Component.focusColor,80%) +Slider.focusedColor=fade($Component.focusColor,70%,derived) Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived) Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived) Slider.disabledTrackColor=#4c5052 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 6d57c99d..db395e08 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -253,7 +253,7 @@ Slider.trackValueColor=#1E82E6 Slider.trackColor=#c4c4c4 Slider.thumbColor=$Slider.trackValueColor Slider.tickColor=#888 -Slider.focusedColor=fade($Component.focusColor,50%) +Slider.focusedColor=fade($Component.focusColor,50%,derived) Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived) Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived) Slider.disabledTrackColor=#c0c0c0 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties index a2abdc11..2edf5de3 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties @@ -35,6 +35,11 @@ Button.default.hoverBorderColor=null HelpButton.hoverBorderColor=null +#---- Slider ---- + +Slider.focusedColor=fade($Component.focusColor,40%,derived) + + #---- ToggleButton ---- ToggleButton.startBackground=$ToggleButton.background @@ -60,6 +65,8 @@ ToggleButton.endBackground=$ToggleButton.background [Cobalt_2]CheckBox.icon.background=#002946 [Cobalt_2]CheckBox.icon.checkmarkColor=#002946 +[Dark_purple]Slider.focusedColor=fade($Component.focusColor,70%,derived) + [Dracula]ProgressBar.selectionBackground=#fff [Dracula]ProgressBar.selectionForeground=#fff @@ -81,6 +88,15 @@ ToggleButton.endBackground=$ToggleButton.background [High_contrast]ToggleButton.disabledSelectedBackground=#444 [High_contrast]ToggleButton.toolbar.selectedBackground=#fff +[One_Dark]Slider.focusedColor=fade(#568af2,40%) + +[Solarized_Dark]Slider.focusedColor=fade($Component.focusColor,80%,derived) + +[vuesion-theme]Slider.trackValueColor=#ececee +[vuesion-theme]Slider.trackColor=#303a45 +[vuesion-theme]Slider.thumbColor=#ececee +[vuesion-theme]Slider.focusedColor=fade(#ececee,20%) + # Material Theme UI Lite diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 5236f05a..1c7e4b6f 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -846,7 +846,7 @@ Slider.disabledTrackColor #4c5052 javax.swing.plaf.ColorUIResource [UI] Slider.focus #7e7e7e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] Slider.focusWidth 4 -Slider.focusedColor #cc3d6185 javax.swing.plaf.ColorUIResource [UI] +Slider.focusedColor #b33d6185 com.formdev.flatlaf.util.DerivedColor [UI] fade(70%) Slider.font [active] $defaultFont [UI] Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 8af0db86..d522dd47 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -851,7 +851,7 @@ Slider.disabledTrackColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI] Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI] Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] Slider.focusWidth 4 -Slider.focusedColor #8097c3f3 javax.swing.plaf.ColorUIResource [UI] +Slider.focusedColor #8097c3f3 com.formdev.flatlaf.util.DerivedColor [UI] fade(50%) Slider.font [active] $defaultFont [UI] Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI] Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] From 33ff5828dac2db1d6bcbf1020fee59632d39a609 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 22 Nov 2020 17:10:11 +0100 Subject: [PATCH 035/178] IntelliJ Themes: - added "Gradianto Nature Green" theme - updated "Arc Dark", "Cyan", "Dark purple", "Gradianto", "Gray", "Gruvbox" and "One Dark" themes --- CHANGELOG.md | 4 + .../flatlaf/demo/intellijthemes/themes.json | 18 +- flatlaf-intellij-themes/README.md | 1 + .../intellijthemes/FlatAllIJThemes.java | 1 + .../FlatGradiantoNatureGreenIJTheme.java | 48 ++++ .../intellijthemes/themes/Cyan.theme.json | 16 +- .../themes/DarkPurple.theme.json | 28 +- .../intellijthemes/themes/Dracula.theme.json | 15 +- .../themes/Gradianto_Nature_Green.theme.json | 266 ++++++++++++++++++ .../themes/Gradianto_dark_fuchsia.theme.json | 39 +++ .../themes/Gradianto_deep_ocean.theme.json | 39 +++ .../themes/Gradianto_midnight_blue.theme.json | 39 +++ .../intellijthemes/themes/Gray.theme.json | 22 +- .../themes/arc_theme_dark.theme.json | 17 +- .../themes/arc_theme_dark_orange.theme.json | 17 +- .../themes/gruvbox_dark_soft.theme.json | 7 +- .../intellijthemes/themes/one_dark.theme.json | 48 ++-- 17 files changed, 559 insertions(+), 66 deletions(-) create mode 100644 flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java create mode 100644 flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json diff --git a/CHANGELOG.md b/CHANGELOG.md index f1832ed2..9d2a186e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ FlatLaf Change Log #### New features and improvements - JIDE Common Layer: Support `RangeSlider`. (PR #209) +- IntelliJ Themes: + - Added "Gradianto Nature Green" theme. + - Updated "Arc Dark", "Cyan", "Dark purple", "Gradianto", "Gray", "Gruvbox" + and "One Dark" themes. #### Fixed bugs diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json index 948b6e61..39cf75cb 100644 --- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json +++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json @@ -4,14 +4,14 @@ "license": "MIT", "licenseFile": "arc-themes.LICENSE.txt", "sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea", - "sourceCodePath": "blob/master/resources/arc-theme.theme.json" + "sourceCodePath": "blob/master/arc-theme-idea-light/resources/arc-theme.theme.json" }, "arc-theme-orange.theme.json": { "name": "Arc - Orange", "license": "MIT", "licenseFile": "arc-themes.LICENSE.txt", "sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea", - "sourceCodePath": "blob/master/resources/arc-theme-orange.theme.json" + "sourceCodePath": "blob/master/arc-theme-idea-light/resources/arc-theme-orange.theme.json" }, "arc_theme_dark.theme.json": { "name": "Arc Dark", @@ -19,7 +19,7 @@ "license": "MIT", "licenseFile": "arc-themes.LICENSE.txt", "sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea", - "sourceCodePath": "blob/master/resources/arc_theme_dark.theme.json" + "sourceCodePath": "blob/master/arc-theme-idea-dark/resources/arc_theme_dark.theme.json" }, "arc_theme_dark_orange.theme.json": { "name": "Arc Dark - Orange", @@ -27,7 +27,7 @@ "license": "MIT", "licenseFile": "arc-themes.LICENSE.txt", "sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea", - "sourceCodePath": "blob/master/resources/arc_theme_dark_orange.theme.json" + "sourceCodePath": "blob/master/arc-theme-idea-dark/resources/arc_theme_dark_orange.theme.json" }, "Carbon.theme.json": { "name": "Carbon", @@ -74,7 +74,7 @@ "license": "MIT", "licenseFile": "Dracula.LICENSE.txt", "sourceCodeUrl": "https://github.com/dracula/jetbrains", - "sourceCodePath": "blob/master/src/main/resources/themes/Dracula.theme.json" + "sourceCodePath": "blob/master/src/main/resources/themes/dracula.theme.json" }, "Gradianto_dark_fuchsia.theme.json": { "name": "Gradianto Dark Fuchsia", @@ -100,6 +100,14 @@ "sourceCodeUrl": "https://github.com/thvardhan/Gradianto", "sourceCodePath": "blob/master/src/main/resources/Gradianto_midnight_blue.theme.json" }, + "Gradianto_Nature_Green.theme.json": { + "name": "Gradianto Nature Green", + "dark": true, + "license": "MIT", + "licenseFile": "Gradianto.LICENSE.txt", + "sourceCodeUrl": "https://github.com/thvardhan/Gradianto", + "sourceCodePath": "blob/master/src/main/resources/Gradianto_Nature_Green.theme.json" + }, "Gray.theme.json": { "name": "Gray", "license": "MIT", diff --git a/flatlaf-intellij-themes/README.md b/flatlaf-intellij-themes/README.md index bf03932f..96e523c8 100644 --- a/flatlaf-intellij-themes/README.md +++ b/flatlaf-intellij-themes/README.md @@ -60,6 +60,7 @@ Name | Class [Gradianto Dark Fuchsia](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme` [Gradianto Deep Ocean](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme` [Gradianto Midnight Blue](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme` +[Gradianto Nature Green](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoNatureGreenIJTheme` [Gray](https://github.com/OlyaB/GreyTheme) | `com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme` [Gruvbox Dark Hard](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme` [Gruvbox Dark Medium](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme` diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java index 20f30aed..a728432e 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java @@ -42,6 +42,7 @@ public class FlatAllIJThemes new LookAndFeelInfo( "Gradianto Dark Fuchsia", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme" ), new LookAndFeelInfo( "Gradianto Deep Ocean", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme" ), new LookAndFeelInfo( "Gradianto Midnight Blue", "com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme" ), + new LookAndFeelInfo( "Gradianto Nature Green", "com.formdev.flatlaf.intellijthemes.FlatGradiantoNatureGreenIJTheme" ), new LookAndFeelInfo( "Gray", "com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme" ), new LookAndFeelInfo( "Gruvbox Dark Hard", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme" ), new LookAndFeelInfo( "Gruvbox Dark Medium", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme" ), diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java new file mode 100644 index 00000000..b58cb40b --- /dev/null +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java @@ -0,0 +1,48 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// DO NOT MODIFY +// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator +// + +package com.formdev.flatlaf.intellijthemes; + +import com.formdev.flatlaf.IntelliJTheme; + +/** + * @author Karl Tauber + */ +public class FlatGradiantoNatureGreenIJTheme + extends IntelliJTheme.ThemeLaf +{ + public static boolean install( ) { + try { + return install( new FlatGradiantoNatureGreenIJTheme() ); + } catch( RuntimeException ex ) { + return false; + } + } + + public FlatGradiantoNatureGreenIJTheme() { + super( Utils.loadTheme( "Gradianto_Nature_Green.theme.json" ) ); + } + + @Override + public String getName() { + return "Gradianto Nature Green"; + } +} diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Cyan.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Cyan.theme.json index 143590b1..021630a8 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Cyan.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Cyan.theme.json @@ -88,6 +88,10 @@ "hoverBackground": "#ced2d9" }, + "DragAndDrop": { + "areaBackground": "#4cb2c733" + }, + "Editor": { "background": "#d0d3d9", "foreground": "#808080", @@ -201,7 +205,10 @@ "contentAreaColor": "#bec5cd" }, - "Table.background": "#eef0f4", + "Table": { + "background": "#eef0f4", + "hoverBackground": "#C3D2E366" + }, "TableHeader": { "cellBorder": "3,0,3,0", @@ -242,7 +249,12 @@ } }, - "Tree.background": "#eef0f4" + "Tree.background": "#eef0f4", + + "WelcomeScreen": { + "Details.background": "#eef0f4", + "Projects.actions.background": "#E1E4EB" + } }, "icons": { diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/DarkPurple.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/DarkPurple.theme.json index c212eeb2..2cfc2bab 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/DarkPurple.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/DarkPurple.theme.json @@ -51,7 +51,8 @@ "hoverBackground": "#453e57", "hoverBorderColor": "#453E57", "pressedBackground": "#49415c", - "pressedBorderColor": "#49415C" + "pressedBorderColor": "#49415C", + "focusedBorderColor": "#476fcc" }, "Button": { @@ -94,7 +95,8 @@ "matchForeground": "#ED94FF", "matchSelectionForeground": "#ED94FF", "selectionInactiveBackground": "#44405c", - "nonFocusedMask": "#00000033" + "nonFocusedMask": "#00000033", + "selectionBackground": "#623380" }, "Component": { @@ -123,7 +125,7 @@ "DragAndDrop": { "areaForeground": "#D0D0D9", - "areaBackground": "#702F91", + "areaBackground": "#5d476680", "areaBorderColor": "#343142" }, @@ -166,7 +168,7 @@ "visitedForeground": "#7094FF" }, - "MenuBar.borderColor": "##1a1721", + "MenuBar.borderColor": "#1a1721", "NavBar.borderColor": "#1a1721", @@ -280,6 +282,8 @@ "endBackground": "#cca929" }, + "SearchOption.selectedBackground": "#424885", + "SpeedSearch": { "foreground": "#D0D0D9", "borderColor": "#69418c", @@ -304,7 +308,10 @@ "bottomSeparatorColor": "#282430" }, - "Table.stripeColor": "#323242", + "Table": { + "stripeColor": "#323242", + "hoverBackground": "#00000028" + }, "TextArea": { "background": "#3A384D", @@ -327,7 +334,9 @@ "ToolTip": { "background": "#463f57", - "Actions.background": "#323245" + "Actions.background": "#323245", + "infoForeground": "#8985a1", + "shortcutForeground": "#8985A1" }, "ToolWindow": { @@ -363,14 +372,17 @@ "VersionControl": { "Log.Commit": { "currentBranchBackground": "#202340", - "unmatchedForeground": "#6d6a80" + "unmatchedForeground": "#6d6a80", + "hoveredBackground": "#000000B9" }, "FileHistory.Commit.selectedBranchBackground": "#202340" }, "WelcomeScreen": { "Projects.selectionInactiveBackground": "#713a91", - "separatorColor": "#1a1721" + "separatorColor": "#1a1721", + "Details.background": "#26262E", + "Projects.actions.background": "#343445" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json index f963edfd..0f0fd1e2 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json @@ -1,14 +1,14 @@ { "name": "Dracula", "dark": true, - "author": "VermouthX", - "editorScheme": "/themes/Dracula.xml", + "author": "Zihan Ma", + "editorScheme": "/themes/dracula.xml", "ui": { "*": { - "arc": "5", + "arc": "7", "background": "#414450", "selectionBackground": "#6272a4", - "selectionInactiveBackground": "#4E5A82", + "selectionInactiveBackground": "#4e5a82", "inactiveBackground": "#414450", "borderColor": "#282a36" }, @@ -58,7 +58,7 @@ }, "CompletionPopup": { "selectionBackground": "#6272a4", - "selectionInactiveBackground": "#4E5A82", + "selectionInactiveBackground": "#4e5a82", "matchForeground": "#ff79c6" }, "Component": { @@ -148,7 +148,7 @@ "failedEndColor": "#ff5554", "trackColor": "#6272a4", "progressColor": "#ff79c6", - "indeterminateStartColor": "#bd93f9", + "indeterminateStartColor": "#93b8f9", "indeterminateEndColor": "#bd93f9", "passedColor": "#50fa7b", "passedEndColor": "#50fa7b" @@ -161,6 +161,7 @@ }, "ScrollBar": { "Mac": { + "hoverThumbColor": "#bd93f9", "Transparent": { "hoverThumbColor": "#bd93f9" } @@ -212,7 +213,7 @@ "Tree": { "modifiedItemForeground": "#ff79c6", "selectionBackground": "#6272a4", - "selectionInactiveBackground": "#4E5A82" + "selectionInactiveBackground": "#4e5a82" }, "ValidationTooltip": { "errorBackground": "#ff5554", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json new file mode 100644 index 00000000..ac5c3eb7 --- /dev/null +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json @@ -0,0 +1,266 @@ +{ + "author": "thvardhan", + "dark": true, + "editorScheme": "/Gradianto_Nature_Green.xml", + "icons": { + "ColorPalette": { + "Checkbox.Border.Default": "#3f765a", + "Checkbox.Border.Default.Dark": "#3f765a", + "Checkbox.Background.Default.Dark": "#3f765a", + "Checkbox.Foreground.Selected.Dark": "#00d679", + "Checkbox.Background.Disabled": "#274439", + "Checkbox.Background.Disabled.Dark": "#1e3b2f", + "Objects.Grey": "#e3e3e3c0", + "Objects.Blue": "#4fc3f7c0", + "Objects.RedStatus": "#ff5722c0", + "Objects.Red": "#e07483c0", + "Objects.Pink": "#de6dc2c0", + "Objects.Yellow": "#ffca57c0", + "Objects.Green": "#76da84c0", + "Objects.Purple": "#d199ffc0", + "Objects.BlackText": "#2e2e2ec0", + "Objects.YellowDark": "#ffca1ec0", + "Objects.GreenAndroid": "#18e66bc0" + } + }, + "name": "Gradianto Nature Green", + "ui": { + "*": { + "background": "#20403f", + "foreground": "#cccece", + "infoForeground": "#29d57cc1", + "selectionBackground": "#00695c", + "selectionForeground": "#f1f4f6", + "selectionInactiveBackground": "#0465465c", + "disabledForeground": "#a3a3a3", + "disabledBackground": "#104942", + "inactiveBackground": "#257b71", + "errorForeground": "#b5b5b5", + "disabledText": "#adadad", + "Borders.ContrastBorderColor": "#12312d", + "borderColor": "#0a373b", + "disabledBorderColor": "#0b2d26", + "focusColor": "#265752", + "focusedBorderColor": "#1a7469", + "separatorColor": "#20574f" + }, + "Tree": { + "background": "#203a40", + "selectionBackground": "#00695c" + }, + "ActionButton": { + "hoverBackground": "#084934", + "pressedBackground": "#025248", + "hoverBorderColor": "#074045", + "pressedBorderColor": "#063034" + }, + "Borders": { + "color": "#1d3e30a3", + "ContrastBorderColor": "#14342d" + }, + "Button": { + "startBackground": "#4aa275", + "endBackground": "#4aa275", + "startBorderColor": "#254b45", + "endBorderColor": "#254b45", + "focusedBorderColor": "#4aa295", + "default.focusColor": "#4aa295", + "disabledBorderColor": "#198157", + "default": { + "startBackground": "#4aa275", + "endBackground": "#4aa275", + "focusColor": "#29a2a2" + } + }, + "CompletionPopup": { + "matchForeground": "#56f29c" + }, + "Notification": { + "errorForeground": "#f5f5f5", + "errorBackground": "#c4131e", + "errorBorderColor": "#c55e4a", + "ToolWindow": { + "informativeForeground": "#f5f5f5", + "informativeBackground": "#414f66", + "informativeBorderColor": "#d4745c", + "warningForeground": "#abb2bf", + "warningBackground": "#896a28", + "warningBorderColor": "#5f4422", + "errorForeground": "#abb2bf", + "errorBackground": "#923849", + "errorBorderColor": "#552029" + } + }, + "ComboBox": { + "background": "#356c43", + "nonEditableBackground": "#356c43", + "ArrowButton": { + "iconColor": "#e3e2f1", + "disabledIconColor": "#83828b", + "nonEditableBackground": "#35a787" + } + }, + "Editor": { + "shortcutForeground": "#3f795b" + }, + "EditorTabs": { + "selectedForeground": "#eceff1", + "selectedBackground": "#006448", + "underlinedTabBackground": "#07664848", + "background": "#1e3b39", + "borderColor": "#033e25", + "underlineColor": "#008f666a", + "hoverMaskColor": "#468f67", + "inactiveMaskColor": "#244a31ff" + }, + "Link": { + "activeForeground": "#cdd0c5", + "hoverForeground": "#cded91", + "pressedForeground": "#8da75e", + "visitedForeground": "#cebebe" + }, + "FileColor": { + "Yellow": "#cee51219", + "Green": "#98c3791a", + "Blue": "#61afef1a", + "Violet": "#542a4f1a", + "Orange": "#d13c001a", + "Rose": "#ae002f1a" + }, + "SearchEverywhere": { + "Tab": { + "selectedForeground": "#ffffff", + "selectedBackground": "#2f7d5d" + } + }, + "SearchMatch": { + "startBackground": "#679d81", + "endBackground": "#2d7156" + }, + "WelcomeScreen": { + "Projects.selectionInactiveBackground": "#32805e", + "separatorColor": "#249273" + }, + "ValidationTooltip": { + "errorBackground": "#802d43", + "errorBorderColor": "#802d43", + "warningBackground": "#735822", + "warningBorderColor": "#5f4422" + }, + "Table": { + "stripeColor": "#476f5e", + "selectionForeground": "#e4e4e4", + "dropLineColor": "#588d67", + "focusCellForeground": "#e3e3e3", + "gridColor": "#456f58" + }, + "ProgressBar": { + "trackColor": "#132f20", + "progressColor": "#60cf92", + "indeterminateStartColor": "#68f296", + "indeterminateEndColor": "#30695c", + "failedColor": "#ad387e", + "failedEndColor": "#47221d", + "passedColor": "#7edb7f", + "passedEndColor": "#2f422f" + }, + "windowBorder": "#285738", + "window": "#285741", + "PopupMenu.translucentBackground": "#266d48", + "Popup": { + "inactiveBorderColor": "#254933", + "paintBorder": true, + "Header.activeBackground": "#397e66", + "Header.inactiveBackground": "#2b6d53", + "separatorColor": "#225740", + "separatorForeground": "#42a873", + "Advertiser": { + "background": "#2f473d", + "borderColor": "#143427", + "borderInsets": "3,8,5,0" + } + }, + "ToggleButton": { + "onForeground": "#27683f", + "onBackground": "#9ca9af", + "offForeground": "#646464", + "offBackground": "#1c3228", + "buttonColor": "#3c855f" + }, + "ToolTip": { + "background": "#448366", + "Actions.background": "#253a33" + }, + "ToolWindow": { + "Header": { + "background": "#2e7253", + "inactiveBackground": "#2f5e47e8" + }, + "HeaderTab": { + "selectedBackground": "#397e55ff", + "selectedInactiveBackground": "#2c5947ff", + "hoverBackground": "#38715fff", + "hoverInactiveBackground": "#254a3aff" + }, + "Button": { + "hoverBackground": "#387158ff", + "selectedBackground": "#397e74ff", + "selectedForeground": "#b1c6c4" + } + }, + "TabbedPane": { + "focusColor": "#2c6a56", + "hoverColor": "#34795d", + "underlineColor": "#7fa89b" + }, + "DragAndDrop": { + "areaForeground": "#e5e5e5", + "areaBackground": "#243937", + "areaBorderColor": "#143427" + }, + "Plugins": { + "SectionHeader.background": "#2a6346", + "tagBackground": "#3d5a50", + "lightSelectionBackground": "#3c7e64" + }, + "VersionControl": { + "Log.Commit.currentBranchBackground": "#225740", + "Log.Commit.unmatchedForeground": "#94aba8" + }, + "ScrollBar" : { + "hoverThumbBorderColor" : "#39666394", + "background" : "#16322cff", + "hoverThumbColor": "#1f3e38b2", + "hoverTrackColor": "#224039ff", + "thumb": "#20403aff", + "thumbBorderColor": "#39666394", + "thumbColor": "#20403d94", + "thumbDarkShadow": "#122623ff", + "thumbHighlight": "#2a4f4cff", + "thumbShadow": "#162b24ff", + "track": "#182d26ff", + "Transparent": { + "thumbColor": "#20403d94", + "hoverThumbBorderColor" : "#14262694", + "hoverThumbColor": "#1f3e38b2", + "hoverTrackColor": "#224039ff", + "thumbBorderColor": "#14262694" + }, + "Mac" : { + "Transparent": { + "thumbColor": "#20403d94", + "hoverThumbBorderColor" : "#14262694", + "hoverThumbColor": "#1f3e38b2", + "hoverTrackColor": "#224039ff", + "thumbBorderColor": "##39666394" + }, + "hoverThumbBorderColor" : "#14262694", + "hoverThumbColor": "#1f3e38b2", + "hoverTrackColor": "#224039ff", + "thumbBorderColor": "#14262694", + "thumbColor": "#20403d94" + } + }, + "EditorPane.inactiveBackground": "#254a39ff" + } +} \ No newline at end of file diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json index f1c0dd4a..dd5058f1 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json @@ -249,6 +249,45 @@ "Tab.selectedBackground": "#a778bfff", "Tab.hoverBackground": "#82519cff" }, + "ScrollBar" : { + "hoverThumbBorderColor" : "#3a2241b2", + "background" : "#241632ff", + "hoverThumbColor": "#472950b2", + "hoverTrackColor": "#3d2240ff", + "thumb": "#2f2040ff", + "thumbBorderColor": "#2c152fff", + "thumbColor": "#2f1f4094", + "thumbDarkShadow": "#261226ff", + "thumbHighlight": "#4f2a4eff", + "thumbShadow": "#22162bff", + "track": "#23182dff", + "Transparent": { + "thumbColor": "#2f1f4094", + "hoverThumbBorderColor" : "#3a2241b2", + "hoverThumbColor": "#472950b2", + "hoverTrackColor": "#3d2240ff", + "thumbBorderColor": "#2c152fff" + }, + "Mac" : { + "Transparent": { + "thumbColor": "#2f1f4094", + "hoverThumbBorderColor" : "#3a2241b2", + "hoverThumbColor": "#472950b2", + "hoverTrackColor": "#3d2240ff", + "thumbBorderColor": "#2c152fff" + }, + "hoverThumbBorderColor" : "#3a2241b2", + "hoverThumbColor": "#472950b2", + "hoverTrackColor": "#3d2240ff", + "thumbBorderColor": "#2c152fff", + "thumbColor": "#2f1f4094" + } + }, + "TabbedPane": { + "focusColor": "#562c6a", + "hoverColor": "#633479", + "underlineColor": "#8f7fa8" + }, "EditorPane.inactiveBackground": "#5d4966" }, "icons": { diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json index 6c32b6f5..b518a1e7 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json @@ -45,6 +45,11 @@ "color": "#2b3858cc", "ContrastBorderColor": "#0e1624" }, + "TabbedPane": { + "focusColor": "#25334b", + "hoverColor": "#374c70", + "underlineColor": "#3D7EC0" + }, "Button": { "startBackground": "#4a75a2", "endBackground": "#4a75a2", @@ -63,6 +68,40 @@ "CompletionPopup": { "matchForeground": "#568AF2" }, + "ScrollBar" : { + "hoverThumbBorderColor" : "#12182994", + "background" : "#161f3294", + "hoverThumbColor": "#313f62b2", + "hoverTrackColor": "#222a40b2", + "thumb": "#20294094", + "thumbBorderColor": "#12182994", + "thumbColor": "#20294094", + "thumbDarkShadow": "#0c0f1a94", + "thumbHighlight": "#3b496bb2", + "thumbShadow": "#161a2b94", + "track": "#181e2db2", + "Transparent": { + "thumbColor": "#20294094", + "hoverThumbBorderColor" : "#12182994", + "hoverThumbColor": "#313f62b2", + "hoverTrackColor": "#222a40b2", + "thumbBorderColor": "#12182994" + }, + "Mac" : { + "Transparent": { + "thumbColor": "#20294094", + "hoverThumbBorderColor" : "#12182994", + "hoverThumbColor": "#313f62b2", + "hoverTrackColor": "#222a40b2", + "thumbBorderColor": "#12182994" + }, + "hoverThumbBorderColor" : "#12182994", + "hoverThumbColor": "#313f62b2", + "hoverTrackColor": "#222a40b2", + "thumbBorderColor": "#12182994", + "thumbColor": "#20294094" + } + }, "Notification": { diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_midnight_blue.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_midnight_blue.theme.json index 8b26244f..70f7274d 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_midnight_blue.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_midnight_blue.theme.json @@ -220,6 +220,45 @@ "tagBackground": "#40405a", "lightSelectionBackground": "#48387e" }, + "TabbedPane": { + "focusColor": "#3d2c6a", + "hoverColor": "#433479", + "underlineColor": "#877fa8" + }, + "ScrollBar" : { + "hoverThumbBorderColor" : "#423162ff", + "background" : "#211632ff", + "hoverThumbColor": "#3e3162ff", + "hoverTrackColor": "#2d2240ff", + "thumb": "#2b2040ff", + "thumbBorderColor": "#322141ff", + "thumbColor": "#272040ff", + "thumbDarkShadow": "#1d182fff", + "thumbHighlight": "#533b6bff", + "thumbShadow": "#1f162bff", + "track": "#28233eff", + "Transparent": { + "thumbColor": "#292040ff", + "hoverThumbBorderColor" : "#281c39ff", + "hoverThumbColor": "#423162ff", + "hoverTrackColor": "#2d2240ff", + "thumbBorderColor": "#261b3bff" + }, + "Mac" : { + "Transparent": { + "thumbColor": "#2d2040ff", + "hoverThumbBorderColor" : "#2b1f40ff", + "hoverThumbColor": "#403162ff", + "hoverTrackColor": "#2e2240ff", + "thumbBorderColor": "#1f1834ff" + }, + "hoverThumbBorderColor" : "#2d203cff", + "hoverThumbColor": "#3e3162ff", + "hoverTrackColor": "#2d2240ff", + "thumbBorderColor": "#271a37ff", + "thumbColor": "#272040ff" + } + }, "EditorPane.inactiveBackground": "#414157ff" }, "icons": { diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gray.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gray.theme.json index 00a61b99..ce9dcb9b 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gray.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gray.theme.json @@ -99,6 +99,8 @@ "FileColor.Yellow": "#F5F0DF", "FileColor.Green": "#E8F2DF", + "GotItTooltip.borderColor": "#0000001F", + "Label.errorForeground": "#C7222D", "Link": { @@ -137,7 +139,8 @@ "SectionHeader.foreground": "#808080", "Tab.selectedBackground": "#D5D6D7", "Tab.hoverBackground": "#D5D6D7", - "lightSelectionBackground": "#F4F9FF" + "lightSelectionBackground": "#E9EFF7", + "hoverBackground": "#f7faff" }, "Popup": { @@ -185,12 +188,13 @@ "contentAreaColor": "#E1E3E6" }, - "Table.stripeColor": "#F2F3F5", + "Table": { + "stripeColor": "#F2F3F5", + "hoverBackground": "#00000009" + }, "TableHeader": { - "cellBorder": "3,0,3,0", - "background": "#fafbfc", - "bottomSeparatorColor": "#ebedf0" + "cellBorder": "3,0,3,0" }, "TextArea.background": "#FFFFFF", @@ -225,9 +229,15 @@ "VersionControl": { "Log.Commit.currentBranchBackground": "#e6f0f2", - "FileHistory.Commit.selectedBranchBackground": "#e6f0f2" + "FileHistory.Commit.selectedBranchBackground": "#e6f0f2", + "Log.Commit.hoveredBackground": "#000000EE" + }, + + "WelcomeScreen": { + "Details.background": "#FAFBFC" } + }, "icons": { diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark.theme.json index 23250440..15df94d2 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark.theme.json @@ -28,8 +28,8 @@ "endBorderColor": "#2b2e39", "focusedBorderColor" : "#2679db", "background" : "#383c4a", - "startBackground" : "#474c5b", - "endBackground" : "#474c5b", + "startBackground" : "#444A58", + "endBackground" : "#444A58", "default": { "foreground": "#d3dae3", "startBackground": "#2679db", @@ -47,17 +47,17 @@ "ToolBar.highlight" : "#4e5467", "Popup.Toolbar.borderColor" : "#2b2e39", "ActionButton.hoverBorderColor" : "#2b2e39", - "ActionButton.hoverBackground" : "#4e5467", + "ActionButton.hoverBackground" : "#505666", "ActionButton.pressedBackground" : "#4e5467", "ActionButton.pressedBorderColor" : "#2b2e39", - "StatusBar.hoverBackground" : "#4e5467", + "StatusBar.hoverBackground" : "#505666", "StatusBar.borderColor" : "#2b2e39", "Popup.Toolbar.background" : "#474c5b", "Panel.background": "#383c4a", "Panel.foreground" : "#d3dae3", "Window.border" : "1,1,1,1,#2b2e39", "WelcomeScreen.background" : "#383c4a", - "WelcomeScreen.Projects.background" : "#474c5b", + "WelcomeScreen.Projects.background" : "#404651", "MenuBar.foreground" : "#d3dae3", "MenuBar.borderColor" : "#2b2e39", @@ -73,7 +73,7 @@ "Separator.separatorColor" : "#9ba2ab", "Group.separatorColor" : "#9ba2ab", - "Tree.background" : "#474c5b", + "Tree.background" : "#404651", "Tree.foreground" : "#d3dae3", "ProgressBar.background" : "#2679db", @@ -93,13 +93,13 @@ "ParameterInfo.background" : "#fffae3", "ParameterInfo.currentOverloadBackground" : "#fffae3", - "List.background" : "#474c5b", + "List.background" : "#404651", "List.dropLineColor" : "#2679db", "List.selectionBackground": "#2679db", "List.selectionForeground": "#ffffff", "List.selectionInactiveBackground": "#1e61b0", - "Table.background" : "#474c5b", + "Table.background" : "#404651", "Table.selectionBackground" : "#2679db", "Table.selectionForeground" : "#ffffff", "Table.lightSelectionBackground" : "#2679db", @@ -126,6 +126,7 @@ "ComboBox.nonEditableBackground" : "#474c5b", "ComboBox.ArrowButton.background" : "#474c5b", "ComboBox.ArrowButton.nonEditableBackground" : "#474c5b", + "ComboBox.disabledBackground" : "#383c4a", "ComboBoxButton.background" : "#474c5b", "TextField.background" : "#474c5b", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark_orange.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark_orange.theme.json index ef69243b..431d9bc8 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark_orange.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/arc_theme_dark_orange.theme.json @@ -28,8 +28,8 @@ "endBorderColor": "#2b2e39", "focusedBorderColor" : "#f57900", "background" : "#383c4a", - "startBackground" : "#474c5b", - "endBackground" : "#474c5b", + "startBackground" : "#444A58", + "endBackground" : "#444A58", "default": { "foreground": "#d3dae3", "startBackground": "#f57900", @@ -47,17 +47,17 @@ "ToolBar.highlight" : "#4e5467", "Popup.Toolbar.borderColor" : "#2b2e39", "ActionButton.hoverBorderColor" : "#2b2e39", - "ActionButton.hoverBackground" : "#4e5467", + "ActionButton.hoverBackground" : "#505666", "ActionButton.pressedBackground" : "#4e5467", "ActionButton.pressedBorderColor" : "#2b2e39", - "StatusBar.hoverBackground" : "#4e5467", + "StatusBar.hoverBackground" : "#505666", "StatusBar.borderColor" : "#2b2e39", "Popup.Toolbar.background" : "#474c5b", "Panel.background": "#383c4a", "Panel.foreground" : "#d3dae3", "Window.border" : "1,1,1,1,#2b2e39", "WelcomeScreen.background" : "#383c4a", - "WelcomeScreen.Projects.background" : "#474c5b", + "WelcomeScreen.Projects.background" : "#404651", "MenuBar.foreground" : "#d3dae3", "MenuBar.borderColor" : "#2b2e39", @@ -73,7 +73,7 @@ "Separator.separatorColor" : "#9ba2ab", "Group.separatorColor" : "#9ba2ab", - "Tree.background" : "#474c5b", + "Tree.background" : "#404651", "Tree.foreground" : "#d3dae3", "ProgressBar.background" : "#f57900", @@ -93,13 +93,13 @@ "ParameterInfo.background" : "#fffae3", "ParameterInfo.currentOverloadBackground" : "#fffae3", - "List.background" : "#474c5b", + "List.background" : "#404651", "List.dropLineColor" : "#f57900", "List.selectionBackground": "#f57900", "List.selectionForeground": "#ffffff", "List.selectionInactiveBackground": "#C36200", - "Table.background" : "#474c5b", + "Table.background" : "#404651", "Table.selectionBackground" : "#f57900", "Table.selectionForeground" : "#ffffff", "Table.lightSelectionBackground" : "#f57900", @@ -125,6 +125,7 @@ "ComboBox.nonEditableBackground" : "#474c5b", "ComboBox.ArrowButton.background" : "#474c5b", "ComboBox.ArrowButton.nonEditableBackground" : "#474c5b", + "ComboBox.disabledBackground" : "#383c4a", "ComboBoxButton.background" : "#474c5b", "TextField.background" : "#474c5b", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/gruvbox_dark_soft.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/gruvbox_dark_soft.theme.json index 079a2e86..ae1d4681 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/gruvbox_dark_soft.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/gruvbox_dark_soft.theme.json @@ -7,6 +7,7 @@ "bg0": "#282828", "bg0_h": "#1d2021", "bg0_s": "#32302f", + "bg0_ss": "#4F4945", "bg1": "#3c3836", "bg2": "#504945", "bg3": "#665c54", @@ -45,11 +46,11 @@ "infoForeground": "fg", "lightSelectionBackground": "bg1", - "selectionBackground": "#4F4945", + "selectionBackground": "bg0_ss", "selectionForeground": "fg0", - "selectionBackgroundInactive": "bg0_s", - "selectionInactiveBackground": "bg0_s", + "selectionBackgroundInactive": "bg0_ss", + "selectionInactiveBackground": "bg0_ss", "selectedBackground": "bg0_h", "selectedForeground": "fg0", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json index 5e32a8e1..912a3448 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json @@ -4,11 +4,13 @@ "author": "Mark Skelton", "editorScheme": "/themes/one_dark.xml", "colors": { - "accentColor": "#568AF2" + "accentColor": "#568AF2", + "backgroundColor": "#21252b", + "borderColor": "#333841" }, "ui": { "*": { - "background": "#21252b", + "background": "backgroundColor", "foreground": "#abb2bf", "infoForeground": "#5c6370", @@ -18,8 +20,8 @@ "selectionBackgroundInactive": "#2c313a", "selectionForeground": "#d7dae0", - "disabledBackground": "#21252b", - "inactiveBackground": "#21252b", + "disabledBackground": "backgroundColor", + "inactiveBackground": "backgroundColor", "acceleratorForeground": "#E6E6E6", "acceleratorSelectionForeground": "#E6E6E6", @@ -28,7 +30,7 @@ "borderColor": "#333841", "disabledBorderColor": "#2d3137", - "focusColor": "#21252b", + "focusColor": "backgroundColor", "focusedBorderColor": "accentColor", "separatorColor": "#32363c" @@ -47,7 +49,7 @@ "endBackground": "#3d424b", "startBorderColor": "#464c55", "endBorderColor": "#464c55", - "shadowColor": "#21252b", + "shadowColor": "backgroundColor", "focusedBorderColor": "#646a73", "default": { @@ -120,12 +122,12 @@ }, "FileColor": { - "Yellow": "#563b2255", - "Green": "#334e1f55", - "Blue": "#28436d55", - "Violet": "#37115655", - "Orange": "#562b2255", - "Rose": "#561a2b55" + "Yellow": "#3d3026", + "Green": "#293a24", + "Blue": "#24354f", + "Violet": "#2d1942", + "Orange": "#3d3026", + "Rose": "#3d1e2b" }, "Label": { @@ -167,6 +169,8 @@ } }, + "Panel.background": "backgroundColor", + "ParameterInfo": { "background": "#3d424b", "foreground": "#abb2bf", @@ -176,6 +180,7 @@ "Plugins": { "disabledForeground": "#5c6370", + "hoverBackground": "#323844", "lightSelectionBackground": "#323844", "tagBackground": "#414855", "tagForeground": "#abb2bf", @@ -228,7 +233,7 @@ "SearchEverywhere": { "Advertiser.foreground": "#5c6370", - "Header.background": "#21252b", + "Header.background": "backgroundColor", "SearchField":{ "background": "#282c34", @@ -335,7 +340,7 @@ "VersionControl": { "Log.Commit": { - "currentBranchBackground": "#21252b", + "currentBranchBackground": "#282c35", "unmatchedForeground": "#5c6370" }, @@ -347,8 +352,13 @@ }, "WelcomeScreen": { - "Projects.selectionInactiveBackground": "#2c313a", - "separatorColor": "#2c313a" + "borderColor": "borderColor", + "Projects": { + "actions.background": "#323844", + "selectionInactiveBackground": "#2c313a" + }, + "separatorColor": "#2c313a", + "SidePanel.background": "#282c34" } }, @@ -357,9 +367,9 @@ "Checkbox.Background.Default.Dark": "#282c34", "Checkbox.Border.Default.Dark": "#414855", "Checkbox.Foreground.Selected.Dark": "#abb2bf", - "Checkbox.Focus.Wide.Dark": "accentColor", - "Checkbox.Focus.Thin.Default.Dark": "accentColor", - "Checkbox.Focus.Thin.Selected.Dark": "accentColor", + "Checkbox.Focus.Wide.Dark": "#568AF2", + "Checkbox.Focus.Thin.Default.Dark": "#568AF2", + "Checkbox.Focus.Thin.Selected.Dark": "#568AF2", "Checkbox.Background.Disabled.Dark": "#21252b", "Checkbox.Border.Disabled.Dark": "#2c313a", "Checkbox.Foreground.Disabled.Dark": "#5c6370" From 539737d1c5a2b36ac64f94b59843770dbe17336b Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 23 Nov 2020 17:19:04 +0100 Subject: [PATCH 036/178] ScrollBar: fixed NPE in NetBeans GUI builder when using JCalendar component (issue #194) --- .../main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java index 3f58f96f..27760686 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java @@ -142,6 +142,12 @@ public class FlatScrollBarUI buttonDisabledArrowColor = UIManager.getColor( "ScrollBar.buttonDisabledArrowColor" ); hoverButtonBackground = UIManager.getColor( "ScrollBar.hoverButtonBackground" ); pressedButtonBackground = UIManager.getColor( "ScrollBar.pressedButtonBackground" ); + + // fallback (e.g. when used in NetBeans GUI builder) + if( trackInsets == null ) + trackInsets = new Insets( 0, 0, 0, 0 ); + if( thumbInsets == null ) + thumbInsets = new Insets( 0, 0, 0, 0 ); } @Override From 6c8b8e894921fbaf3dcbf5a27ae9f6314872c984 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 23 Nov 2020 18:09:44 +0100 Subject: [PATCH 037/178] Popup: allow forcing to heavy weight popup windows (issue #189) --- .../formdev/flatlaf/FlatClientProperties.java | 9 ++++ .../formdev/flatlaf/ui/FlatPopupFactory.java | 44 ++++++++----------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java index 3e3e87ec..7011e39c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java @@ -181,6 +181,15 @@ public interface FlatClientProperties */ String POPUP_DROP_SHADOW_PAINTED = "Popup.dropShadowPainted"; + /** + * Specifies whether a heavy weight window should be used if the component is shown in a popup + * or if the component is the owner of another component that is shown in a popup. + *

+ * Component {@link javax.swing.JComponent}
+ * Value type {@link java.lang.Boolean} + */ + String POPUP_FORCE_HEAVY_WEIGHT = "Popup.forceHeavyWeight"; + //---- JProgressBar ------------------------------------------------------- /** diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java index bf1fcd24..b04a744c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java @@ -68,19 +68,17 @@ public class FlatPopupFactory y = pt.y; } - if( !isDropShadowPainted( owner, contents ) ) - return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, false ), contents ); + boolean forceHeavyWeight = isOptionEnabled( owner, contents, FlatClientProperties.POPUP_FORCE_HEAVY_WEIGHT, "Popup.forceHeavyWeight" ); + + if( !isOptionEnabled( owner, contents, FlatClientProperties.POPUP_DROP_SHADOW_PAINTED, "Popup.dropShadowPainted" ) ) + return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), contents ); // macOS and Linux adds drop shadow to heavy weight popups - if( SystemInfo.isMacOS || SystemInfo.isLinux ) { - Popup popup = getPopupForScreenOfOwner( owner, contents, x, y, true ); - if( popup == null ) - popup = getPopupForScreenOfOwner( owner, contents, x, y, false ); - return new NonFlashingPopup( popup, contents ); - } + if( SystemInfo.isMacOS || SystemInfo.isLinux ) + return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, true ), contents ); // create drop shadow popup - return new DropShadowPopup( getPopupForScreenOfOwner( owner, contents, x, y, false ), owner, contents ); + return new DropShadowPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), owner, contents ); } /** @@ -155,24 +153,20 @@ public class FlatPopupFactory popup.show(); } - private boolean isDropShadowPainted( Component owner, Component contents ) { - Boolean b = isDropShadowPainted( owner ); - if( b != null ) - return b; + private boolean isOptionEnabled( Component owner, Component contents, String clientKey, String uiKey ) { + if( owner instanceof JComponent ) { + Boolean b = FlatClientProperties.clientPropertyBooleanStrict( (JComponent) owner, clientKey, null ); + if( b != null ) + return b; + } - b = isDropShadowPainted( contents ); - if( b != null ) - return b; + if( contents instanceof JComponent ) { + Boolean b = FlatClientProperties.clientPropertyBooleanStrict( (JComponent) contents, clientKey, null ); + if( b != null ) + return b; + } - return UIManager.getBoolean( "Popup.dropShadowPainted" ); - } - - private Boolean isDropShadowPainted( Component c ) { - if( !(c instanceof JComponent) ) - return null; - - Object value = ((JComponent)c).getClientProperty( FlatClientProperties.POPUP_DROP_SHADOW_PAINTED ); - return (value instanceof Boolean ) ? (Boolean) value : null; + return UIManager.getBoolean( uiKey ); } /** From 21a12b8dd427967a2984f43646390808eadf3459 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 23 Nov 2020 22:14:42 +0100 Subject: [PATCH 038/178] added Flat*Laf.installLafInfo() methods to add a Laf to the set of available Lafs uses `UIManager.installLookAndFeel( new UIManager.LookAndFeelInfo(...) )` --- .../com/formdev/flatlaf/FlatDarculaLaf.java | 15 ++++++++--- .../java/com/formdev/flatlaf/FlatDarkLaf.java | 26 ++++++++++++++++--- .../com/formdev/flatlaf/FlatIntelliJLaf.java | 15 ++++++++--- .../java/com/formdev/flatlaf/FlatLaf.java | 16 +++++++++++- .../com/formdev/flatlaf/FlatLightLaf.java | 26 ++++++++++++++++--- .../IJThemesClassGenerator.java | 22 ++++++++++------ .../intellijthemes/FlatAllIJThemes.java | 4 +-- .../intellijthemes/FlatArcDarkIJTheme.java | 14 +++++++--- .../FlatArcDarkOrangeIJTheme.java | 14 +++++++--- .../intellijthemes/FlatArcIJTheme.java | 14 +++++++--- .../intellijthemes/FlatArcOrangeIJTheme.java | 14 +++++++--- .../intellijthemes/FlatCarbonIJTheme.java | 14 +++++++--- .../intellijthemes/FlatCobalt2IJTheme.java | 14 +++++++--- .../intellijthemes/FlatCyanLightIJTheme.java | 14 +++++++--- .../intellijthemes/FlatDarkFlatIJTheme.java | 14 +++++++--- .../intellijthemes/FlatDarkPurpleIJTheme.java | 14 +++++++--- .../intellijthemes/FlatDraculaIJTheme.java | 14 +++++++--- .../FlatGradiantoDarkFuchsiaIJTheme.java | 14 +++++++--- .../FlatGradiantoDeepOceanIJTheme.java | 14 +++++++--- .../FlatGradiantoMidnightBlueIJTheme.java | 14 +++++++--- .../FlatGradiantoNatureGreenIJTheme.java | 14 +++++++--- .../intellijthemes/FlatGrayIJTheme.java | 14 +++++++--- .../FlatGruvboxDarkHardIJTheme.java | 14 +++++++--- .../FlatGruvboxDarkMediumIJTheme.java | 14 +++++++--- .../FlatGruvboxDarkSoftIJTheme.java | 14 +++++++--- .../FlatHiberbeeDarkIJTheme.java | 14 +++++++--- .../FlatHighContrastIJTheme.java | 14 +++++++--- .../intellijthemes/FlatLightFlatIJTheme.java | 14 +++++++--- .../FlatMaterialDesignDarkIJTheme.java | 14 +++++++--- .../intellijthemes/FlatMonocaiIJTheme.java | 14 +++++++--- .../intellijthemes/FlatNordIJTheme.java | 14 +++++++--- .../intellijthemes/FlatOneDarkIJTheme.java | 14 +++++++--- .../FlatSolarizedDarkIJTheme.java | 14 +++++++--- .../FlatSolarizedLightIJTheme.java | 14 +++++++--- .../intellijthemes/FlatSpacegrayIJTheme.java | 14 +++++++--- .../intellijthemes/FlatVuesionIJTheme.java | 14 +++++++--- .../FlatArcDarkContrastIJTheme.java | 14 +++++++--- .../FlatArcDarkIJTheme.java | 14 +++++++--- .../FlatAtomOneDarkContrastIJTheme.java | 14 +++++++--- .../FlatAtomOneDarkIJTheme.java | 14 +++++++--- .../FlatAtomOneLightContrastIJTheme.java | 14 +++++++--- .../FlatAtomOneLightIJTheme.java | 14 +++++++--- .../FlatDraculaContrastIJTheme.java | 14 +++++++--- .../FlatDraculaIJTheme.java | 14 +++++++--- .../FlatGitHubContrastIJTheme.java | 14 +++++++--- .../FlatGitHubIJTheme.java | 14 +++++++--- .../FlatLightOwlContrastIJTheme.java | 14 +++++++--- .../FlatLightOwlIJTheme.java | 14 +++++++--- .../FlatMaterialDarkerContrastIJTheme.java | 14 +++++++--- .../FlatMaterialDarkerIJTheme.java | 14 +++++++--- .../FlatMaterialDeepOceanContrastIJTheme.java | 14 +++++++--- .../FlatMaterialDeepOceanIJTheme.java | 14 +++++++--- .../FlatMaterialLighterContrastIJTheme.java | 14 +++++++--- .../FlatMaterialLighterIJTheme.java | 14 +++++++--- .../FlatMaterialOceanicContrastIJTheme.java | 14 +++++++--- .../FlatMaterialOceanicIJTheme.java | 14 +++++++--- .../FlatMaterialPalenightContrastIJTheme.java | 14 +++++++--- .../FlatMaterialPalenightIJTheme.java | 14 +++++++--- .../FlatMonokaiProContrastIJTheme.java | 14 +++++++--- .../FlatMonokaiProIJTheme.java | 14 +++++++--- .../FlatNightOwlContrastIJTheme.java | 14 +++++++--- .../FlatNightOwlIJTheme.java | 14 +++++++--- .../FlatSolarizedDarkContrastIJTheme.java | 14 +++++++--- .../FlatSolarizedDarkIJTheme.java | 14 +++++++--- .../FlatSolarizedLightContrastIJTheme.java | 14 +++++++--- .../FlatSolarizedLightIJTheme.java | 14 +++++++--- 66 files changed, 687 insertions(+), 263 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarculaLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarculaLaf.java index 608d8cda..660ab700 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarculaLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarculaLaf.java @@ -18,21 +18,28 @@ package com.formdev.flatlaf; /** * A Flat LaF that has a dark color scheme and looks like Darcula LaF. - * - * The UI defaults are loaded from FlatDarculaLaf.properties, FlatDarkLaf.properties and FlatLaf.properties + *

+ * The UI defaults are loaded from {@code FlatDarculaLaf.properties}, + * {@code FlatDarkLaf.properties} and {@code FlatLaf.properties}. * * @author Karl Tauber */ public class FlatDarculaLaf extends FlatDarkLaf { - public static boolean install( ) { + public static final String NAME = "FlatLaf Darcula"; + + public static boolean install() { return install( new FlatDarculaLaf() ); } + public static void installLafInfo() { + installLafInfo( NAME, FlatDarculaLaf.class ); + } + @Override public String getName() { - return "FlatLaf Darcula"; + return NAME; } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarkLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarkLaf.java index ed5f33a6..dbb44aca 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarkLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDarkLaf.java @@ -16,23 +16,41 @@ package com.formdev.flatlaf; +import javax.swing.UIManager; + /** * A Flat LaF that has a dark color scheme. - * - * The UI defaults are loaded from FlatDarkLaf.properties and FlatLaf.properties + *

+ * The UI defaults are loaded from {@code FlatDarkLaf.properties} and {@code FlatLaf.properties}. * * @author Karl Tauber */ public class FlatDarkLaf extends FlatLaf { - public static boolean install( ) { + public static final String NAME = "FlatLaf Dark"; + + /** + * Sets the application look and feel to this LaF + * using {@link UIManager#setLookAndFeel(javax.swing.LookAndFeel)}. + */ + public static boolean install() { return install( new FlatDarkLaf() ); } + /** + * Adds this look and feel to the set of available look and feels. + *

+ * Useful if your application uses {@link UIManager#getInstalledLookAndFeels()} + * to query available LaFs and display them to the user in a combobox. + */ + public static void installLafInfo() { + installLafInfo( NAME, FlatDarkLaf.class ); + } + @Override public String getName() { - return "FlatLaf Dark"; + return NAME; } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIntelliJLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIntelliJLaf.java index 778096f0..f5ac98d9 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIntelliJLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIntelliJLaf.java @@ -18,21 +18,28 @@ package com.formdev.flatlaf; /** * A Flat LaF that has a light color scheme and looks like IntelliJ LaF. - * - * The UI defaults are loaded from FlatIntelliJLaf.properties, FlatLightLaf.properties and FlatLaf.properties + *

+ * The UI defaults are loaded from {@code FlatIntelliJLaf.properties}, + * {@code FlatLightLaf.properties} and {@code FlatLaf.properties}. * * @author Karl Tauber */ public class FlatIntelliJLaf extends FlatLightLaf { - public static boolean install( ) { + public static final String NAME = "FlatLaf IntelliJ"; + + public static boolean install() { return install( new FlatIntelliJLaf() ); } + public static void installLafInfo() { + installLafInfo( NAME, FlatIntelliJLaf.class ); + } + @Override public String getName() { - return "FlatLaf IntelliJ"; + return NAME; } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index 925864cf..2e4b86cd 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -50,9 +50,9 @@ import javax.swing.LookAndFeel; import javax.swing.PopupFactory; import javax.swing.SwingUtilities; import javax.swing.UIDefaults; +import javax.swing.UIDefaults.ActiveValue; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.UIDefaults.ActiveValue; import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.FontUIResource; import javax.swing.plaf.UIResource; @@ -94,6 +94,10 @@ public abstract class FlatLaf private Boolean oldFrameWindowDecorated; private Boolean oldDialogWindowDecorated; + /** + * Sets the application look and feel to the given LaF + * using {@link UIManager#setLookAndFeel(javax.swing.LookAndFeel)}. + */ public static boolean install( LookAndFeel newLookAndFeel ) { try { UIManager.setLookAndFeel( newLookAndFeel ); @@ -104,6 +108,16 @@ public abstract class FlatLaf } } + /** + * Adds the given look and feel to the set of available look and feels. + *

+ * Useful if your application uses {@link UIManager#getInstalledLookAndFeels()} + * to query available LaFs and display them to the user in a combobox. + */ + public static void installLafInfo( String lafName, Class lafClass ) { + UIManager.installLookAndFeel( new UIManager.LookAndFeelInfo( lafName, lafClass.getName() ) ); + } + /** * Returns the look and feel identifier. *

diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLightLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLightLaf.java index b9ac12ac..bab2e2d1 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLightLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLightLaf.java @@ -16,23 +16,41 @@ package com.formdev.flatlaf; +import javax.swing.UIManager; + /** * A Flat LaF that has a light color scheme. - * - * The UI defaults are loaded from FlatLightLaf.properties and FlatLaf.properties + *

+ * The UI defaults are loaded from {@code FlatLightLaf.properties} and {@code FlatLaf.properties}. * * @author Karl Tauber */ public class FlatLightLaf extends FlatLaf { - public static boolean install( ) { + public static final String NAME = "FlatLaf Light"; + + /** + * Sets the application look and feel to this LaF + * using {@link UIManager#setLookAndFeel(javax.swing.LookAndFeel)}. + */ + public static boolean install() { return install( new FlatLightLaf() ); } + /** + * Adds this look and feel to the set of available look and feels. + *

+ * Useful if your application uses {@link UIManager#getInstalledLookAndFeels()} + * to query available LaFs and display them to the user in a combobox. + */ + public static void installLafInfo() { + installLafInfo( NAME, FlatLightLaf.class ); + } + @Override public String getName() { - return "FlatLaf Light"; + return NAME; } @Override diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java index d28522dc..84181186 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java @@ -49,7 +49,9 @@ public class IJThemesClassGenerator } Path out = new File( toPath, "FlatAllIJThemes.java" ).toPath(); - String allThemes = CLASS_HEADER + ALL_THEMES_TEMPLATE.replace( "${allInfos}", allInfos ); + String allThemes = (CLASS_HEADER + ALL_THEMES_TEMPLATE) + .replace( "${subPackage}", "" ) + .replace( "${allInfos}", allInfos ); writeFile( out, allThemes ); System.out.println( markdownTable ); @@ -88,7 +90,7 @@ public class IJThemesClassGenerator String themeClass = "Flat" + buf + "IJTheme"; String themeFile = resourceName; - String classBody = CLASS_HEADER + CLASS_TEMPLATE + String classBody = (CLASS_HEADER + CLASS_TEMPLATE) .replace( "${subPackage}", subPackage ) .replace( "${themeClass}", themeClass ) .replace( "${themeFile}", themeFile ) @@ -138,6 +140,8 @@ public class IJThemesClassGenerator " * limitations under the License.\n" + " */\n" + "\n" + + "package com.formdev.flatlaf.intellijthemes${subPackage};\n" + + "\n" + "//\n" + "// DO NOT MODIFY\n" + "// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator\n" + @@ -145,8 +149,6 @@ public class IJThemesClassGenerator "\n"; private static final String CLASS_TEMPLATE = - "package com.formdev.flatlaf.intellijthemes${subPackage};\n" + - "\n" + "import com.formdev.flatlaf.IntelliJTheme;\n" + "\n" + "/**\n" + @@ -155,7 +157,9 @@ public class IJThemesClassGenerator "public class ${themeClass}\n" + " extends IntelliJTheme.ThemeLaf\n" + "{\n" + - " public static boolean install( ) {\n" + + " public static final String NAME = \"${themeName}\";\n" + + "\n" + + " public static boolean install() {\n" + " try {\n" + " return install( new ${themeClass}() );\n" + " } catch( RuntimeException ex ) {\n" + @@ -163,19 +167,21 @@ public class IJThemesClassGenerator " }\n" + " }\n" + "\n" + + " public static void installLafInfo() {\n" + + " installLafInfo( NAME, ${themeClass}.class );\n" + + " }\n" + + "\n" + " public ${themeClass}() {\n" + " super( Utils.loadTheme( \"${themeFile}\" ) );\n" + " }\n" + "\n" + " @Override\n" + " public String getName() {\n" + - " return \"${themeName}\";\n" + + " return NAME;\n" + " }\n" + "}\n"; private static final String ALL_THEMES_TEMPLATE = - "package com.formdev.flatlaf.intellijthemes;\n" + - "\n" + "import javax.swing.UIManager.LookAndFeelInfo;\n" + "\n" + "/**\n" + diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java index a728432e..518976ca 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import javax.swing.UIManager.LookAndFeelInfo; /** diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkIJTheme.java index 85212054..89887047 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatArcDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Arc Dark"; + + public static boolean install() { try { return install( new FlatArcDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatArcDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatArcDarkIJTheme.class ); + } + public FlatArcDarkIJTheme() { super( Utils.loadTheme( "arc_theme_dark.theme.json" ) ); } @Override public String getName() { - return "Arc Dark"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkOrangeIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkOrangeIJTheme.java index 5ddf66f3..f7179b43 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkOrangeIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcDarkOrangeIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatArcDarkOrangeIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Arc Dark - Orange"; + + public static boolean install() { try { return install( new FlatArcDarkOrangeIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatArcDarkOrangeIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatArcDarkOrangeIJTheme.class ); + } + public FlatArcDarkOrangeIJTheme() { super( Utils.loadTheme( "arc_theme_dark_orange.theme.json" ) ); } @Override public String getName() { - return "Arc Dark - Orange"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcIJTheme.java index 29826024..64af3c14 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatArcIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Arc"; + + public static boolean install() { try { return install( new FlatArcIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatArcIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatArcIJTheme.class ); + } + public FlatArcIJTheme() { super( Utils.loadTheme( "arc-theme.theme.json" ) ); } @Override public String getName() { - return "Arc"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcOrangeIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcOrangeIJTheme.java index 70b1fd25..5dcf1043 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcOrangeIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatArcOrangeIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatArcOrangeIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Arc - Orange"; + + public static boolean install() { try { return install( new FlatArcOrangeIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatArcOrangeIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatArcOrangeIJTheme.class ); + } + public FlatArcOrangeIJTheme() { super( Utils.loadTheme( "arc-theme-orange.theme.json" ) ); } @Override public String getName() { - return "Arc - Orange"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCarbonIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCarbonIJTheme.java index 7a4f5d08..4fe715b4 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCarbonIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCarbonIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatCarbonIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Carbon"; + + public static boolean install() { try { return install( new FlatCarbonIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatCarbonIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatCarbonIJTheme.class ); + } + public FlatCarbonIJTheme() { super( Utils.loadTheme( "Carbon.theme.json" ) ); } @Override public String getName() { - return "Carbon"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCobalt2IJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCobalt2IJTheme.java index 00382998..8e4ecc04 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCobalt2IJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCobalt2IJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatCobalt2IJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Cobalt 2"; + + public static boolean install() { try { return install( new FlatCobalt2IJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatCobalt2IJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatCobalt2IJTheme.class ); + } + public FlatCobalt2IJTheme() { super( Utils.loadTheme( "Cobalt_2.theme.json" ) ); } @Override public String getName() { - return "Cobalt 2"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCyanLightIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCyanLightIJTheme.java index 41cbbb28..7a8582ab 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCyanLightIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatCyanLightIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatCyanLightIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Cyan light"; + + public static boolean install() { try { return install( new FlatCyanLightIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatCyanLightIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatCyanLightIJTheme.class ); + } + public FlatCyanLightIJTheme() { super( Utils.loadTheme( "Cyan.theme.json" ) ); } @Override public String getName() { - return "Cyan light"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkFlatIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkFlatIJTheme.java index 51797836..ebc17b8b 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkFlatIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkFlatIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatDarkFlatIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Dark Flat"; + + public static boolean install() { try { return install( new FlatDarkFlatIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatDarkFlatIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatDarkFlatIJTheme.class ); + } + public FlatDarkFlatIJTheme() { super( Utils.loadTheme( "DarkFlatTheme.theme.json" ) ); } @Override public String getName() { - return "Dark Flat"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkPurpleIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkPurpleIJTheme.java index bb08ebda..fb00aa9b 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkPurpleIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDarkPurpleIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatDarkPurpleIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Dark purple"; + + public static boolean install() { try { return install( new FlatDarkPurpleIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatDarkPurpleIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatDarkPurpleIJTheme.class ); + } + public FlatDarkPurpleIJTheme() { super( Utils.loadTheme( "DarkPurple.theme.json" ) ); } @Override public String getName() { - return "Dark purple"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDraculaIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDraculaIJTheme.java index b33cdce1..b6db0fde 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDraculaIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDraculaIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatDraculaIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Dracula"; + + public static boolean install() { try { return install( new FlatDraculaIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatDraculaIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatDraculaIJTheme.class ); + } + public FlatDraculaIJTheme() { super( Utils.loadTheme( "Dracula.theme.json" ) ); } @Override public String getName() { - return "Dracula"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDarkFuchsiaIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDarkFuchsiaIJTheme.java index 41e4dfed..2ee0b7f1 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDarkFuchsiaIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDarkFuchsiaIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGradiantoDarkFuchsiaIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gradianto Dark Fuchsia"; + + public static boolean install() { try { return install( new FlatGradiantoDarkFuchsiaIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGradiantoDarkFuchsiaIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGradiantoDarkFuchsiaIJTheme.class ); + } + public FlatGradiantoDarkFuchsiaIJTheme() { super( Utils.loadTheme( "Gradianto_dark_fuchsia.theme.json" ) ); } @Override public String getName() { - return "Gradianto Dark Fuchsia"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDeepOceanIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDeepOceanIJTheme.java index 26f3f55a..c2076357 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDeepOceanIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoDeepOceanIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGradiantoDeepOceanIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gradianto Deep Ocean"; + + public static boolean install() { try { return install( new FlatGradiantoDeepOceanIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGradiantoDeepOceanIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGradiantoDeepOceanIJTheme.class ); + } + public FlatGradiantoDeepOceanIJTheme() { super( Utils.loadTheme( "Gradianto_deep_ocean.theme.json" ) ); } @Override public String getName() { - return "Gradianto Deep Ocean"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoMidnightBlueIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoMidnightBlueIJTheme.java index b647c679..e6fc7844 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoMidnightBlueIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoMidnightBlueIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGradiantoMidnightBlueIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gradianto Midnight Blue"; + + public static boolean install() { try { return install( new FlatGradiantoMidnightBlueIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGradiantoMidnightBlueIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGradiantoMidnightBlueIJTheme.class ); + } + public FlatGradiantoMidnightBlueIJTheme() { super( Utils.loadTheme( "Gradianto_midnight_blue.theme.json" ) ); } @Override public String getName() { - return "Gradianto Midnight Blue"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java index b58cb40b..169b1ea4 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGradiantoNatureGreenIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGradiantoNatureGreenIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gradianto Nature Green"; + + public static boolean install() { try { return install( new FlatGradiantoNatureGreenIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGradiantoNatureGreenIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGradiantoNatureGreenIJTheme.class ); + } + public FlatGradiantoNatureGreenIJTheme() { super( Utils.loadTheme( "Gradianto_Nature_Green.theme.json" ) ); } @Override public String getName() { - return "Gradianto Nature Green"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGrayIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGrayIJTheme.java index 72ceb256..d6c5fd31 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGrayIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGrayIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGrayIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gray"; + + public static boolean install() { try { return install( new FlatGrayIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGrayIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGrayIJTheme.class ); + } + public FlatGrayIJTheme() { super( Utils.loadTheme( "Gray.theme.json" ) ); } @Override public String getName() { - return "Gray"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkHardIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkHardIJTheme.java index 6fa52c63..ffc7d339 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkHardIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkHardIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGruvboxDarkHardIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gruvbox Dark Hard"; + + public static boolean install() { try { return install( new FlatGruvboxDarkHardIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGruvboxDarkHardIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGruvboxDarkHardIJTheme.class ); + } + public FlatGruvboxDarkHardIJTheme() { super( Utils.loadTheme( "gruvbox_dark_hard.theme.json" ) ); } @Override public String getName() { - return "Gruvbox Dark Hard"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkMediumIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkMediumIJTheme.java index 11f81e24..a898d401 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkMediumIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkMediumIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGruvboxDarkMediumIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gruvbox Dark Medium"; + + public static boolean install() { try { return install( new FlatGruvboxDarkMediumIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGruvboxDarkMediumIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGruvboxDarkMediumIJTheme.class ); + } + public FlatGruvboxDarkMediumIJTheme() { super( Utils.loadTheme( "gruvbox_dark_medium.theme.json" ) ); } @Override public String getName() { - return "Gruvbox Dark Medium"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkSoftIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkSoftIJTheme.java index 56ad8fc0..20a4d702 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkSoftIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatGruvboxDarkSoftIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGruvboxDarkSoftIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Gruvbox Dark Soft"; + + public static boolean install() { try { return install( new FlatGruvboxDarkSoftIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGruvboxDarkSoftIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGruvboxDarkSoftIJTheme.class ); + } + public FlatGruvboxDarkSoftIJTheme() { super( Utils.loadTheme( "gruvbox_dark_soft.theme.json" ) ); } @Override public String getName() { - return "Gruvbox Dark Soft"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHiberbeeDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHiberbeeDarkIJTheme.java index 7166ca5e..43d2e60d 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHiberbeeDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHiberbeeDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatHiberbeeDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Hiberbee Dark"; + + public static boolean install() { try { return install( new FlatHiberbeeDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatHiberbeeDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatHiberbeeDarkIJTheme.class ); + } + public FlatHiberbeeDarkIJTheme() { super( Utils.loadTheme( "HiberbeeDark.theme.json" ) ); } @Override public String getName() { - return "Hiberbee Dark"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHighContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHighContrastIJTheme.java index e9743dc9..5f8372ea 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHighContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatHighContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatHighContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "High contrast"; + + public static boolean install() { try { return install( new FlatHighContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatHighContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatHighContrastIJTheme.class ); + } + public FlatHighContrastIJTheme() { super( Utils.loadTheme( "HighContrast.theme.json" ) ); } @Override public String getName() { - return "High contrast"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatLightFlatIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatLightFlatIJTheme.java index cfac9f4d..97db2193 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatLightFlatIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatLightFlatIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatLightFlatIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Light Flat"; + + public static boolean install() { try { return install( new FlatLightFlatIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatLightFlatIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatLightFlatIJTheme.class ); + } + public FlatLightFlatIJTheme() { super( Utils.loadTheme( "LightFlatTheme.theme.json" ) ); } @Override public String getName() { - return "Light Flat"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMaterialDesignDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMaterialDesignDarkIJTheme.java index 79e83b89..e64a06f9 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMaterialDesignDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMaterialDesignDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialDesignDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Design Dark"; + + public static boolean install() { try { return install( new FlatMaterialDesignDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialDesignDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialDesignDarkIJTheme.class ); + } + public FlatMaterialDesignDarkIJTheme() { super( Utils.loadTheme( "MaterialTheme.theme.json" ) ); } @Override public String getName() { - return "Material Design Dark"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMonocaiIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMonocaiIJTheme.java index 4b2374be..f44a183f 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMonocaiIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatMonocaiIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMonocaiIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Monocai"; + + public static boolean install() { try { return install( new FlatMonocaiIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMonocaiIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMonocaiIJTheme.class ); + } + public FlatMonocaiIJTheme() { super( Utils.loadTheme( "Monocai.theme.json" ) ); } @Override public String getName() { - return "Monocai"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatNordIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatNordIJTheme.java index c2ec8711..13bebe09 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatNordIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatNordIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatNordIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Nord"; + + public static boolean install() { try { return install( new FlatNordIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatNordIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatNordIJTheme.class ); + } + public FlatNordIJTheme() { super( Utils.loadTheme( "nord.theme.json" ) ); } @Override public String getName() { - return "Nord"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatOneDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatOneDarkIJTheme.java index e147bf01..a7b72342 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatOneDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatOneDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatOneDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "One Dark"; + + public static boolean install() { try { return install( new FlatOneDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatOneDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatOneDarkIJTheme.class ); + } + public FlatOneDarkIJTheme() { super( Utils.loadTheme( "one_dark.theme.json" ) ); } @Override public String getName() { - return "One Dark"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedDarkIJTheme.java index 9d3418b7..3f706047 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSolarizedDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Solarized Dark"; + + public static boolean install() { try { return install( new FlatSolarizedDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSolarizedDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSolarizedDarkIJTheme.class ); + } + public FlatSolarizedDarkIJTheme() { super( Utils.loadTheme( "SolarizedDark.theme.json" ) ); } @Override public String getName() { - return "Solarized Dark"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedLightIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedLightIJTheme.java index 16e6e243..6d38d85f 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedLightIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSolarizedLightIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSolarizedLightIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Solarized Light"; + + public static boolean install() { try { return install( new FlatSolarizedLightIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSolarizedLightIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSolarizedLightIJTheme.class ); + } + public FlatSolarizedLightIJTheme() { super( Utils.loadTheme( "SolarizedLight.theme.json" ) ); } @Override public String getName() { - return "Solarized Light"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSpacegrayIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSpacegrayIJTheme.java index 4ebb788d..91769118 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSpacegrayIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatSpacegrayIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSpacegrayIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Spacegray"; + + public static boolean install() { try { return install( new FlatSpacegrayIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSpacegrayIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSpacegrayIJTheme.class ); + } + public FlatSpacegrayIJTheme() { super( Utils.loadTheme( "Spacegray.theme.json" ) ); } @Override public String getName() { - return "Spacegray"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatVuesionIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatVuesionIJTheme.java index 33a2d43b..ab5bee78 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatVuesionIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatVuesionIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatVuesionIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Vuesion"; + + public static boolean install() { try { return install( new FlatVuesionIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatVuesionIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatVuesionIJTheme.class ); + } + public FlatVuesionIJTheme() { super( Utils.loadTheme( "vuesion_theme.theme.json" ) ); } @Override public String getName() { - return "Vuesion"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkContrastIJTheme.java index b060a123..3618b615 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatArcDarkContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Arc Dark Contrast (Material)"; + + public static boolean install() { try { return install( new FlatArcDarkContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatArcDarkContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatArcDarkContrastIJTheme.class ); + } + public FlatArcDarkContrastIJTheme() { super( Utils.loadTheme( "Arc Dark Contrast.theme.json" ) ); } @Override public String getName() { - return "Arc Dark Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkIJTheme.java index 2a353fa2..ba1629fc 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatArcDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatArcDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Arc Dark (Material)"; + + public static boolean install() { try { return install( new FlatArcDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatArcDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatArcDarkIJTheme.class ); + } + public FlatArcDarkIJTheme() { super( Utils.loadTheme( "Arc Dark.theme.json" ) ); } @Override public String getName() { - return "Arc Dark (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkContrastIJTheme.java index 56d64cbe..f05db9a0 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatAtomOneDarkContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Atom One Dark Contrast (Material)"; + + public static boolean install() { try { return install( new FlatAtomOneDarkContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatAtomOneDarkContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatAtomOneDarkContrastIJTheme.class ); + } + public FlatAtomOneDarkContrastIJTheme() { super( Utils.loadTheme( "Atom One Dark Contrast.theme.json" ) ); } @Override public String getName() { - return "Atom One Dark Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkIJTheme.java index 0c4ef7d8..f7344cce 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatAtomOneDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Atom One Dark (Material)"; + + public static boolean install() { try { return install( new FlatAtomOneDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatAtomOneDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatAtomOneDarkIJTheme.class ); + } + public FlatAtomOneDarkIJTheme() { super( Utils.loadTheme( "Atom One Dark.theme.json" ) ); } @Override public String getName() { - return "Atom One Dark (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightContrastIJTheme.java index 217d2eb8..f003e87f 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatAtomOneLightContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Atom One Light Contrast (Material)"; + + public static boolean install() { try { return install( new FlatAtomOneLightContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatAtomOneLightContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatAtomOneLightContrastIJTheme.class ); + } + public FlatAtomOneLightContrastIJTheme() { super( Utils.loadTheme( "Atom One Light Contrast.theme.json" ) ); } @Override public String getName() { - return "Atom One Light Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightIJTheme.java index f07491c3..4b31ca33 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatAtomOneLightIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatAtomOneLightIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Atom One Light (Material)"; + + public static boolean install() { try { return install( new FlatAtomOneLightIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatAtomOneLightIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatAtomOneLightIJTheme.class ); + } + public FlatAtomOneLightIJTheme() { super( Utils.loadTheme( "Atom One Light.theme.json" ) ); } @Override public String getName() { - return "Atom One Light (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaContrastIJTheme.java index d0481718..da2cb3d0 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatDraculaContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Dracula Contrast (Material)"; + + public static boolean install() { try { return install( new FlatDraculaContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatDraculaContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatDraculaContrastIJTheme.class ); + } + public FlatDraculaContrastIJTheme() { super( Utils.loadTheme( "Dracula Contrast.theme.json" ) ); } @Override public String getName() { - return "Dracula Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaIJTheme.java index 50328f8e..e567b8c6 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatDraculaIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatDraculaIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Dracula (Material)"; + + public static boolean install() { try { return install( new FlatDraculaIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatDraculaIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatDraculaIJTheme.class ); + } + public FlatDraculaIJTheme() { super( Utils.loadTheme( "Dracula.theme.json" ) ); } @Override public String getName() { - return "Dracula (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubContrastIJTheme.java index fa324a56..661852fe 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGitHubContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "GitHub Contrast (Material)"; + + public static boolean install() { try { return install( new FlatGitHubContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGitHubContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGitHubContrastIJTheme.class ); + } + public FlatGitHubContrastIJTheme() { super( Utils.loadTheme( "GitHub Contrast.theme.json" ) ); } @Override public String getName() { - return "GitHub Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubIJTheme.java index e2fd0b52..d917e385 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatGitHubIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatGitHubIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "GitHub (Material)"; + + public static boolean install() { try { return install( new FlatGitHubIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatGitHubIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatGitHubIJTheme.class ); + } + public FlatGitHubIJTheme() { super( Utils.loadTheme( "GitHub.theme.json" ) ); } @Override public String getName() { - return "GitHub (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlContrastIJTheme.java index 9e118369..0580e316 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatLightOwlContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Light Owl Contrast (Material)"; + + public static boolean install() { try { return install( new FlatLightOwlContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatLightOwlContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatLightOwlContrastIJTheme.class ); + } + public FlatLightOwlContrastIJTheme() { super( Utils.loadTheme( "Light Owl Contrast.theme.json" ) ); } @Override public String getName() { - return "Light Owl Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlIJTheme.java index cd6ff97d..15d01d1e 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatLightOwlIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatLightOwlIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Light Owl (Material)"; + + public static boolean install() { try { return install( new FlatLightOwlIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatLightOwlIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatLightOwlIJTheme.class ); + } + public FlatLightOwlIJTheme() { super( Utils.loadTheme( "Light Owl.theme.json" ) ); } @Override public String getName() { - return "Light Owl (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerContrastIJTheme.java index 7cb4904d..09b0950a 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialDarkerContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Darker Contrast (Material)"; + + public static boolean install() { try { return install( new FlatMaterialDarkerContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialDarkerContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialDarkerContrastIJTheme.class ); + } + public FlatMaterialDarkerContrastIJTheme() { super( Utils.loadTheme( "Material Darker Contrast.theme.json" ) ); } @Override public String getName() { - return "Material Darker Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerIJTheme.java index f6068d0b..fe563e91 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDarkerIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialDarkerIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Darker (Material)"; + + public static boolean install() { try { return install( new FlatMaterialDarkerIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialDarkerIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialDarkerIJTheme.class ); + } + public FlatMaterialDarkerIJTheme() { super( Utils.loadTheme( "Material Darker.theme.json" ) ); } @Override public String getName() { - return "Material Darker (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanContrastIJTheme.java index d820276a..07370b88 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialDeepOceanContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Deep Ocean Contrast (Material)"; + + public static boolean install() { try { return install( new FlatMaterialDeepOceanContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialDeepOceanContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialDeepOceanContrastIJTheme.class ); + } + public FlatMaterialDeepOceanContrastIJTheme() { super( Utils.loadTheme( "Material Deep Ocean Contrast.theme.json" ) ); } @Override public String getName() { - return "Material Deep Ocean Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanIJTheme.java index b25be4f4..61b6ab7f 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialDeepOceanIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialDeepOceanIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Deep Ocean (Material)"; + + public static boolean install() { try { return install( new FlatMaterialDeepOceanIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialDeepOceanIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialDeepOceanIJTheme.class ); + } + public FlatMaterialDeepOceanIJTheme() { super( Utils.loadTheme( "Material Deep Ocean.theme.json" ) ); } @Override public String getName() { - return "Material Deep Ocean (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterContrastIJTheme.java index 44d38bca..b4e7ac5a 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialLighterContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Lighter Contrast (Material)"; + + public static boolean install() { try { return install( new FlatMaterialLighterContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialLighterContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialLighterContrastIJTheme.class ); + } + public FlatMaterialLighterContrastIJTheme() { super( Utils.loadTheme( "Material Lighter Contrast.theme.json" ) ); } @Override public String getName() { - return "Material Lighter Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterIJTheme.java index 3fe72fa6..a364af21 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialLighterIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialLighterIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Lighter (Material)"; + + public static boolean install() { try { return install( new FlatMaterialLighterIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialLighterIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialLighterIJTheme.class ); + } + public FlatMaterialLighterIJTheme() { super( Utils.loadTheme( "Material Lighter.theme.json" ) ); } @Override public String getName() { - return "Material Lighter (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicContrastIJTheme.java index 1f0ef905..37ce207d 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialOceanicContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Oceanic Contrast (Material)"; + + public static boolean install() { try { return install( new FlatMaterialOceanicContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialOceanicContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialOceanicContrastIJTheme.class ); + } + public FlatMaterialOceanicContrastIJTheme() { super( Utils.loadTheme( "Material Oceanic Contrast.theme.json" ) ); } @Override public String getName() { - return "Material Oceanic Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicIJTheme.java index b981ff86..662ebe82 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialOceanicIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialOceanicIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Oceanic (Material)"; + + public static boolean install() { try { return install( new FlatMaterialOceanicIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialOceanicIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialOceanicIJTheme.class ); + } + public FlatMaterialOceanicIJTheme() { super( Utils.loadTheme( "Material Oceanic.theme.json" ) ); } @Override public String getName() { - return "Material Oceanic (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightContrastIJTheme.java index 554af48a..e9b3006b 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialPalenightContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Palenight Contrast (Material)"; + + public static boolean install() { try { return install( new FlatMaterialPalenightContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialPalenightContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialPalenightContrastIJTheme.class ); + } + public FlatMaterialPalenightContrastIJTheme() { super( Utils.loadTheme( "Material Palenight Contrast.theme.json" ) ); } @Override public String getName() { - return "Material Palenight Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightIJTheme.java index e249e466..97e5423d 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMaterialPalenightIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMaterialPalenightIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Material Palenight (Material)"; + + public static boolean install() { try { return install( new FlatMaterialPalenightIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMaterialPalenightIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMaterialPalenightIJTheme.class ); + } + public FlatMaterialPalenightIJTheme() { super( Utils.loadTheme( "Material Palenight.theme.json" ) ); } @Override public String getName() { - return "Material Palenight (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProContrastIJTheme.java index 9c7dce78..d97a5206 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMonokaiProContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Monokai Pro Contrast (Material)"; + + public static boolean install() { try { return install( new FlatMonokaiProContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMonokaiProContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMonokaiProContrastIJTheme.class ); + } + public FlatMonokaiProContrastIJTheme() { super( Utils.loadTheme( "Monokai Pro Contrast.theme.json" ) ); } @Override public String getName() { - return "Monokai Pro Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProIJTheme.java index 22cf5fd3..66eaa2cf 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMonokaiProIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatMonokaiProIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Monokai Pro (Material)"; + + public static boolean install() { try { return install( new FlatMonokaiProIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatMonokaiProIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatMonokaiProIJTheme.class ); + } + public FlatMonokaiProIJTheme() { super( Utils.loadTheme( "Monokai Pro.theme.json" ) ); } @Override public String getName() { - return "Monokai Pro (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlContrastIJTheme.java index 56ab42d6..b3879bd3 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatNightOwlContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Night Owl Contrast (Material)"; + + public static boolean install() { try { return install( new FlatNightOwlContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatNightOwlContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatNightOwlContrastIJTheme.class ); + } + public FlatNightOwlContrastIJTheme() { super( Utils.loadTheme( "Night Owl Contrast.theme.json" ) ); } @Override public String getName() { - return "Night Owl Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlIJTheme.java index ec0a59be..7709c393 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatNightOwlIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatNightOwlIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Night Owl (Material)"; + + public static boolean install() { try { return install( new FlatNightOwlIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatNightOwlIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatNightOwlIJTheme.class ); + } + public FlatNightOwlIJTheme() { super( Utils.loadTheme( "Night Owl.theme.json" ) ); } @Override public String getName() { - return "Night Owl (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkContrastIJTheme.java index 15c44e40..7fb4f680 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSolarizedDarkContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Solarized Dark Contrast (Material)"; + + public static boolean install() { try { return install( new FlatSolarizedDarkContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSolarizedDarkContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSolarizedDarkContrastIJTheme.class ); + } + public FlatSolarizedDarkContrastIJTheme() { super( Utils.loadTheme( "Solarized Dark Contrast.theme.json" ) ); } @Override public String getName() { - return "Solarized Dark Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkIJTheme.java index cdc8c987..28edbb88 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedDarkIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSolarizedDarkIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Solarized Dark (Material)"; + + public static boolean install() { try { return install( new FlatSolarizedDarkIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSolarizedDarkIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSolarizedDarkIJTheme.class ); + } + public FlatSolarizedDarkIJTheme() { super( Utils.loadTheme( "Solarized Dark.theme.json" ) ); } @Override public String getName() { - return "Solarized Dark (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightContrastIJTheme.java index 777e34e2..98ba17ef 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightContrastIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightContrastIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSolarizedLightContrastIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Solarized Light Contrast (Material)"; + + public static boolean install() { try { return install( new FlatSolarizedLightContrastIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSolarizedLightContrastIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSolarizedLightContrastIJTheme.class ); + } + public FlatSolarizedLightContrastIJTheme() { super( Utils.loadTheme( "Solarized Light Contrast.theme.json" ) ); } @Override public String getName() { - return "Solarized Light Contrast (Material)"; + return NAME; } } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightIJTheme.java index 2be96d0a..104e4c68 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightIJTheme.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatSolarizedLightIJTheme.java @@ -14,13 +14,13 @@ * limitations under the License. */ +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // -package com.formdev.flatlaf.intellijthemes.materialthemeuilite; - import com.formdev.flatlaf.IntelliJTheme; /** @@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme; public class FlatSolarizedLightIJTheme extends IntelliJTheme.ThemeLaf { - public static boolean install( ) { + public static final String NAME = "Solarized Light (Material)"; + + public static boolean install() { try { return install( new FlatSolarizedLightIJTheme() ); } catch( RuntimeException ex ) { @@ -37,12 +39,16 @@ public class FlatSolarizedLightIJTheme } } + public static void installLafInfo() { + installLafInfo( NAME, FlatSolarizedLightIJTheme.class ); + } + public FlatSolarizedLightIJTheme() { super( Utils.loadTheme( "Solarized Light.theme.json" ) ); } @Override public String getName() { - return "Solarized Light (Material)"; + return NAME; } } From f149d2b7cda3668fb16923f983b5c58fb21c964d Mon Sep 17 00:00:00 2001 From: mmatessi <17149962+basix86@users.noreply.github.com> Date: Fri, 27 Nov 2020 19:14:28 +0100 Subject: [PATCH 039/178] MenuBar.underlineSelectionColor --- .../com/formdev/flatlaf/ui/FlatMenuItemRenderer.java | 4 ++-- .../src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java | 9 ++++++--- .../resources/com/formdev/flatlaf/FlatLaf.properties | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java index b49d2df1..6c1d6b24 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java @@ -246,7 +246,7 @@ public class FlatMenuItemRenderer g.setColor( Color.orange ); g.drawRect( arrowRect.x, arrowRect.y, arrowRect.width - 1, arrowRect.height - 1 ); debug*/ - paintBackground( g, selectionBackground ); + paintBackground( g, selectionBackground, underlineSelectionColor ); paintIcon( g, iconRect, getIconForPainting() ); paintText( g, textRect, menuItem.getText(), selectionForeground, disabledForeground ); paintAccelerator( g, accelRect, getAcceleratorText(), acceleratorForeground, acceleratorSelectionForeground, disabledForeground ); @@ -254,7 +254,7 @@ debug*/ paintArrowIcon( g, arrowRect, arrowIcon ); } - protected void paintBackground( Graphics g, Color selectionBackground ) { + protected void paintBackground( Graphics g, Color selectionBackground, Color underlineSelectionColor ) { boolean armedOrSelected = isArmedOrSelected( menuItem ); if( menuItem.isOpaque() || armedOrSelected ) { int width = menuItem.getWidth(); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java index 503e3981..2edfc3b2 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java @@ -60,13 +60,16 @@ import javax.swing.plaf.basic.BasicMenuUI; * * * @uiDefault MenuItem.iconTextGap int - * @uiDefault MenuBar.hoverBackground Color + * @uiDefault MenuBar.hoverBackground + * @uiDefault MenuBar.underlineSelectionColor Color * * @author Karl Tauber */ public class FlatMenuUI extends BasicMenuUI { + protected final Color menuBarUnderlineSelectionColor = UIManager.getColor( "MenuBar.underlineSelectionColor" ); + private Color hoverBackground; private FlatMenuItemRenderer renderer; @@ -154,7 +157,7 @@ public class FlatMenuUI } @Override - protected void paintBackground( Graphics g, Color selectionBackground ) { + protected void paintBackground( Graphics g, Color selectionBackground, Color menuItemUnderlineSelectionColor ) { ButtonModel model = menuItem.getModel(); if( model.isRollover() && !model.isArmed() && !model.isSelected() && model.isEnabled() && ((JMenu)menuItem).isTopLevelMenu() ) @@ -162,7 +165,7 @@ public class FlatMenuUI g.setColor( deriveBackground( hoverBackground ) ); g.fillRect( 0, 0, menuItem.getWidth(), menuItem.getHeight() ); } else - super.paintBackground( g, selectionBackground ); + super.paintBackground( g, selectionBackground, ((JMenu)menuItem).isTopLevelMenu() ? menuBarUnderlineSelectionColor : menuItemUnderlineSelectionColor ); } } } 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 0b94527b..ac52502d 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -337,6 +337,7 @@ MenuBar.border=com.formdev.flatlaf.ui.FlatMenuBarBorder MenuBar.background=@menuBackground MenuBar.hoverBackground=@menuHoverBackground MenuBar.itemMargins=3,8,3,8 +MenuBar.underlineSelectionColor=$TabbedPane.underlineColor #---- MenuItem ---- From d0ffc4f97910fa95c42cdae1d9b7e6ffc438863f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 28 Nov 2020 11:21:46 +0100 Subject: [PATCH 040/178] TabbedPane: support hiding tab area if it contains only one tab --- CHANGELOG.md | 3 +- .../formdev/flatlaf/FlatClientProperties.java | 10 +++++- .../formdev/flatlaf/ui/FlatTabbedPaneUI.java | 33 ++++++++++++++++++- .../flatlaf/testing/FlatContainerTest.java | 13 ++++++++ .../flatlaf/testing/FlatContainerTest.jfd | 12 ++++++- 5 files changed, 67 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2a186e..5830963a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ FlatLaf Change Log - Added "Gradianto Nature Green" theme. - Updated "Arc Dark", "Cyan", "Dark purple", "Gradianto", "Gray", "Gruvbox" and "One Dark" themes. - +- TabbedPane: Support hiding tab area if it contains only one tab. (set client + property `JTabbedPane.hideTabAreaWithOneTab` to `true`) #### Fixed bugs diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java index 7011e39c..4cbdb775 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java @@ -219,7 +219,7 @@ public interface FlatClientProperties */ String MENU_BAR_EMBEDDED = "JRootPane.menuBarEmbedded"; - //---- JScrollBar --------------------------------------------------------- + //---- JScrollBar / JScrollPane ------------------------------------------- /** * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. @@ -263,6 +263,14 @@ public interface FlatClientProperties */ String TABBED_PANE_HAS_FULL_BORDER = "JTabbedPane.hasFullBorder"; + /** + * Specifies whether the tab area should be hidded if it contains only one tab. + *

+ * Component {@link javax.swing.JTabbedPane}
+ * Value type {@link java.lang.Boolean} + */ + String TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB = "JTabbedPane.hideTabAreaWithOneTab"; + /** * Specifies the minimum width of a tab. *

diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java index 013f397d..7438dbf7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java @@ -693,6 +693,26 @@ public class FlatTabbedPaneUI return Math.max( tabHeight, scale( clientPropertyInt( tabPane, TABBED_PANE_TAB_HEIGHT, this.tabHeight ) ) ); } + @Override + protected int calculateMaxTabWidth( int tabPlacement ) { + return hideTabArea() ? 0 : super.calculateMaxTabWidth( tabPlacement ); + } + + @Override + protected int calculateMaxTabHeight( int tabPlacement ) { + return hideTabArea() ? 0 : super.calculateMaxTabHeight( tabPlacement ); + } + + @Override + protected int calculateTabAreaWidth( int tabPlacement, int vertRunCount, int maxTabWidth ) { + return hideTabArea() ? 0 : super.calculateTabAreaWidth( tabPlacement, vertRunCount, maxTabWidth ); + } + + @Override + protected int calculateTabAreaHeight( int tabPlacement, int horizRunCount, int maxTabHeight ) { + return hideTabArea() ? 0 : super.calculateTabAreaHeight( tabPlacement, horizRunCount, maxTabHeight ); + } + @Override protected Insets getTabInsets( int tabPlacement, int tabIndex ) { Object value = getTabClientProperty( tabIndex, TABBED_PANE_TAB_INSETS ); @@ -752,7 +772,7 @@ public class FlatTabbedPaneUI */ @Override protected Insets getContentBorderInsets( int tabPlacement ) { - if( contentSeparatorHeight == 0 || !clientPropertyBoolean( tabPane, TABBED_PANE_SHOW_CONTENT_SEPARATOR, true ) ) + if( hideTabArea() || contentSeparatorHeight == 0 || !clientPropertyBoolean( tabPane, TABBED_PANE_SHOW_CONTENT_SEPARATOR, true ) ) return new Insets( 0, 0, 0, 0 ); boolean hasFullBorder = clientPropertyBoolean( tabPane, TABBED_PANE_HAS_FULL_BORDER, this.hasFullBorder ); @@ -787,6 +807,9 @@ public class FlatTabbedPaneUI @Override public void paint( Graphics g, JComponent c ) { + if( hideTabArea() ) + return; + ensureCurrentLayout(); int tabPlacement = tabPane.getTabPlacement(); @@ -1226,6 +1249,13 @@ public class FlatTabbedPaneUI return UIManager.getBoolean( "ScrollPane.smoothScrolling" ); } + protected boolean hideTabArea() { + return tabPane.getTabCount() == 1 && + leadingComponent == null && + trailingComponent == null && + clientPropertyBoolean( tabPane, TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB, false ); + } + protected int getTabsPopupPolicy() { Object value = tabPane.getClientProperty( TABBED_PANE_TABS_POPUP_POLICY ); @@ -2193,6 +2223,7 @@ public class FlatTabbedPaneUI case TABBED_PANE_SHOW_TAB_SEPARATORS: case TABBED_PANE_SHOW_CONTENT_SEPARATOR: case TABBED_PANE_HAS_FULL_BORDER: + case TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB: case TABBED_PANE_MINIMUM_TAB_WIDTH: case TABBED_PANE_MAXIMUM_TAB_WIDTH: case TABBED_PANE_TAB_HEIGHT: diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java index d950fedf..4fdc86af 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java @@ -78,6 +78,11 @@ public class FlatContainerTest putTabbedPanesClientProperty( TABBED_PANE_SHOW_CONTENT_SEPARATOR, showContentSeparator ); } + private void hideTabAreaWithOneTabChanged() { + boolean hideTabAreaWithOneTab = hideTabAreaWithOneTabCheckBox.isSelected(); + putTabbedPanesClientProperty( TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB, hideTabAreaWithOneTab ); + } + private void hasFullBorderChanged() { Boolean hasFullBorder = hasFullBorderCheckBox.isSelected() ? true : null; putTabbedPanesClientProperty( TABBED_PANE_HAS_FULL_BORDER, hasFullBorder ); @@ -461,6 +466,7 @@ public class FlatContainerTest maximumTabWidthCheckBox = new JCheckBox(); showTabSeparatorsCheckBox = new JCheckBox(); secondTabWiderCheckBox = new JCheckBox(); + hideTabAreaWithOneTabCheckBox = new JCheckBox(); CellConstraints cc = new CellConstraints(); //======== this ======== @@ -579,6 +585,7 @@ public class FlatContainerTest "[]" + "[]para" + "[]" + + "[]" + "[]")); //---- tabScrollCheckBox ---- @@ -800,6 +807,11 @@ public class FlatContainerTest secondTabWiderCheckBox.setText("Second Tab insets wider (4,20,4,20)"); secondTabWiderCheckBox.addActionListener(e -> secondTabWiderChanged()); tabbedPaneControlPanel.add(secondTabWiderCheckBox, "cell 2 9"); + + //---- hideTabAreaWithOneTabCheckBox ---- + hideTabAreaWithOneTabCheckBox.setText("Hide tab area with one tab"); + hideTabAreaWithOneTabCheckBox.addActionListener(e -> hideTabAreaWithOneTabChanged()); + tabbedPaneControlPanel.add(hideTabAreaWithOneTabCheckBox, "cell 1 10"); } panel9.add(tabbedPaneControlPanel, cc.xywh(1, 11, 3, 1)); } @@ -844,6 +856,7 @@ public class FlatContainerTest private JCheckBox maximumTabWidthCheckBox; private JCheckBox showTabSeparatorsCheckBox; private JCheckBox secondTabWiderCheckBox; + private JCheckBox hideTabAreaWithOneTabCheckBox; // JFormDesigner - End of variables declaration //GEN-END:variables private JTabbedPane[] allTabbedPanes; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd index 47954bc0..205708ed 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd @@ -132,7 +132,7 @@ new FormModel { add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestFrame$NoRightToLeftPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 0,hidemode 3" "$columnConstraints": "[][fill][]" - "$rowConstraints": "[center][][][][][]para[][]para[][]" + "$rowConstraints": "[center][][][][][]para[][]para[][][]" } ) { name: "tabbedPaneControlPanel" "opaque": false @@ -547,6 +547,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 9" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "hideTabAreaWithOneTabCheckBox" + "text": "Hide tab area with one tab" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hideTabAreaWithOneTabChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 10" + } ) }, new FormLayoutConstraints( class com.jgoodies.forms.layout.CellConstraints ) { "gridY": 11 "gridWidth": 3 From 0d66d9f9a339edc4780b3bf7fd5f5c0256fe9bd7 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 28 Nov 2020 12:29:13 +0100 Subject: [PATCH 041/178] FlatCheckBoxIcon: - added parameter `Component c` to all paint methods so that subclasses can access component states - extracted methods to get colors and selected/indeterminate state --- .../flatlaf/icons/FlatCheckBoxIcon.java | 99 ++++++++++++------- .../flatlaf/icons/FlatRadioButtonIcon.java | 17 ++-- 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java index 4b4a74e6..b728c675 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java @@ -129,78 +129,101 @@ public class FlatCheckBoxIcon } @Override - protected void paintIcon( Component c, Graphics2D g2 ) { - boolean indeterminate = c instanceof JComponent && clientPropertyEquals( (JComponent) c, SELECTED_STATE, SELECTED_STATE_INDETERMINATE ); - boolean selected = indeterminate || (c instanceof AbstractButton && ((AbstractButton)c).isSelected()); + protected void paintIcon( Component c, Graphics2D g ) { + boolean indeterminate = isIndeterminate( c ); + boolean selected = indeterminate || isSelected( c ); boolean isFocused = FlatUIUtils.isPermanentFocusOwner( c ); // paint focused border if( isFocused && focusWidth > 0 && FlatButtonUI.isFocusPainted( c ) ) { - g2.setColor( focusColor ); - paintFocusBorder( g2 ); + g.setColor( getFocusColor( c ) ); + paintFocusBorder( c, g ); } // paint border - g2.setColor( FlatButtonUI.buttonStateColor( c, - selected ? selectedBorderColor : borderColor, - disabledBorderColor, - selected && selectedFocusedBorderColor != null ? selectedFocusedBorderColor : focusedBorderColor, - hoverBorderColor, - null ) ); - paintBorder( g2 ); + g.setColor( getBorderColor( c, selected ) ); + paintBorder( c, g ); // paint background - g2.setColor( FlatUIUtils.deriveColor( FlatButtonUI.buttonStateColor( c, - selected ? selectedBackground : background, - disabledBackground, - (selected && selectedFocusedBackground != null) ? selectedFocusedBackground : focusedBackground, - (selected && selectedHoverBackground != null) ? selectedHoverBackground : hoverBackground, - (selected && selectedPressedBackground != null) ? selectedPressedBackground : pressedBackground ), - background ) ); - paintBackground( g2 ); + g.setColor( FlatUIUtils.deriveColor( getBackground( c, selected ), background ) ); + paintBackground( c, g ); // paint checkmark if( selected || indeterminate ) { - g2.setColor( c.isEnabled() - ? ((selected && isFocused && selectedFocusedCheckmarkColor != null) - ? selectedFocusedCheckmarkColor - : checkmarkColor) - : disabledCheckmarkColor ); + g.setColor( getCheckmarkColor( c, selected, isFocused ) ); if( indeterminate ) - paintIndeterminate( g2 ); + paintIndeterminate( c, g ); else - paintCheckmark( g2 ); + paintCheckmark( c, g ); } } - protected void paintFocusBorder( Graphics2D g2 ) { + protected void paintFocusBorder( Component c, Graphics2D g ) { // the outline focus border is painted outside of the icon int wh = ICON_SIZE - 1 + (focusWidth * 2); int arcwh = arc + (focusWidth * 2); - g2.fillRoundRect( -focusWidth + 1, -focusWidth, wh, wh, arcwh, arcwh ); + g.fillRoundRect( -focusWidth + 1, -focusWidth, wh, wh, arcwh, arcwh ); } - protected void paintBorder( Graphics2D g2 ) { + protected void paintBorder( Component c, Graphics2D g ) { int arcwh = arc; - g2.fillRoundRect( 1, 0, 14, 14, arcwh, arcwh ); + g.fillRoundRect( 1, 0, 14, 14, arcwh, arcwh ); } - protected void paintBackground( Graphics2D g2 ) { + protected void paintBackground( Component c, Graphics2D g ) { int arcwh = arc - 1; - g2.fillRoundRect( 2, 1, 12, 12, arcwh, arcwh ); + g.fillRoundRect( 2, 1, 12, 12, arcwh, arcwh ); } - protected void paintCheckmark( Graphics2D g2 ) { + protected void paintCheckmark( Component c, Graphics2D g ) { Path2D.Float path = new Path2D.Float(); path.moveTo( 4.5f, 7.5f ); path.lineTo( 6.6f, 10f ); path.lineTo( 11.25f, 3.5f ); - g2.setStroke( new BasicStroke( 1.9f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND ) ); - g2.draw( path ); + g.setStroke( new BasicStroke( 1.9f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND ) ); + g.draw( path ); } - protected void paintIndeterminate( Graphics2D g2 ) { - g2.fill( new RoundRectangle2D.Float( 3.75f, 5.75f, 8.5f, 2.5f, 2f, 2f ) ); + protected void paintIndeterminate( Component c, Graphics2D g ) { + g.fill( new RoundRectangle2D.Float( 3.75f, 5.75f, 8.5f, 2.5f, 2f, 2f ) ); + } + + protected boolean isIndeterminate( Component c ) { + return c instanceof JComponent && clientPropertyEquals( (JComponent) c, SELECTED_STATE, SELECTED_STATE_INDETERMINATE ); + } + + protected boolean isSelected( Component c ) { + return c instanceof AbstractButton && ((AbstractButton)c).isSelected(); + } + + protected Color getFocusColor( Component c ) { + return focusColor; + } + + protected Color getBorderColor( Component c, boolean selected ) { + return FlatButtonUI.buttonStateColor( c, + selected ? selectedBorderColor : borderColor, + disabledBorderColor, + selected && selectedFocusedBorderColor != null ? selectedFocusedBorderColor : focusedBorderColor, + hoverBorderColor, + null ); + } + + protected Color getBackground( Component c, boolean selected ) { + return FlatButtonUI.buttonStateColor( c, + selected ? selectedBackground : background, + disabledBackground, + (selected && selectedFocusedBackground != null) ? selectedFocusedBackground : focusedBackground, + (selected && selectedHoverBackground != null) ? selectedHoverBackground : hoverBackground, + (selected && selectedPressedBackground != null) ? selectedPressedBackground : pressedBackground ); + } + + protected Color getCheckmarkColor( Component c, boolean selected, boolean isFocused ) { + return c.isEnabled() + ? ((selected && isFocused && selectedFocusedCheckmarkColor != null) + ? selectedFocusedCheckmarkColor + : checkmarkColor) + : disabledCheckmarkColor; } } diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatRadioButtonIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatRadioButtonIcon.java index 16c74bf8..06095b0f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatRadioButtonIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatRadioButtonIcon.java @@ -16,6 +16,7 @@ package com.formdev.flatlaf.icons; +import java.awt.Component; import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; @@ -36,25 +37,25 @@ public class FlatRadioButtonIcon protected final int centerDiameter = getUIInt( "RadioButton.icon.centerDiameter", 8, style ); @Override - protected void paintFocusBorder( Graphics2D g2 ) { + protected void paintFocusBorder( Component c, Graphics2D g ) { // the outline focus border is painted outside of the icon int wh = ICON_SIZE + (focusWidth * 2); - g2.fillOval( -focusWidth, -focusWidth, wh, wh ); + g.fillOval( -focusWidth, -focusWidth, wh, wh ); } @Override - protected void paintBorder( Graphics2D g2 ) { - g2.fillOval( 0, 0, 15, 15 ); + protected void paintBorder( Component c, Graphics2D g ) { + g.fillOval( 0, 0, 15, 15 ); } @Override - protected void paintBackground( Graphics2D g2 ) { - g2.fillOval( 1, 1, 13, 13 ); + protected void paintBackground( Component c, Graphics2D g ) { + g.fillOval( 1, 1, 13, 13 ); } @Override - protected void paintCheckmark( Graphics2D g2 ) { + protected void paintCheckmark( Component c, Graphics2D g ) { float xy = (ICON_SIZE - centerDiameter) / 2f; - g2.fill( new Ellipse2D.Float( xy, xy, centerDiameter, centerDiameter ) ); + g.fill( new Ellipse2D.Float( xy, xy, centerDiameter, centerDiameter ) ); } } From aefed7c481f6dbaae7e772bc60ce387602274c84 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 28 Nov 2020 22:04:12 +0100 Subject: [PATCH 042/178] Table: do not paint last vertical grid line if auto-resize mode is not off (issue #46) --- CHANGELOG.md | 3 + .../com/formdev/flatlaf/ui/FlatTableUI.java | 58 +++++++++++++++++++ .../flatlaf/testing/FlatComponents2Test.java | 51 +++++++++++++--- .../flatlaf/testing/FlatComponents2Test.jfd | 45 ++++++++++---- 4 files changed, 139 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5830963a..e5970c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ FlatLaf Change Log and "One Dark" themes. - TabbedPane: Support hiding tab area if it contains only one tab. (set client property `JTabbedPane.hideTabAreaWithOneTab` to `true`) +- Table: Do not paint last vertical grid line if auto-resize mode is not off. + (issue #46) + #### Fixed bugs diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java index 51aff9ca..ed67da8a 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java @@ -19,15 +19,19 @@ package com.formdev.flatlaf.ui; import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; +import java.awt.Graphics; +import java.awt.Graphics2D; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import javax.swing.JCheckBox; import javax.swing.JComponent; +import javax.swing.JTable; import javax.swing.LookAndFeel; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicTableUI; import javax.swing.table.TableCellRenderer; +import com.formdev.flatlaf.util.Graphics2DProxy; import com.formdev.flatlaf.util.UIScale; /** @@ -203,4 +207,58 @@ public class FlatTableUI table.setSelectionForeground( selectionInactiveForeground ); } } + + @Override + public void paint( Graphics g, JComponent c ) { + if( table.getShowVerticalLines() ) { + // fix grid painting issues in BasicTableUI + // - do not paint last vertical grid line if auto-resize mode is not off + // - in right-to-left component orientation, do not paint last vertical grid line + // in any auto-resize mode; can not paint on left side of table because + // cells are painted over left line + + boolean hideLastVerticalLine = + table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF || + !table.getComponentOrientation().isLeftToRight(); + int tableWidth = table.getWidth(); + + // Java 8 uses drawLine() to paint grid lines + // Java 9+ uses fillRect() to paint grid lines + g = new Graphics2DProxy( (Graphics2D) g ) { + @Override + public void drawLine( int x1, int y1, int x2, int y2 ) { + // do not paint last vertical line + if( hideLastVerticalLine && + x1 == x2 && y1 == 0 && x1 == tableWidth - 1 && + wasInvokedFromPaintGrid() ) + return; + + super.drawLine( x1, y1, x2, y2 ); + } + + @Override + public void fillRect( int x, int y, int width, int height ) { + // do not paint last vertical line + if( hideLastVerticalLine && + width == 1 && y == 0 && x == tableWidth - 1 && + wasInvokedFromPaintGrid() ) + return; + + super.fillRect( x, y, width, height ); + } + + private boolean wasInvokedFromPaintGrid() { + StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); + for( int i = 0; i < 10 || i < stackTrace.length; i++ ) { + if( "javax.swing.plaf.basic.BasicTableUI".equals( stackTrace[i].getClassName() ) && + "paintGrid".equals( stackTrace[i].getMethodName() ) ) + return true; + } + return false; + } + }; + } + + super.paint( g, c ); + } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java index dc01cd27..370ad4bc 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java @@ -121,6 +121,21 @@ public class FlatComponents2Test tableModel.setRowCount( (Integer) tableRowCountSpinner.getValue() ); } + private void autoResizeModeChanged() { + int autoResizeMode = JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS; + Object sel = autoResizeModeField.getSelectedItem(); + if( sel instanceof String ) { + switch( (String) sel ) { + case "off": autoResizeMode = JTable.AUTO_RESIZE_OFF; break; + case "nextColumn": autoResizeMode = JTable.AUTO_RESIZE_NEXT_COLUMN; break; + case "subsequentColumns": autoResizeMode = JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS; break; + case "lastColumn": autoResizeMode = JTable.AUTO_RESIZE_LAST_COLUMN; break; + case "allColumns": autoResizeMode = JTable.AUTO_RESIZE_ALL_COLUMNS; break; + } + } + table1.setAutoResizeMode( autoResizeMode ); + } + private void dndChanged() { boolean dnd = dndCheckBox.isSelected(); list1.setDragEnabled( dnd ); @@ -225,6 +240,8 @@ public class FlatComponents2Test JPanel tableOptionsPanel = new JPanel(); JLabel tableRowCountLabel = new JLabel(); tableRowCountSpinner = new JSpinner(); + JLabel autoResizeModeLabel = new JLabel(); + autoResizeModeField = new JComboBox<>(); showHorizontalLinesCheckBox = new JCheckBox(); showVerticalLinesCheckBox = new JCheckBox(); intercellSpacingCheckBox = new JCheckBox(); @@ -367,6 +384,7 @@ public class FlatComponents2Test "[90,fill]", // rows "[]" + + "[]" + "[]0" + "[]0" + "[]0" + @@ -385,47 +403,63 @@ public class FlatComponents2Test tableRowCountSpinner.addChangeListener(e -> tableRowCountChanged()); tableOptionsPanel.add(tableRowCountSpinner, "cell 1 0"); + //---- autoResizeModeLabel ---- + autoResizeModeLabel.setText("Auto resize mode:"); + tableOptionsPanel.add(autoResizeModeLabel, "cell 0 1"); + + //---- autoResizeModeField ---- + autoResizeModeField.setModel(new DefaultComboBoxModel<>(new String[] { + "off", + "nextColumn", + "subsequentColumns", + "lastColumn", + "allColumns" + })); + autoResizeModeField.setSelectedIndex(2); + autoResizeModeField.addActionListener(e -> autoResizeModeChanged()); + tableOptionsPanel.add(autoResizeModeField, "cell 1 1"); + //---- showHorizontalLinesCheckBox ---- showHorizontalLinesCheckBox.setText("show horizontal lines"); showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged()); - tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 1 2 1"); + tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 2 2 1"); //---- showVerticalLinesCheckBox ---- showVerticalLinesCheckBox.setText("show vertical lines"); showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged()); - tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 2 2 1"); + tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 3 2 1"); //---- intercellSpacingCheckBox ---- intercellSpacingCheckBox.setText("intercell spacing"); intercellSpacingCheckBox.addActionListener(e -> intercellSpacingChanged()); - tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 3 2 1"); + tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 4 2 1"); //---- redGridColorCheckBox ---- redGridColorCheckBox.setText("red grid color"); redGridColorCheckBox.addActionListener(e -> redGridColorChanged()); - tableOptionsPanel.add(redGridColorCheckBox, "cell 0 4 2 1"); + tableOptionsPanel.add(redGridColorCheckBox, "cell 0 5 2 1"); //---- rowSelectionCheckBox ---- rowSelectionCheckBox.setText("row selection"); rowSelectionCheckBox.setSelected(true); rowSelectionCheckBox.addActionListener(e -> rowSelectionChanged()); - tableOptionsPanel.add(rowSelectionCheckBox, "cell 0 5 2 1"); + tableOptionsPanel.add(rowSelectionCheckBox, "cell 0 6 2 1"); //---- columnSelectionCheckBox ---- columnSelectionCheckBox.setText("column selection"); columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged()); - tableOptionsPanel.add(columnSelectionCheckBox, "cell 0 6 2 1"); + tableOptionsPanel.add(columnSelectionCheckBox, "cell 0 7 2 1"); //---- dndCheckBox ---- dndCheckBox.setText("enable drag and drop"); dndCheckBox.setMnemonic('D'); dndCheckBox.addActionListener(e -> dndChanged()); - tableOptionsPanel.add(dndCheckBox, "cell 0 7 2 1"); + tableOptionsPanel.add(dndCheckBox, "cell 0 8 2 1"); //---- tableHeaderButtonCheckBox ---- tableHeaderButtonCheckBox.setText("show button in table header"); tableHeaderButtonCheckBox.addActionListener(e -> tableHeaderButtonChanged()); - tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 0 8 2 1"); + tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 0 9 2 1"); } add(tableOptionsPanel, "cell 3 3"); // JFormDesigner - End of component initialization //GEN-END:initComponents @@ -441,6 +475,7 @@ public class FlatComponents2Test private JScrollPane scrollPane5; private JTable table1; private JSpinner tableRowCountSpinner; + private JComboBox autoResizeModeField; private JCheckBox showHorizontalLinesCheckBox; private JCheckBox showVerticalLinesCheckBox; private JCheckBox intercellSpacingCheckBox; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd index 96e3a3ac..3fa4d2c0 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -175,7 +175,7 @@ new FormModel { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "hidemode 3" "$columnConstraints": "[][90,fill]" - "$rowConstraints": "[][]0[]0[]0[]0[]0[]0[]0[]" + "$rowConstraints": "[][][]0[]0[]0[]0[]0[]0[]0[]" } ) { name: "tableOptionsPanel" add( new FormComponent( "javax.swing.JLabel" ) { @@ -194,6 +194,31 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 0" } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "autoResizeModeLabel" + "text": "Auto resize mode:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "autoResizeModeField" + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "off" + addElement( "off" ) + addElement( "nextColumn" ) + addElement( "subsequentColumns" ) + addElement( "lastColumn" ) + addElement( "allColumns" ) + } + "selectedIndex": 2 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + "JavaCodeGenerator.typeParameters": "String" + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "autoResizeModeChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "showHorizontalLinesCheckBox" "text": "show horizontal lines" @@ -202,7 +227,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1 2 1" + "value": "cell 0 2 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "showVerticalLinesCheckBox" @@ -212,7 +237,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2 2 1" + "value": "cell 0 3 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "intercellSpacingCheckBox" @@ -222,7 +247,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3 2 1" + "value": "cell 0 4 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "redGridColorCheckBox" @@ -232,7 +257,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 4 2 1" + "value": "cell 0 5 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "rowSelectionCheckBox" @@ -243,7 +268,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowSelectionChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 5 2 1" + "value": "cell 0 6 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "columnSelectionCheckBox" @@ -253,7 +278,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "columnSelectionChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 6 2 1" + "value": "cell 0 7 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "dndCheckBox" @@ -264,7 +289,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "dndChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 7 2 1" + "value": "cell 0 8 2 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "tableHeaderButtonCheckBox" @@ -274,7 +299,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tableHeaderButtonChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 8 2 1" + "value": "cell 0 9 2 1" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 3" From 5ef0c9aae14348f52be047e837aa9ac856fe5a10 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 28 Nov 2020 23:20:58 +0100 Subject: [PATCH 043/178] Table: fixed unstable grid line thickness when scaled on HiDPI screens (issue #152) --- CHANGELOG.md | 2 ++ .../com/formdev/flatlaf/ui/FlatTableUI.java | 26 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5970c8c..fdb8a348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ FlatLaf Change Log property `JTabbedPane.hideTabAreaWithOneTab` to `true`) - Table: Do not paint last vertical grid line if auto-resize mode is not off. (issue #46) +- Table: Fixed unstable grid line thickness when scaled on HiDPI screens. (issue + #152) #### Fixed bugs diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java index ed67da8a..ea73f861 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java @@ -23,6 +23,7 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; +import java.awt.geom.Rectangle2D; import javax.swing.JCheckBox; import javax.swing.JComponent; import javax.swing.JTable; @@ -210,25 +211,32 @@ public class FlatTableUI @Override public void paint( Graphics g, JComponent c ) { - if( table.getShowVerticalLines() ) { + boolean horizontalLines = table.getShowHorizontalLines(); + boolean verticalLines = table.getShowVerticalLines(); + if( horizontalLines || verticalLines ) { // fix grid painting issues in BasicTableUI // - do not paint last vertical grid line if auto-resize mode is not off // - in right-to-left component orientation, do not paint last vertical grid line // in any auto-resize mode; can not paint on left side of table because // cells are painted over left line + // - fix unstable grid line thickness when scaled at 125%, 150%, 175%, 225%, ... + // which paints either 1px or 2px lines depending on location boolean hideLastVerticalLine = table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF || !table.getComponentOrientation().isLeftToRight(); int tableWidth = table.getWidth(); + double systemScaleFactor = UIScale.getSystemScaleFactor( (Graphics2D) g ); + double lineThickness = (1. / systemScaleFactor) * (int) systemScaleFactor; + // Java 8 uses drawLine() to paint grid lines // Java 9+ uses fillRect() to paint grid lines g = new Graphics2DProxy( (Graphics2D) g ) { @Override public void drawLine( int x1, int y1, int x2, int y2 ) { // do not paint last vertical line - if( hideLastVerticalLine && + if( hideLastVerticalLine && verticalLines && x1 == x2 && y1 == 0 && x1 == tableWidth - 1 && wasInvokedFromPaintGrid() ) return; @@ -239,11 +247,23 @@ public class FlatTableUI @Override public void fillRect( int x, int y, int width, int height ) { // do not paint last vertical line - if( hideLastVerticalLine && + if( hideLastVerticalLine && verticalLines && width == 1 && y == 0 && x == tableWidth - 1 && wasInvokedFromPaintGrid() ) return; + // reduce line thickness to avoid unstable painted line thickness + if( lineThickness != 1 ) { + if( horizontalLines && height == 1 && wasInvokedFromPaintGrid() ) { + super.fill( new Rectangle2D.Double( x, y, width, lineThickness ) ); + return; + } + if( verticalLines && width == 1 && y == 0 && wasInvokedFromPaintGrid() ) { + super.fill( new Rectangle2D.Double( x, y, lineThickness, height ) ); + return; + } + } + super.fillRect( x, y, width, height ); } From e07ae90d095161dfd765461479c371f8038a8554 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 29 Nov 2020 01:32:38 +0100 Subject: [PATCH 044/178] TabbedPane: no longer add (internal) tab close button component as child to `JTabbedPane` (issue #219) --- CHANGELOG.md | 10 ++++++---- .../formdev/flatlaf/ui/FlatTabbedPaneUI.java | 17 +++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdb8a348..c0df05cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,14 +12,16 @@ FlatLaf Change Log and "One Dark" themes. - TabbedPane: Support hiding tab area if it contains only one tab. (set client property `JTabbedPane.hideTabAreaWithOneTab` to `true`) -- Table: Do not paint last vertical grid line if auto-resize mode is not off. - (issue #46) -- Table: Fixed unstable grid line thickness when scaled on HiDPI screens. (issue - #152) #### Fixed bugs +- Table: Do not paint last vertical grid line if auto-resize mode is not off. + (issue #46) +- Table: Fixed unstable grid line thickness when scaled on HiDPI screens. (issue + #152) +- TabbedPane: No longer add (internal) tab close button component as child to + `JTabbedPane`. (issue #219) - Custom window decorations: Title bar was not hidden if window is in full-screen mode. (issue #212) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java index 7438dbf7..05a8df66 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java @@ -362,11 +362,6 @@ public class FlatTabbedPaneUI protected void installComponents() { super.installComponents(); - // create tab close button - tabCloseButton = new TabCloseButton(); - tabCloseButton.setVisible( false ); - tabPane.add( tabCloseButton ); - // find scrollable tab viewport tabViewport = null; if( isScrollTabLayout() ) { @@ -393,11 +388,7 @@ public class FlatTabbedPaneUI super.uninstallComponents(); - if( tabCloseButton != null ) { - tabPane.remove( tabCloseButton ); - tabCloseButton = null; - } - + tabCloseButton = null; tabViewport = null; } @@ -934,6 +925,12 @@ public class FlatTabbedPaneUI } protected void paintTabCloseButton( Graphics g, int tabIndex, int x, int y, int w, int h ) { + // create tab close button + if( tabCloseButton == null ) { + tabCloseButton = new TabCloseButton(); + tabCloseButton.setVisible( false ); + } + // update state of tab close button boolean rollover = (tabIndex == getRolloverTab()); ButtonModel bm = tabCloseButton.getModel(); From 91dbf1e144b453985279a95d6a3a071eae05acee Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 4 Dec 2020 21:08:12 +0100 Subject: [PATCH 045/178] Sider: text baseline layout in FlatComponentsTest --- .../flatlaf/testing/FlatComponentsTest.java | 13 +++++++++---- .../formdev/flatlaf/testing/FlatComponentsTest.jfd | 14 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index 18a184f2..5e308623 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -286,6 +286,7 @@ public class FlatComponentsTest JLabel sliderLabel = new JLabel(); JSlider slider1 = new JSlider(); JSlider slider6 = new JSlider(); + JLabel sliderLabel2 = new JLabel(); slider3 = new JSlider(); JSlider slider5 = new JSlider(); JLabel progressBarLabel = new JLabel(); @@ -1200,12 +1201,16 @@ public class FlatComponentsTest //---- slider1 ---- slider1.setValue(30); - add(slider1, "cell 1 19 3 1,aligny top,grow 100 0"); + add(slider1, "cell 1 19 3 1,growx"); //---- slider6 ---- slider6.setEnabled(false); slider6.setValue(30); - add(slider6, "cell 1 19 3 1,aligny top,growy 0"); + add(slider6, "cell 1 19 3 1"); + + //---- sliderLabel2 ---- + sliderLabel2.setText("baseline"); + add(sliderLabel2, "cell 0 20,alignx right,growx 0"); //---- slider3 ---- slider3.setMinorTickSpacing(10); @@ -1214,7 +1219,7 @@ public class FlatComponentsTest slider3.setPaintLabels(true); slider3.setValue(30); slider3.addChangeListener(e -> changeProgress()); - add(slider3, "cell 1 20 3 1,aligny top,grow 100 0"); + add(slider3, "cell 1 20 3 1,growx"); //---- slider5 ---- slider5.setMinorTickSpacing(10); @@ -1223,7 +1228,7 @@ public class FlatComponentsTest slider5.setPaintLabels(true); slider5.setEnabled(false); slider5.setValue(30); - add(slider5, "cell 1 20 3 1,aligny top,growy 0"); + add(slider5, "cell 1 20 3 1"); //---- progressBarLabel ---- progressBarLabel.setText("JProgressBar:"); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index 6833b3e9..324865e1 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -1141,14 +1141,20 @@ new FormModel { name: "slider1" "value": 30 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 19 3 1,aligny top,grow 100 0" + "value": "cell 1 19 3 1,growx" } ) add( new FormComponent( "javax.swing.JSlider" ) { name: "slider6" "enabled": false "value": 30 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 19 3 1,aligny top,growy 0" + "value": "cell 1 19 3 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "sliderLabel2" + "text": "baseline" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 20,alignx right,growx 0" } ) add( new FormComponent( "javax.swing.JSlider" ) { name: "slider3" @@ -1162,7 +1168,7 @@ new FormModel { } addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "changeProgress", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 20 3 1,aligny top,grow 100 0" + "value": "cell 1 20 3 1,growx" } ) add( new FormComponent( "javax.swing.JSlider" ) { name: "slider5" @@ -1173,7 +1179,7 @@ new FormModel { "enabled": false "value": 30 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 20 3 1,aligny top,growy 0" + "value": "cell 1 20 3 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "progressBarLabel" From 56bfdc8ef964fe8e6dfbb93450d0024f84a13a9c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 4 Dec 2020 22:29:32 +0100 Subject: [PATCH 046/178] Slider: updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1832ed2..e8b26b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ FlatLaf Change Log #### New features and improvements +- Slider: New design and improved customizing. (PR #214) - JIDE Common Layer: Support `RangeSlider`. (PR #209) From 14df490b2a09ee2a43e05a240ad4e84844cae565 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 5 Dec 2020 11:56:38 +0100 Subject: [PATCH 047/178] MenuBar: support different underline menu selection style UI defaults for `MenuBar` and `MenuItem`. (PR #217; issue #216) --- CHANGELOG.md | 2 + .../flatlaf/ui/FlatMenuItemRenderer.java | 60 ++++++++++--------- .../com/formdev/flatlaf/ui/FlatMenuUI.java | 30 ++++++++-- .../com/formdev/flatlaf/FlatLaf.properties | 1 - .../uidefaults/FlatTestLaf_1.8.0_202.txt | 3 + .../flatlaf/testing/FlatTestLaf.properties | 3 + 6 files changed, 65 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2a186e..eaac11b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ FlatLaf Change Log - Added "Gradianto Nature Green" theme. - Updated "Arc Dark", "Cyan", "Dark purple", "Gradianto", "Gray", "Gruvbox" and "One Dark" themes. +- MenuBar: Support different underline menu selection style UI defaults for + `MenuBar` and `MenuItem`. (PR #217; issue #216) #### Fixed bugs diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java index 6c1d6b24..8fe99aee 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java @@ -39,6 +39,7 @@ import javax.swing.UIManager; import javax.swing.plaf.basic.BasicHTML; import javax.swing.text.View; import com.formdev.flatlaf.FlatLaf; +import com.formdev.flatlaf.util.DerivedColor; import com.formdev.flatlaf.util.Graphics2DProxy; import com.formdev.flatlaf.util.HiDPIUtils; import com.formdev.flatlaf.util.SystemInfo; @@ -55,7 +56,7 @@ import com.formdev.flatlaf.util.SystemInfo; * @uiDefault MenuItem.underlineSelectionBackground Color * @uiDefault MenuItem.underlineSelectionCheckBackground Color * @uiDefault MenuItem.underlineSelectionColor Color - * @uiDefault MenuItem.underlineSelectionHeight Color + * @uiDefault MenuItem.underlineSelectionHeight int * * @author Karl Tauber */ @@ -246,47 +247,50 @@ public class FlatMenuItemRenderer g.setColor( Color.orange ); g.drawRect( arrowRect.x, arrowRect.y, arrowRect.width - 1, arrowRect.height - 1 ); debug*/ - paintBackground( g, selectionBackground, underlineSelectionColor ); - paintIcon( g, iconRect, getIconForPainting() ); + boolean underlineSelection = isUnderlineSelection(); + paintBackground( g, underlineSelection ? underlineSelectionBackground : selectionBackground ); + if( underlineSelection && isArmedOrSelected( menuItem ) ) + paintUnderlineSelection( g, underlineSelectionColor, underlineSelectionHeight ); + paintIcon( g, iconRect, getIconForPainting(), underlineSelection ? underlineSelectionCheckBackground : checkBackground ); paintText( g, textRect, menuItem.getText(), selectionForeground, disabledForeground ); paintAccelerator( g, accelRect, getAcceleratorText(), acceleratorForeground, acceleratorSelectionForeground, disabledForeground ); if( !isTopLevelMenu( menuItem ) ) paintArrowIcon( g, arrowRect, arrowIcon ); } - protected void paintBackground( Graphics g, Color selectionBackground, Color underlineSelectionColor ) { + protected void paintBackground( Graphics g, Color selectionBackground ) { boolean armedOrSelected = isArmedOrSelected( menuItem ); if( menuItem.isOpaque() || armedOrSelected ) { - int width = menuItem.getWidth(); - int height = menuItem.getHeight(); - // paint background g.setColor( armedOrSelected - ? (isUnderlineSelection() - ? deriveBackground( underlineSelectionBackground ) - : selectionBackground) + ? deriveBackground( selectionBackground ) : menuItem.getBackground() ); - g.fillRect( 0, 0, width, height ); + g.fillRect( 0, 0, menuItem.getWidth(), menuItem.getHeight() ); + } + } - // paint underline - if( armedOrSelected && isUnderlineSelection() ) { - int underlineHeight = scale( underlineSelectionHeight ); - g.setColor( underlineSelectionColor ); - if( isTopLevelMenu( menuItem ) ) { - // paint underline at bottom - g.fillRect( 0, height - underlineHeight, width, underlineHeight ); - } else if( menuItem.getComponentOrientation().isLeftToRight() ) { - // paint underline at left side - g.fillRect( 0, 0, underlineHeight, height ); - } else { - // paint underline at right side - g.fillRect( width - underlineHeight, 0, underlineHeight, height ); - } - } + protected void paintUnderlineSelection( Graphics g, Color underlineSelectionColor, int underlineSelectionHeight ) { + int width = menuItem.getWidth(); + int height = menuItem.getHeight(); + + int underlineHeight = scale( underlineSelectionHeight ); + g.setColor( underlineSelectionColor ); + if( isTopLevelMenu( menuItem ) ) { + // paint underline at bottom + g.fillRect( 0, height - underlineHeight, width, underlineHeight ); + } else if( menuItem.getComponentOrientation().isLeftToRight() ) { + // paint underline at left side + g.fillRect( 0, 0, underlineHeight, height ); + } else { + // paint underline at right side + g.fillRect( width - underlineHeight, 0, underlineHeight, height ); } } protected Color deriveBackground( Color background ) { + if( !(background instanceof DerivedColor) ) + return background; + Color baseColor = menuItem.isOpaque() ? menuItem.getBackground() : FlatUIUtils.getParentBackground( menuItem ); @@ -294,12 +298,12 @@ debug*/ return FlatUIUtils.deriveColor( background, baseColor ); } - protected void paintIcon( Graphics g, Rectangle iconRect, Icon icon ) { + protected void paintIcon( Graphics g, Rectangle iconRect, Icon icon, Color checkBackground ) { // if checkbox/radiobutton menu item is selected and also has a custom icon, // then use filled icon background to indicate selection (instead of using checkIcon) if( menuItem.isSelected() && checkIcon != null && icon != checkIcon ) { Rectangle r = FlatUIUtils.addInsets( iconRect, scale( checkMargins ) ); - g.setColor( deriveBackground( isUnderlineSelection() ? underlineSelectionCheckBackground : checkBackground ) ); + g.setColor( deriveBackground( checkBackground ) ); g.fillRect( r.x, r.y, r.width, r.height ); } diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java index 2edfc3b2..8f80c6c2 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuUI.java @@ -60,16 +60,19 @@ import javax.swing.plaf.basic.BasicMenuUI; * * * @uiDefault MenuItem.iconTextGap int - * @uiDefault MenuBar.hoverBackground + * @uiDefault MenuBar.hoverBackground Color + * + * + * + * @uiDefault MenuBar.underlineSelectionBackground Color * @uiDefault MenuBar.underlineSelectionColor Color + * @uiDefault MenuBar.underlineSelectionHeight int * * @author Karl Tauber */ public class FlatMenuUI extends BasicMenuUI { - protected final Color menuBarUnderlineSelectionColor = UIManager.getColor( "MenuBar.underlineSelectionColor" ); - private Color hoverBackground; private FlatMenuItemRenderer renderer; @@ -150,6 +153,10 @@ public class FlatMenuUI protected class FlatMenuRenderer extends FlatMenuItemRenderer { + protected final Color menuBarUnderlineSelectionBackground = FlatUIUtils.getUIColor( "MenuBar.underlineSelectionBackground", underlineSelectionBackground ); + protected final Color menuBarUnderlineSelectionColor = FlatUIUtils.getUIColor( "MenuBar.underlineSelectionColor", underlineSelectionColor ); + protected final int menuBarUnderlineSelectionHeight = FlatUIUtils.getUIInt( "MenuBar.underlineSelectionHeight", underlineSelectionHeight ); + protected FlatMenuRenderer( JMenuItem menuItem, Icon checkIcon, Icon arrowIcon, Font acceleratorFont, String acceleratorDelimiter ) { @@ -157,7 +164,10 @@ public class FlatMenuUI } @Override - protected void paintBackground( Graphics g, Color selectionBackground, Color menuItemUnderlineSelectionColor ) { + protected void paintBackground( Graphics g, Color selectionBackground ) { + if( isUnderlineSelection() && ((JMenu)menuItem).isTopLevelMenu() ) + selectionBackground = menuBarUnderlineSelectionBackground; + ButtonModel model = menuItem.getModel(); if( model.isRollover() && !model.isArmed() && !model.isSelected() && model.isEnabled() && ((JMenu)menuItem).isTopLevelMenu() ) @@ -165,7 +175,17 @@ public class FlatMenuUI g.setColor( deriveBackground( hoverBackground ) ); g.fillRect( 0, 0, menuItem.getWidth(), menuItem.getHeight() ); } else - super.paintBackground( g, selectionBackground, ((JMenu)menuItem).isTopLevelMenu() ? menuBarUnderlineSelectionColor : menuItemUnderlineSelectionColor ); + super.paintBackground( g, selectionBackground ); + } + + @Override + protected void paintUnderlineSelection( Graphics g, Color underlineSelectionColor, int underlineSelectionHeight ) { + if( ((JMenu)menuItem).isTopLevelMenu() ) { + underlineSelectionColor = menuBarUnderlineSelectionColor; + underlineSelectionHeight = menuBarUnderlineSelectionHeight; + } + + super.paintUnderlineSelection( g, underlineSelectionColor, underlineSelectionHeight ); } } } 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 ac52502d..0b94527b 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -337,7 +337,6 @@ MenuBar.border=com.formdev.flatlaf.ui.FlatMenuBarBorder MenuBar.background=@menuBackground MenuBar.hoverBackground=@menuHoverBackground MenuBar.itemMargins=3,8,3,8 -MenuBar.underlineSelectionColor=$TabbedPane.underlineColor #---- MenuItem ---- diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index 5e1b71d9..1be80b34 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -518,6 +518,9 @@ MenuBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] MenuBar.hoverBackground #ffdddd javax.swing.plaf.ColorUIResource [UI] MenuBar.itemMargins 3,8,3,8 javax.swing.plaf.InsetsUIResource [UI] MenuBar.shadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] +MenuBar.underlineSelectionBackground #00ff00 javax.swing.plaf.ColorUIResource [UI] +MenuBar.underlineSelectionColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +MenuBar.underlineSelectionHeight 5 MenuBar.windowBindings length=2 [Ljava.lang.Object; [0] F10 [1] takeFocus diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index b4e350ba..2f104103 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -192,6 +192,9 @@ Menu.icon.disabledArrowColor=#ABABAB MenuBar.borderColor=#44f MenuBar.hoverBackground=#fdd +MenuBar.underlineSelectionBackground=#0f0 +MenuBar.underlineSelectionColor=#f00 +MenuBar.underlineSelectionHeight=5 #---- MenuItemCheckBox ---- From b5deca7f221d0aefd3eede1d4c4110de5f741714 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 5 Dec 2020 14:32:02 +0100 Subject: [PATCH 048/178] release 0.45 --- CHANGELOG.md | 5 +++-- build.gradle.kts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5827b33b..066597ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ FlatLaf Change Log ================== -## 0.45-SNAPSHOT +## 0.45 #### New features and improvements -- Slider: New design and improved customizing. (PR #214) +- Slider: New design, added hover and pressed feedback and improved customizing. + (PR #214) - JIDE Common Layer: Support `RangeSlider`. (PR #209) - IntelliJ Themes: - Added "Gradianto Nature Green" theme. diff --git a/build.gradle.kts b/build.gradle.kts index bab1dacd..988390ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ -val releaseVersion = "0.44" -val developmentVersion = "0.45-SNAPSHOT" +val releaseVersion = "0.45" +val developmentVersion = "0.46-SNAPSHOT" version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion From 1293e2a07488977df27bbd3bfff68c88a9bded44 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 13 Nov 2020 13:31:11 +0100 Subject: [PATCH 049/178] AnimatedIcon added (for future animations) (issue #66) --- .../flatlaf/icons/FlatAnimatedIcon.java | 55 ++++ .../formdev/flatlaf/util/AnimatedIcon.java | 249 +++++++++++++++++ .../formdev/flatlaf/util/ColorFunctions.java | 32 +++ .../flatlaf/util/CubicBezierEasing.java | 7 + .../flatlaf/testing/FlatAnimatedIconTest.java | 254 ++++++++++++++++++ .../flatlaf/testing/FlatAnimatedIconTest.jfd | 72 +++++ 6 files changed, 669 insertions(+) create mode 100644 flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java create mode 100644 flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.java create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.jfd diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java new file mode 100644 index 00000000..4d80f49b --- /dev/null +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.icons; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Graphics2D; +import com.formdev.flatlaf.util.AnimatedIcon; + +/** + * Base class for animated icons that scales width and height, creates and initializes + * a scaled graphics context for icon painting. + *

+ * Subclasses do not need to scale icon painting. + *

+ * This class does not store any state information (needed for animation) in its instance. + * Instead a client property is set on the painted component. + * This makes it possible to use a share icon instance for multiple components. + * + * @author Karl Tauber + */ +public abstract class FlatAnimatedIcon + extends FlatAbstractIcon + implements AnimatedIcon +{ + public FlatAnimatedIcon( int width, int height, Color color ) { + super( width, height, color ); + } + + @Override + public void paintIcon( Component c, Graphics g, int x, int y ) { + super.paintIcon( c, g, x, y ); + AnimatedIcon.AnimationSupport.saveIconLocation( this, c, x, y ); + } + + @Override + protected void paintIcon( Component c, Graphics2D g ) { + AnimatedIcon.AnimationSupport.paintIcon( this, c, g, 0, 0 ); + } +} diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java new file mode 100644 index 00000000..da0b0a1a --- /dev/null +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java @@ -0,0 +1,249 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.util; + +import java.awt.Component; +import java.awt.Graphics; +import javax.swing.Icon; +import javax.swing.JComponent; +import com.formdev.flatlaf.util.Animator.Interpolator; + +/** + * Icon that automatically animates painting on component value changes. + *

+ * {@link #getValue(Component)} returns the value of the component. + * If the value changes, then {@link #paintIconAnimated(Component, Graphics, int, int, float)} + * is invoked multiple times with animated value (from old value to new value). + *

+ * Example for an animated icon: + *

+ * private class AnimatedMinimalTestIcon
+ *     implements AnimatedIcon
+ * {
+ *     @Override public int getIconWidth() { return 100; }
+ *     @Override public int getIconHeight() { return 20; }
+ *
+ *     @Override
+ *     public void paintIconAnimated( Component c, Graphics g, int x, int y, float animatedValue ) {
+ *         int w = getIconWidth();
+ *         int h = getIconHeight();
+ *
+ *         g.setColor( Color.red );
+ *         g.drawRect( x, y, w - 1, h - 1 );
+ *         g.fillRect( x, y, Math.round( w * animatedValue ), h );
+ *     }
+ *
+ *     @Override
+ *     public float getValue( Component c ) {
+ *         return ((AbstractButton)c).isSelected() ? 1 : 0;
+ *     }
+ * }
+ *
+ * // sample usage
+ * JCheckBox checkBox = new JCheckBox( "test" );
+ * checkBox.setIcon( new AnimatedMinimalTestIcon() );
+ * 
+ * + * Animation works only if the component passed to {@link #paintIcon(Component, Graphics, int, int)} + * is a instance of {@link JComponent}. + * A client property is set on the component to store the animation state. + * + * @author Karl Tauber + */ +public interface AnimatedIcon + extends Icon +{ + @Override + public default void paintIcon( Component c, Graphics g, int x, int y ) { + AnimationSupport.paintIcon( this, c, g, x, y ); + } + + /** + * Paints the icon for the given animated value. + * + * @param c the component that this icon belongs to + * @param g the graphics context + * @param x the x coordinate of the icon + * @param y the y coordinate of the icon + * @param animatedValue the animated value, which is either equal to what {@link #getValue(Component)} + * returned, or somewhere between the previous value and the latest value + * that {@link #getValue(Component)} returned + */ + void paintIconAnimated( Component c, Graphics g, int x, int y, float animatedValue ); + + /** + * Gets the value of the component. + *

+ * This can be any value and depends on the component. + * If the value changes, then this class animates from the old value to the new one. + *

+ * For a toggle button this could be {@code 0} for off and {@code 1} for on. + */ + float getValue( Component c ); + + /** + * Returns whether animation is enabled for this icon (default is {@code true}). + */ + default boolean isAnimationEnabled() { + return true; + } + + /** + * Returns the duration of the animation in milliseconds (default is 150). + */ + default int getAnimationDuration() { + return 150; + } + + /** + * Returns the resolution of the animation in milliseconds (default is 10). + * Resolution is the amount of time between timing events. + */ + default int getAnimationResolution() { + return 10; + } + + /** + * Returns the interpolator for the animation. + * Default is {@link CubicBezierEasing#STANDARD_EASING}. + */ + default Interpolator getAnimationInterpolator() { + return CubicBezierEasing.STANDARD_EASING; + } + + /** + * Returns the client property key used to store the animation support. + */ + default Object getClientPropertyKey() { + return getClass(); + } + + //---- class AnimationSupport --------------------------------------------- + + /** + * Animation support class that stores the animation state and implements the animation. + */ + class AnimationSupport + { + private float startValue; + private float targetValue; + private float animatedValue; + private float fraction; + + private Animator animator; + + // last x,y coordinates of the icon needed to repaint while animating + private int x; + private int y; + + public static void paintIcon( AnimatedIcon icon, Component c, Graphics g, int x, int y ) { + if( !isAnimationEnabled( icon, c ) ) { + // paint without animation if animation is disabled or + // component is not a JComponent and therefore does not support + // client properties, which are required to keep animation state + paintIconImpl( icon, c, g, x, y, null ); + return; + } + + JComponent jc = (JComponent) c; + Object key = icon.getClientPropertyKey(); + AnimationSupport as = (AnimationSupport) jc.getClientProperty( key ); + if( as == null ) { + // painted first time --> do not animate, but remember current component value + as = new AnimationSupport(); + as.startValue = as.targetValue = as.animatedValue = icon.getValue( c ); + as.x = x; + as.y = y; + jc.putClientProperty( key, as ); + } else { + // get component value + float value = icon.getValue( c ); + + if( value != as.targetValue ) { + // value changed --> (re)start animation + + if( as.animator == null ) { + // create animator + AnimationSupport as2 = as; + as.animator = new Animator( icon.getAnimationDuration(), fraction -> { + // check whether component was removed while animation is running + if( !c.isDisplayable() ) { + as2.animator.stop(); + return; + } + + // compute animated value + as2.animatedValue = as2.startValue + ((as2.targetValue - as2.startValue) * fraction); + as2.fraction = fraction; + + // repaint icon + c.repaint( as2.x, as2.y, icon.getIconWidth(), icon.getIconHeight() ); + }, () -> { + as2.startValue = as2.animatedValue = as2.targetValue; + as2.animator = null; + } ); + } + + if( as.animator.isRunning() ) { + // if animation is still running, restart it from the current + // animated value to the new target value with reduced duration + as.animator.cancel(); + int duration2 = (int) (icon.getAnimationDuration() * as.fraction); + if( duration2 > 0 ) + as.animator.setDuration( duration2 ); + as.startValue = as.animatedValue; + } else { + // new animation + as.animator.setDuration( icon.getAnimationDuration() ); + as.animator.setResolution( icon.getAnimationResolution() ); + as.animator.setInterpolator( icon.getAnimationInterpolator() ); + + as.animatedValue = as.startValue; + } + + as.targetValue = value; + as.animator.start(); + } + + as.x = x; + as.y = y; + } + + paintIconImpl( icon, c, g, x, y, as ); + } + + private static void paintIconImpl( AnimatedIcon icon, Component c, Graphics g, int x, int y, AnimationSupport as ) { + float value = (as != null) ? as.animatedValue : icon.getValue( c ); + icon.paintIconAnimated( c, g, x, y, value ); + } + + private static boolean isAnimationEnabled( AnimatedIcon icon, Component c ) { + return Animator.useAnimation() && icon.isAnimationEnabled() && c instanceof JComponent; + } + + public static void saveIconLocation( AnimatedIcon icon, Component c, int x, int y ) { + if( !isAnimationEnabled( icon, c ) ) + return; + + AnimationSupport as = (AnimationSupport) ((JComponent)c).getClientProperty( icon.getClientPropertyKey() ); + if( as != null ) { + as.x = x; + as.y = y; + } + } + } +} diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java index 4996ba75..3e4e5963 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java @@ -44,6 +44,38 @@ public class ColorFunctions : value); } + /** + * Returns a color that is a mixture of two colors. + * + * @param color1 first color + * @param color2 second color + * @param weight the weight (in range 0-1) to mix the two colors. + * Larger weight uses more of first color, smaller weight more of second color. + * @return mixture of colors + */ + public static Color mix( Color color1, Color color2, float weight ) { + if( weight >= 1 ) + return color1; + if( weight <= 0 ) + return color2; + + int r1 = color1.getRed(); + int g1 = color1.getGreen(); + int b1 = color1.getBlue(); + int a1 = color1.getAlpha(); + + int r2 = color2.getRed(); + int g2 = color2.getGreen(); + int b2 = color2.getBlue(); + int a2 = color2.getAlpha(); + + return new Color( + Math.round( r2 + ((r1 - r2) * weight) ), + Math.round( g2 + ((g1 - g2) * weight) ), + Math.round( b2 + ((b1 - b2) * weight) ), + Math.round( a2 + ((a1 - a2) * weight) ) ); + } + //---- interface ColorFunction -------------------------------------------- public interface ColorFunction { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/CubicBezierEasing.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/CubicBezierEasing.java index e714a209..b9336c98 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/CubicBezierEasing.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/CubicBezierEasing.java @@ -24,6 +24,13 @@ package com.formdev.flatlaf.util; public class CubicBezierEasing implements Animator.Interpolator { + /** + * Standard easing as specified in Material design (0.4, 0, 0.2, 1). + * + * @see https://material.io/design/motion/speed.html#easing + */ + public static final CubicBezierEasing STANDARD_EASING = new CubicBezierEasing( 0.4f, 0f, 0.2f, 1f ); + // common cubic-bezier easing functions (same as in CSS) // https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function public static final CubicBezierEasing EASE = new CubicBezierEasing( 0.25f, 0.1f, 0.25f, 1f ); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.java new file mode 100644 index 00000000..4502d6b2 --- /dev/null +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.java @@ -0,0 +1,254 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.testing; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.geom.Ellipse2D; +import javax.swing.*; +import com.formdev.flatlaf.icons.FlatAnimatedIcon; +import com.formdev.flatlaf.util.AnimatedIcon; +import com.formdev.flatlaf.util.ColorFunctions; +import net.miginfocom.swing.*; + +/** + * @author Karl Tauber + */ +public class FlatAnimatedIconTest + extends FlatTestPanel +{ + public static void main( String[] args ) { + SwingUtilities.invokeLater( () -> { + FlatTestFrame frame = FlatTestFrame.create( args, "FlatAnimatedIconTest" ); + frame.showFrame( FlatAnimatedIconTest::new ); + } ); + } + + FlatAnimatedIconTest() { + initComponents(); + + AnimatedRadioButtonIcon radioIcon = new AnimatedRadioButtonIcon(); + radioButton1.setIcon( radioIcon ); + radioButton2.setIcon( radioIcon ); + radioButton3.setIcon( radioIcon ); + + checkBox1.setIcon( new AnimatedSwitchIcon() ); + checkBox2.setIcon( new AnimatedMinimalTestIcon() ); + } + + private void initComponents() { + // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents + radioButton1 = new JRadioButton(); + radioButton2 = new JRadioButton(); + radioButton3 = new JRadioButton(); + checkBox1 = new JCheckBox(); + checkBox2 = new JCheckBox(); + durationLabel = new JLabel(); + durationField = new JSpinner(); + + //======== this ======== + setLayout(new MigLayout( + "insets dialog,hidemode 3", + // columns + "[]para" + + "[fill]", + // rows + "[]" + + "[]" + + "[]para" + + "[]" + + "[]" + + "[grow]" + + "[]")); + + //---- radioButton1 ---- + radioButton1.setText("radio 1"); + radioButton1.setSelected(true); + add(radioButton1, "cell 0 0"); + + //---- radioButton2 ---- + radioButton2.setText("radio 2"); + add(radioButton2, "cell 0 1"); + + //---- radioButton3 ---- + radioButton3.setText("radio 3"); + add(radioButton3, "cell 0 2"); + + //---- checkBox1 ---- + checkBox1.setText("switch"); + add(checkBox1, "cell 0 3"); + + //---- checkBox2 ---- + checkBox2.setText("minimal"); + add(checkBox2, "cell 0 4"); + + //---- durationLabel ---- + durationLabel.setText("Duration:"); + add(durationLabel, "cell 0 6 2 1"); + + //---- durationField ---- + durationField.setModel(new SpinnerNumberModel(200, 100, null, 50)); + add(durationField, "cell 0 6 2 1"); + + //---- buttonGroup1 ---- + ButtonGroup buttonGroup1 = new ButtonGroup(); + buttonGroup1.add(radioButton1); + buttonGroup1.add(radioButton2); + buttonGroup1.add(radioButton3); + // JFormDesigner - End of component initialization //GEN-END:initComponents + } + + // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables + private JRadioButton radioButton1; + private JRadioButton radioButton2; + private JRadioButton radioButton3; + private JCheckBox checkBox1; + private JCheckBox checkBox2; + private JLabel durationLabel; + private JSpinner durationField; + // JFormDesigner - End of variables declaration //GEN-END:variables + + //---- class AnimatedRadioButtonIcon -------------------------------------- + + /** + * Experimental radio button icon that: + * - fades icon color from off to on color + * - animates size of center dot from zero to full size + */ + private class AnimatedRadioButtonIcon + extends FlatAnimatedIcon + { + private static final int SIZE = 16; + private static final int BORDER_SIZE = 2; + private static final int DOT_SIZE = 8; + + private final Color offColor = Color.lightGray; + private final Color onColor = Color.red; + + public AnimatedRadioButtonIcon() { + super( SIZE, SIZE, null ); + } + + @Override + public void paintIconAnimated( Component c, Graphics g, int x, int y, float animatedValue ) { + Color color = ColorFunctions.mix( onColor, offColor, animatedValue );; + + // border + g.setColor( color ); + g.fillOval( 0, 0, SIZE, SIZE ); + + // background + g.setColor( c.getBackground() ); + int bwh = SIZE - (BORDER_SIZE * 2); + g.fillOval( BORDER_SIZE, BORDER_SIZE, bwh, bwh ); + + // dot + float dotDiameter = DOT_SIZE * animatedValue; + float xy = (SIZE - dotDiameter) / 2f; + g.setColor( color ); + ((Graphics2D)g).fill( new Ellipse2D.Float( xy, xy, dotDiameter, dotDiameter ) ); + } + + @Override + public float getValue( Component c ) { + return ((JRadioButton)c).isSelected() ? 1 : 0; + } + + @Override + public int getAnimationDuration() { + return (Integer) durationField.getValue(); + } + } + + //---- class AnimatedSwitchIcon ------------------------------------------- + + public class AnimatedSwitchIcon + extends FlatAnimatedIcon + { + private final Color offColor = Color.lightGray; + private final Color onColor = Color.red; + + public AnimatedSwitchIcon() { + super( 28, 16, null ); + } + + @Override + public void paintIconAnimated( Component c, Graphics g, int x, int y, float animatedValue ) { + Color color = ColorFunctions.mix( onColor, offColor, animatedValue );; + + g.setColor( color ); + g.fillRoundRect( x, y, width, height, height, height ); + + int thumbSize = height - 4; + int thumbX = x + 2 + Math.round( (width - 4 - thumbSize) * animatedValue ); + int thumbY = y + 2; + g.setColor( Color.white ); + g.fillOval( thumbX, thumbY, thumbSize, thumbSize ); + } + + @Override + public float getValue( Component c ) { + return ((AbstractButton)c).isSelected() ? 1 : 0; + } + + @Override + public int getAnimationDuration() { + return (Integer) durationField.getValue(); + } + } + + //---- class AnimatedMinimalTestIcon -------------------------------------- + + /** + * Minimal example for an animated icon. + */ + private class AnimatedMinimalTestIcon + implements AnimatedIcon + { + @Override + public int getIconWidth() { + return 100; + } + + @Override + public int getIconHeight() { + return 20; + } + + @Override + public void paintIconAnimated( Component c, Graphics g, int x, int y, float animatedValue ) { + int w = getIconWidth(); + int h = getIconHeight(); + + g.setColor( Color.red ); + g.drawRect( x, y, w - 1, h - 1 ); + g.fillRect( x, y, Math.round( w * animatedValue ), h ); + } + + @Override + public float getValue( Component c ) { + return ((AbstractButton)c).isSelected() ? 1 : 0; + } + + @Override + public int getAnimationDuration() { + return (Integer) durationField.getValue(); + } + } +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.jfd new file mode 100644 index 00000000..11c55e81 --- /dev/null +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatAnimatedIconTest.jfd @@ -0,0 +1,72 @@ +JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "insets dialog,hidemode 3" + "$columnConstraints": "[]para[fill]" + "$rowConstraints": "[][][]para[][][grow][]" + } ) { + name: "this" + add( new FormComponent( "javax.swing.JRadioButton" ) { + name: "radioButton1" + "text": "radio 1" + "$buttonGroup": new FormReference( "buttonGroup1" ) + "selected": true + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JRadioButton" ) { + name: "radioButton2" + "text": "radio 2" + "$buttonGroup": new FormReference( "buttonGroup1" ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JRadioButton" ) { + name: "radioButton3" + "text": "radio 3" + "$buttonGroup": new FormReference( "buttonGroup1" ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "checkBox1" + "text": "switch" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "checkBox2" + "text": "minimal" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "durationLabel" + "text": "Duration:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6 2 1" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "durationField" + "model": new javax.swing.SpinnerNumberModel { + minimum: 100 + stepSize: 50 + value: 200 + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6 2 1" + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 415, 350 ) + } ) + add( new FormNonVisual( "javax.swing.ButtonGroup" ) { + name: "buttonGroup1" + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 360 ) + } ) + } +} From a1c7c29113fc792341a90a9d4625bdccdd0ac916 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 7 Dec 2020 12:21:34 +0100 Subject: [PATCH 050/178] FlatComponents2Test: added SwingX JXTable and JXTreeTable to test extended/customized tables --- .../flatlaf/testing/FlatComponents2Test.java | 299 ++++++++++++------ .../flatlaf/testing/FlatComponents2Test.jfd | 276 +++++++++------- 2 files changed, 376 insertions(+), 199 deletions(-) diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java index 370ad4bc..996569cf 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java @@ -22,6 +22,7 @@ import java.awt.EventQueue; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.Transferable; +import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -33,6 +34,15 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import com.formdev.flatlaf.icons.FlatMenuArrowIcon; import net.miginfocom.swing.*; +import org.jdesktop.swingx.JXTable; +import org.jdesktop.swingx.JXTreeTable; +import org.jdesktop.swingx.decorator.ColorHighlighter; +import org.jdesktop.swingx.decorator.HighlightPredicate; +import org.jdesktop.swingx.decorator.Highlighter; +import org.jdesktop.swingx.decorator.HighlighterFactory; +import org.jdesktop.swingx.decorator.PatternPredicate; +import org.jdesktop.swingx.decorator.ShadingColorHighlighter; +import org.jdesktop.swingx.treetable.FileSystemModel; /** * @author Karl Tauber @@ -50,6 +60,7 @@ public class FlatComponents2Test private final TestListModel listModel; private final TestTreeModel treeModel; private final TestTableModel tableModel; + private final JTable[] allTables; FlatComponents2Test() { initComponents(); @@ -67,9 +78,32 @@ public class FlatComponents2Test // table model tableModel = new TestTableModel( (Integer) tableRowCountSpinner.getValue() ); table1.setModel( tableModel ); + xTable1.setModel( tableModel ); // table column editors - TableColumnModel cm = table1.getColumnModel(); + initTableEditors( table1 ); + initTableEditors( xTable1 ); + + // JXTable + Highlighter simpleStriping = HighlighterFactory.createSimpleStriping(); + PatternPredicate patternPredicate = new PatternPredicate( "^J", 2 ); + ColorHighlighter magenta = new ColorHighlighter( patternPredicate, null, Color.MAGENTA, null, Color.MAGENTA ); + ColorHighlighter rollover = new ColorHighlighter( HighlightPredicate.ROLLOVER_ROW, Color.cyan, null ); + Highlighter shading = new ShadingColorHighlighter( new HighlightPredicate.ColumnHighlightPredicate( 1 ) ); + xTable1.setHighlighters( simpleStriping, magenta, rollover, shading ); + + // JXTreeTable + xTreeTable1.setTreeTableModel( new FileSystemModel( new File( "." ) ) ); + xTreeTable1.setHighlighters( simpleStriping, magenta, rollover, shading ); + + allTables = new JTable[] { table1, xTable1, xTreeTable1 }; + + expandTree( tree1 ); + expandTree( tree2 ); + } + + private void initTableEditors( JTable table ) { + TableColumnModel cm = table.getColumnModel(); String[] months = new String[] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" @@ -78,9 +112,6 @@ public class FlatComponents2Test JComboBox editableComboBox = new JComboBox<>( months ); editableComboBox.setEditable( true ); cm.getColumn(3).setCellEditor( new DefaultCellEditor( editableComboBox ) ); - - expandTree( tree1 ); - expandTree( tree2 ); } private void expandTree( JTree tree ) { @@ -133,7 +164,8 @@ public class FlatComponents2Test case "allColumns": autoResizeMode = JTable.AUTO_RESIZE_ALL_COLUMNS; break; } } - table1.setAutoResizeMode( autoResizeMode ); + for( JTable table : allTables ) + table.setAutoResizeMode( autoResizeMode ); } private void dndChanged() { @@ -143,11 +175,15 @@ public class FlatComponents2Test tree1.setDragEnabled( dnd ); tree2.setDragEnabled( dnd ); table1.setDragEnabled( dnd ); + xTable1.setDragEnabled( dnd ); + xTreeTable1.setDragEnabled( dnd ); DropMode dropMode = dnd ? DropMode.ON_OR_INSERT : DropMode.USE_SELECTION; list1.setDropMode( dropMode ); tree1.setDropMode( dropMode ); table1.setDropMode( dropMode ); + xTable1.setDropMode( dropMode ); + xTreeTable1.setDropMode( dropMode ); String key = "FlatLaf.oldTransferHandler"; if( dnd ) { @@ -158,15 +194,27 @@ public class FlatComponents2Test tree1.setTransferHandler( new DummyTransferHandler() ); table1.putClientProperty( key, table1.getTransferHandler() ); + xTable1.putClientProperty( key, xTable1.getTransferHandler() ); + xTreeTable1.putClientProperty( key, xTreeTable1.getTransferHandler() ); table1.setTransferHandler( new DummyTransferHandler() ); + xTable1.setTransferHandler( new DummyTransferHandler() ); + xTreeTable1.setTransferHandler( new DummyTransferHandler() ); } else { list1.setTransferHandler( (TransferHandler) list1.getClientProperty( key ) ); tree1.setTransferHandler( (TransferHandler) tree1.getClientProperty( key ) ); table1.setTransferHandler( (TransferHandler) table1.getClientProperty( key ) ); + xTable1.setTransferHandler( (TransferHandler) xTable1.getClientProperty( key ) ); + xTreeTable1.setTransferHandler( (TransferHandler) xTreeTable1.getClientProperty( key ) ); } } private void tableHeaderButtonChanged() { + tableHeaderButtonChanged( table1ScrollPane ); + tableHeaderButtonChanged( xTable1ScrollPane ); + tableHeaderButtonChanged( xTreeTable1ScrollPane ); + } + + private void tableHeaderButtonChanged( JScrollPane scrollPane ) { boolean show = tableHeaderButtonCheckBox.isSelected(); JButton button = null; if( show ) { @@ -175,31 +223,37 @@ public class FlatComponents2Test JOptionPane.showMessageDialog( this, "hello" ); } ); } - scrollPane5.setCorner( JScrollPane.UPPER_TRAILING_CORNER, button ); + scrollPane.setCorner( JScrollPane.UPPER_TRAILING_CORNER, button ); } private void rowSelectionChanged() { - table1.setRowSelectionAllowed( rowSelectionCheckBox.isSelected() ); + for( JTable table : allTables ) + table.setRowSelectionAllowed( rowSelectionCheckBox.isSelected() ); } private void columnSelectionChanged() { - table1.setColumnSelectionAllowed( columnSelectionCheckBox.isSelected() ); + for( JTable table : allTables ) + table.setColumnSelectionAllowed( columnSelectionCheckBox.isSelected() ); } private void showHorizontalLinesChanged() { - table1.setShowHorizontalLines( showHorizontalLinesCheckBox.isSelected() ); + for( JTable table : allTables ) + table.setShowHorizontalLines( showHorizontalLinesCheckBox.isSelected() ); } private void showVerticalLinesChanged() { - table1.setShowVerticalLines( showVerticalLinesCheckBox.isSelected() ); + for( JTable table : allTables ) + table.setShowVerticalLines( showVerticalLinesCheckBox.isSelected() ); } private void intercellSpacingChanged() { - table1.setIntercellSpacing( intercellSpacingCheckBox.isSelected() ? new Dimension( 1, 1 ) : new Dimension() ); + for( JTable table : allTables ) + table.setIntercellSpacing( intercellSpacingCheckBox.isSelected() ? new Dimension( 1, 1 ) : new Dimension() ); } private void redGridColorChanged() { - table1.setGridColor( redGridColorCheckBox.isSelected() ? Color.red : UIManager.getColor( "Table.gridColor" ) ); + for( JTable table : allTables ) + table.setGridColor( redGridColorCheckBox.isSelected() ? Color.red : UIManager.getColor( "Table.gridColor" ) ); } @Override @@ -218,28 +272,31 @@ public class FlatComponents2Test JLabel textFieldLabel = new JLabel(); JTextField textField1 = new JTextField(); JTextField textField2 = new JTextField(); + JTextField textField3 = new JTextField(); + JTextField textField4 = new JTextField(); + JPanel panel1 = new JPanel(); JLabel listLabel = new JLabel(); + JLabel listRowCountLabel = new JLabel(); + listRowCountSpinner = new JSpinner(); JScrollPane scrollPane1 = new JScrollPane(); list1 = new JList<>(); JScrollPane scrollPane2 = new JScrollPane(); list2 = new JList<>(); - JPanel listOptionsPanel = new JPanel(); - JLabel listRowCountLabel = new JLabel(); - listRowCountSpinner = new JSpinner(); + JPanel panel2 = new JPanel(); JLabel treeLabel = new JLabel(); + JLabel treeRowCountLabel = new JLabel(); + treeRowCountSpinner = new JSpinner(); JScrollPane scrollPane3 = new JScrollPane(); tree1 = new JTree(); JScrollPane scrollPane4 = new JScrollPane(); tree2 = new JTree(); - JPanel treeOptionsPanel = new JPanel(); - JLabel treeRowCountLabel = new JLabel(); - treeRowCountSpinner = new JSpinner(); + JPanel panel3 = new JPanel(); JLabel tableLabel = new JLabel(); - scrollPane5 = new JScrollPane(); - table1 = new JTable(); - JPanel tableOptionsPanel = new JPanel(); JLabel tableRowCountLabel = new JLabel(); tableRowCountSpinner = new JSpinner(); + table1ScrollPane = new JScrollPane(); + table1 = new JTable(); + JPanel tableOptionsPanel = new JPanel(); JLabel autoResizeModeLabel = new JLabel(); autoResizeModeField = new JComboBox<>(); showHorizontalLinesCheckBox = new JCheckBox(); @@ -250,15 +307,23 @@ public class FlatComponents2Test columnSelectionCheckBox = new JCheckBox(); dndCheckBox = new JCheckBox(); tableHeaderButtonCheckBox = new JCheckBox(); + JLabel label1 = new JLabel(); + xTable1ScrollPane = new JScrollPane(); + xTable1 = new JXTable(); + JLabel label2 = new JLabel(); + xTreeTable1ScrollPane = new JScrollPane(); + xTreeTable1 = new JXTreeTable(); //======== this ======== setLayout(new MigLayout( "ltr,insets dialog,hidemode 3", // columns "[]" + - "[200,fill]" + - "[200,fill]" + - "[fill]", + "[200,grow,sizegroup 1,fill]" + + "[200,grow,sizegroup 1,fill]" + + "[fill]" + + "[200,grow,sizegroup 1,fill]" + + "[200,grow,sizegroup 1,fill]", // rows "[]" + "[150,grow,sizegroup 1,fill]" + @@ -278,9 +343,41 @@ public class FlatComponents2Test textField2.setEnabled(false); add(textField2, "cell 2 0,growx"); - //---- listLabel ---- - listLabel.setText("JList:"); - add(listLabel, "cell 0 1,aligny top,growy 0"); + //---- textField3 ---- + textField3.setText("editable"); + add(textField3, "cell 4 0,growx"); + + //---- textField4 ---- + textField4.setText("disabled"); + textField4.setEnabled(false); + add(textField4, "cell 5 0,growx"); + + //======== panel1 ======== + { + panel1.setLayout(new MigLayout( + "ltr,insets 0,hidemode 3", + // columns + "[fill]", + // rows + "[]" + + "[grow]" + + "[]" + + "[]")); + + //---- listLabel ---- + listLabel.setText("JList:"); + panel1.add(listLabel, "cell 0 0,aligny top,growy 0"); + + //---- listRowCountLabel ---- + listRowCountLabel.setText("Row count:"); + panel1.add(listRowCountLabel, "cell 0 2"); + + //---- listRowCountSpinner ---- + listRowCountSpinner.setModel(new SpinnerNumberModel(20, 0, null, 10)); + listRowCountSpinner.addChangeListener(e -> listRowCountChanged()); + panel1.add(listRowCountSpinner, "cell 0 3"); + } + add(panel1, "cell 0 1"); //======== scrollPane1 ======== { @@ -297,30 +394,32 @@ public class FlatComponents2Test } add(scrollPane2, "cell 2 1"); - //======== listOptionsPanel ======== + //======== panel2 ======== { - listOptionsPanel.setLayout(new MigLayout( - "hidemode 3", + panel2.setLayout(new MigLayout( + "insets 0,hidemode 3", // columns - "[fill]" + - "[90,fill]", + "[fill]", // rows + "[]" + + "[grow]" + + "[]" + "[]")); - //---- listRowCountLabel ---- - listRowCountLabel.setText("Row count:"); - listOptionsPanel.add(listRowCountLabel, "cell 0 0"); + //---- treeLabel ---- + treeLabel.setText("JTree:"); + panel2.add(treeLabel, "cell 0 0,aligny top,growy 0"); - //---- listRowCountSpinner ---- - listRowCountSpinner.setModel(new SpinnerNumberModel(20, 0, null, 10)); - listRowCountSpinner.addChangeListener(e -> listRowCountChanged()); - listOptionsPanel.add(listRowCountSpinner, "cell 1 0"); + //---- treeRowCountLabel ---- + treeRowCountLabel.setText("Row count:"); + panel2.add(treeRowCountLabel, "cell 0 2"); + + //---- treeRowCountSpinner ---- + treeRowCountSpinner.setModel(new SpinnerNumberModel(20, 20, null, 20)); + treeRowCountSpinner.addChangeListener(e -> treeRowCountChanged()); + panel2.add(treeRowCountSpinner, "cell 0 3"); } - add(listOptionsPanel, "cell 3 1"); - - //---- treeLabel ---- - treeLabel.setText("JTree:"); - add(treeLabel, "cell 0 2,aligny top,growy 0"); + add(panel2, "cell 3 1"); //======== scrollPane3 ======== { @@ -330,7 +429,7 @@ public class FlatComponents2Test tree1.setEditable(true); scrollPane3.setViewportView(tree1); } - add(scrollPane3, "cell 1 2"); + add(scrollPane3, "cell 4 1"); //======== scrollPane4 ======== { @@ -339,41 +438,43 @@ public class FlatComponents2Test tree2.setEnabled(false); scrollPane4.setViewportView(tree2); } - add(scrollPane4, "cell 2 2"); + add(scrollPane4, "cell 5 1"); - //======== treeOptionsPanel ======== + //======== panel3 ======== { - treeOptionsPanel.setLayout(new MigLayout( - "hidemode 3", + panel3.setLayout(new MigLayout( + "insets 0,hidemode 3", // columns - "[fill]" + - "[90,fill]", + "[fill]", // rows + "[]" + + "[grow]" + + "[]" + "[]")); - //---- treeRowCountLabel ---- - treeRowCountLabel.setText("Row count:"); - treeOptionsPanel.add(treeRowCountLabel, "cell 0 0"); + //---- tableLabel ---- + tableLabel.setText("JTable:"); + panel3.add(tableLabel, "cell 0 0"); - //---- treeRowCountSpinner ---- - treeRowCountSpinner.setModel(new SpinnerNumberModel(20, 20, null, 20)); - treeRowCountSpinner.addChangeListener(e -> treeRowCountChanged()); - treeOptionsPanel.add(treeRowCountSpinner, "cell 1 0"); + //---- tableRowCountLabel ---- + tableRowCountLabel.setText("Row count:"); + panel3.add(tableRowCountLabel, "cell 0 2"); + + //---- tableRowCountSpinner ---- + tableRowCountSpinner.setModel(new SpinnerNumberModel(20, 0, null, 10)); + tableRowCountSpinner.addChangeListener(e -> tableRowCountChanged()); + panel3.add(tableRowCountSpinner, "cell 0 3"); } - add(treeOptionsPanel, "cell 3 2"); + add(panel3, "cell 0 2"); - //---- tableLabel ---- - tableLabel.setText("JTable:"); - add(tableLabel, "cell 0 3,aligny top,growy 0"); - - //======== scrollPane5 ======== + //======== table1ScrollPane ======== { //---- table1 ---- table1.setAutoCreateRowSorter(true); - scrollPane5.setViewportView(table1); + table1ScrollPane.setViewportView(table1); } - add(scrollPane5, "cell 1 3 2 1,width 300"); + add(table1ScrollPane, "cell 1 2 2 1,width 300"); //======== tableOptionsPanel ======== { @@ -381,10 +482,9 @@ public class FlatComponents2Test "hidemode 3", // columns "[]" + - "[90,fill]", + "[]", // rows "[]" + - "[]" + "[]0" + "[]0" + "[]0" + @@ -394,18 +494,9 @@ public class FlatComponents2Test "[]0" + "[]")); - //---- tableRowCountLabel ---- - tableRowCountLabel.setText("Row count:"); - tableOptionsPanel.add(tableRowCountLabel, "cell 0 0"); - - //---- tableRowCountSpinner ---- - tableRowCountSpinner.setModel(new SpinnerNumberModel(20, 0, null, 10)); - tableRowCountSpinner.addChangeListener(e -> tableRowCountChanged()); - tableOptionsPanel.add(tableRowCountSpinner, "cell 1 0"); - //---- autoResizeModeLabel ---- autoResizeModeLabel.setText("Auto resize mode:"); - tableOptionsPanel.add(autoResizeModeLabel, "cell 0 1"); + tableOptionsPanel.add(autoResizeModeLabel, "cell 0 0"); //---- autoResizeModeField ---- autoResizeModeField.setModel(new DefaultComboBoxModel<>(new String[] { @@ -417,64 +508,84 @@ public class FlatComponents2Test })); autoResizeModeField.setSelectedIndex(2); autoResizeModeField.addActionListener(e -> autoResizeModeChanged()); - tableOptionsPanel.add(autoResizeModeField, "cell 1 1"); + tableOptionsPanel.add(autoResizeModeField, "cell 1 0"); //---- showHorizontalLinesCheckBox ---- showHorizontalLinesCheckBox.setText("show horizontal lines"); showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged()); - tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 2 2 1"); + tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 1"); //---- showVerticalLinesCheckBox ---- showVerticalLinesCheckBox.setText("show vertical lines"); showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged()); - tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 3 2 1"); + tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 2"); //---- intercellSpacingCheckBox ---- intercellSpacingCheckBox.setText("intercell spacing"); intercellSpacingCheckBox.addActionListener(e -> intercellSpacingChanged()); - tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 4 2 1"); + tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 3"); //---- redGridColorCheckBox ---- redGridColorCheckBox.setText("red grid color"); redGridColorCheckBox.addActionListener(e -> redGridColorChanged()); - tableOptionsPanel.add(redGridColorCheckBox, "cell 0 5 2 1"); + tableOptionsPanel.add(redGridColorCheckBox, "cell 0 4"); //---- rowSelectionCheckBox ---- rowSelectionCheckBox.setText("row selection"); rowSelectionCheckBox.setSelected(true); rowSelectionCheckBox.addActionListener(e -> rowSelectionChanged()); - tableOptionsPanel.add(rowSelectionCheckBox, "cell 0 6 2 1"); + tableOptionsPanel.add(rowSelectionCheckBox, "cell 0 5"); //---- columnSelectionCheckBox ---- columnSelectionCheckBox.setText("column selection"); columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged()); - tableOptionsPanel.add(columnSelectionCheckBox, "cell 0 7 2 1"); + tableOptionsPanel.add(columnSelectionCheckBox, "cell 0 6"); //---- dndCheckBox ---- dndCheckBox.setText("enable drag and drop"); dndCheckBox.setMnemonic('D'); dndCheckBox.addActionListener(e -> dndChanged()); - tableOptionsPanel.add(dndCheckBox, "cell 0 8 2 1"); + tableOptionsPanel.add(dndCheckBox, "cell 0 7"); //---- tableHeaderButtonCheckBox ---- tableHeaderButtonCheckBox.setText("show button in table header"); tableHeaderButtonCheckBox.addActionListener(e -> tableHeaderButtonChanged()); - tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 0 9 2 1"); + tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 0 8 2 1"); } - add(tableOptionsPanel, "cell 3 3"); + add(tableOptionsPanel, "cell 4 2 2 1"); + + //---- label1 ---- + label1.setText("JXTable:"); + add(label1, "cell 0 3,aligny top,growy 0"); + + //======== xTable1ScrollPane ======== + { + xTable1ScrollPane.setViewportView(xTable1); + } + add(xTable1ScrollPane, "cell 1 3 2 1"); + + //---- label2 ---- + label2.setText("JXTreeTable:"); + add(label2, "cell 3 3,aligny top,growy 0"); + + //======== xTreeTable1ScrollPane ======== + { + xTreeTable1ScrollPane.setViewportView(xTreeTable1); + } + add(xTreeTable1ScrollPane, "cell 4 3 2 1"); // JFormDesigner - End of component initialization //GEN-END:initComponents } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables + private JSpinner listRowCountSpinner; private JList list1; private JList list2; - private JSpinner listRowCountSpinner; + private JSpinner treeRowCountSpinner; private JTree tree1; private JTree tree2; - private JSpinner treeRowCountSpinner; - private JScrollPane scrollPane5; - private JTable table1; private JSpinner tableRowCountSpinner; + private JScrollPane table1ScrollPane; + private JTable table1; private JComboBox autoResizeModeField; private JCheckBox showHorizontalLinesCheckBox; private JCheckBox showVerticalLinesCheckBox; @@ -484,6 +595,10 @@ public class FlatComponents2Test private JCheckBox columnSelectionCheckBox; private JCheckBox dndCheckBox; private JCheckBox tableHeaderButtonCheckBox; + private JScrollPane xTable1ScrollPane; + private JXTable xTable1; + private JScrollPane xTreeTable1ScrollPane; + private JXTreeTable xTreeTable1; // JFormDesigner - End of variables declaration //GEN-END:variables private final String[] randomRowStrings = new String[1000]; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd index 3fa4d2c0..9e88c213 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.0.337" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -8,7 +8,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": "[][200,fill][200,fill][fill]" + "$columnConstraints": "[][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill][fill][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill]" "$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill]" } ) { name: "this" @@ -31,11 +31,53 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 0,growx" } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "listLabel" - "text": "JList:" + add( new FormComponent( "javax.swing.JTextField" ) { + name: "textField3" + "text": "editable" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1,aligny top,growy 0" + "value": "cell 4 0,growx" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "textField4" + "text": "disabled" + "enabled": false + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 0,growx" + } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$columnConstraints": "[fill]" + "$rowConstraints": "[][grow][][]" + "$layoutConstraints": "ltr,insets 0,hidemode 3" + } ) { + name: "panel1" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "listLabel" + "text": "JList:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0,aligny top,growy 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "listRowCountLabel" + "text": "Row count:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "listRowCountSpinner" + "model": &SpinnerNumberModel0 new javax.swing.SpinnerNumberModel { + minimum: 0 + stepSize: 10 + value: 20 + } + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "listRowCountChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" } ) add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { name: "scrollPane1" @@ -63,76 +105,22 @@ new FormModel { "value": "cell 2 1" } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$layoutConstraints": "hidemode 3" - "$columnConstraints": "[fill][90,fill]" - "$rowConstraints": "[]" + "$layoutConstraints": "insets 0,hidemode 3" + "$columnConstraints": "[fill]" + "$rowConstraints": "[][grow][][]" } ) { - name: "listOptionsPanel" + name: "panel2" add( new FormComponent( "javax.swing.JLabel" ) { - name: "listRowCountLabel" - "text": "Row count:" + name: "treeLabel" + "text": "JTree:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" + "value": "cell 0 0,aligny top,growy 0" } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "listRowCountSpinner" - "model": &SpinnerNumberModel0 new javax.swing.SpinnerNumberModel { - minimum: 0 - stepSize: 10 - value: 20 - } - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "listRowCountChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 0" - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 1" - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "treeLabel" - "text": "JTree:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2,aligny top,growy 0" - } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane3" - add( new FormComponent( "javax.swing.JTree" ) { - name: "tree1" - "showsRootHandles": true - "editable": true - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 2" - } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane4" - add( new FormComponent( "javax.swing.JTree" ) { - name: "tree2" - "enabled": false - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 2 2" - } ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$layoutConstraints": "hidemode 3" - "$columnConstraints": "[fill][90,fill]" - "$rowConstraints": "[]" - } ) { - name: "treeOptionsPanel" add( new FormComponent( "javax.swing.JLabel" ) { name: "treeRowCountLabel" "text": "Row count:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" + "value": "cell 0 2" } ) add( new FormComponent( "javax.swing.JSpinner" ) { name: "treeRowCountSpinner" @@ -146,19 +134,69 @@ new FormModel { } addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "treeRowCountChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 0" + "value": "cell 0 3" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 2" - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "tableLabel" - "text": "JTable:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3,aligny top,growy 0" + "value": "cell 3 1" } ) add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane5" + name: "scrollPane3" + add( new FormComponent( "javax.swing.JTree" ) { + name: "tree1" + "showsRootHandles": true + "editable": true + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 1" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane4" + add( new FormComponent( "javax.swing.JTree" ) { + name: "tree2" + "enabled": false + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 1" + } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "insets 0,hidemode 3" + "$columnConstraints": "[fill]" + "$rowConstraints": "[][grow][][]" + } ) { + name: "panel3" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "tableLabel" + "text": "JTable:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "tableRowCountLabel" + "text": "Row count:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "tableRowCountSpinner" + "model": #SpinnerNumberModel0 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tableRowCountChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "table1ScrollPane" auxiliary() { "JavaCodeGenerator.variableLocal": false } @@ -170,35 +208,19 @@ new FormModel { } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 3 2 1,width 300" + "value": "cell 1 2 2 1,width 300" } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "hidemode 3" - "$columnConstraints": "[][90,fill]" - "$rowConstraints": "[][][]0[]0[]0[]0[]0[]0[]0[]" + "$columnConstraints": "[][]" + "$rowConstraints": "[][]0[]0[]0[]0[]0[]0[]0[]" } ) { name: "tableOptionsPanel" - add( new FormComponent( "javax.swing.JLabel" ) { - name: "tableRowCountLabel" - "text": "Row count:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "tableRowCountSpinner" - "model": #SpinnerNumberModel0 - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tableRowCountChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 0" - } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "autoResizeModeLabel" "text": "Auto resize mode:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" + "value": "cell 0 0" } ) add( new FormComponent( "javax.swing.JComboBox" ) { name: "autoResizeModeField" @@ -217,7 +239,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "autoResizeModeChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 1" + "value": "cell 1 0" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "showHorizontalLinesCheckBox" @@ -227,7 +249,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2 2 1" + "value": "cell 0 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "showVerticalLinesCheckBox" @@ -237,7 +259,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3 2 1" + "value": "cell 0 2" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "intercellSpacingCheckBox" @@ -247,7 +269,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 4 2 1" + "value": "cell 0 3" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "redGridColorCheckBox" @@ -257,7 +279,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 5 2 1" + "value": "cell 0 4" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "rowSelectionCheckBox" @@ -268,7 +290,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowSelectionChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 6 2 1" + "value": "cell 0 5" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "columnSelectionCheckBox" @@ -278,7 +300,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "columnSelectionChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 7 2 1" + "value": "cell 0 6" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "dndCheckBox" @@ -289,7 +311,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "dndChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 8 2 1" + "value": "cell 0 7" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "tableHeaderButtonCheckBox" @@ -299,10 +321,50 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tableHeaderButtonChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 9 2 1" + "value": "cell 0 8 2 1" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 3" + "value": "cell 4 2 2 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label1" + "text": "JXTable:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3,aligny top,growy 0" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "xTable1ScrollPane" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + add( new FormComponent( "org.jdesktop.swingx.JXTable" ) { + name: "xTable1" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 3 2 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label2" + "text": "JXTreeTable:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 3,aligny top,growy 0" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "xTreeTable1ScrollPane" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + add( new FormComponent( "org.jdesktop.swingx.JXTreeTable" ) { + name: "xTreeTable1" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 3 2 1" } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) From 81c35eab4631cad089d61d6df63a94f5801e1c7c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 7 Dec 2020 12:28:31 +0100 Subject: [PATCH 051/178] SwingX: fixed striping background highlighting color (e.g. alternating table rows) in dark themes Table: made grid lines slightly darker/lighter --- CHANGELOG.md | 8 ++++++++ .../resources/com/formdev/flatlaf/FlatDarkLaf.properties | 2 +- .../resources/com/formdev/flatlaf/FlatLightLaf.properties | 2 +- .../com/formdev/flatlaf/swingx/FlatDarkLaf.properties | 5 +++++ .../com/formdev/flatlaf/swingx/FlatLightLaf.properties | 5 +++++ .../dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt | 7 ++++++- .../dumps/uidefaults/FlatLightLaf_1.8.0_202.txt | 7 ++++++- .../com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt | 1 + 8 files changed, 33 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 066597ed..d7a408f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ FlatLaf Change Log ================== +## 0.46-SNAPSHOT + +#### Fixed bugs + +- SwingX: Fixed striping background highlighting color (e.g. alternating table + rows) in dark themes. + + ## 0.45 #### New features and improvements diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 201e8cd5..0839f741 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -275,7 +275,7 @@ TabbedPane.closePressedForeground=$TabbedPane.closeHoverForeground #---- Table ---- -Table.gridColor=lighten($Table.background,3%) +Table.gridColor=lighten($Table.background,5%) #---- TableHeader ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index db395e08..528ec370 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -287,7 +287,7 @@ TabbedPane.closePressedForeground=$TabbedPane.closeHoverForeground #---- Table ---- -Table.gridColor=darken($Table.background,3%) +Table.gridColor=darken($Table.background,5%) #---- TableHeader ---- diff --git a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties index 98e3238d..f3ec2b98 100644 --- a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties +++ b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties @@ -26,6 +26,11 @@ JXHeader.background=@background JXHeader.startBackground=#4c5052 +#---- HighlighterFactory ---- + +UIColorHighlighter.stripingBackground=lighten(@textComponentBackground,5%) + + #---- Hyperlink ---- Hyperlink.linkColor=#589df6 diff --git a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties index 84e09193..094a29fe 100644 --- a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties +++ b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties @@ -26,6 +26,11 @@ JXHeader.background=@background JXHeader.startBackground=#fff +#---- HighlighterFactory ---- + +UIColorHighlighter.stripingBackground=darken(@textComponentBackground,5%) + + #---- Hyperlink ---- Hyperlink.linkColor=$Component.linkColor diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 1c7e4b6f..551fcb67 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -995,7 +995,7 @@ Table.focusCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.F Table.focusSelectedCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Selected [UI] lineColor=#000000 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000 Table.font [active] $defaultFont [UI] Table.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] -Table.gridColor #4c5152 javax.swing.plaf.ColorUIResource [UI] +Table.gridColor #515657 javax.swing.plaf.ColorUIResource [UI] Table.intercellSpacing 0,0 javax.swing.plaf.DimensionUIResource [UI] Table.rowHeight 20 Table.scrollPaneBorder [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI] @@ -1273,6 +1273,11 @@ Tree.wideSelection true TreeUI com.formdev.flatlaf.ui.FlatTreeUI +#---- UIColorHighlighter ---- + +UIColorHighlighter.stripingBackground #515657 javax.swing.plaf.ColorUIResource [UI] + + #---- Viewport ---- Viewport.background #3c3f41 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index d522dd47..d96e0e19 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -1000,7 +1000,7 @@ Table.focusCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.F Table.focusSelectedCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Selected [UI] lineColor=#000000 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000 Table.font [active] $defaultFont [UI] Table.foreground #000000 javax.swing.plaf.ColorUIResource [UI] -Table.gridColor #f7f7f7 javax.swing.plaf.ColorUIResource [UI] +Table.gridColor #f2f2f2 javax.swing.plaf.ColorUIResource [UI] Table.intercellSpacing 0,0 javax.swing.plaf.DimensionUIResource [UI] Table.rowHeight 20 Table.scrollPaneBorder [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI] @@ -1278,6 +1278,11 @@ Tree.wideSelection true TreeUI com.formdev.flatlaf.ui.FlatTreeUI +#---- UIColorHighlighter ---- + +UIColorHighlighter.stripingBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] + + #---- Viewport ---- Viewport.background #f2f2f2 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 e09ea5df..8016d60d 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 @@ -928,6 +928,7 @@ Tree.textForeground Tree.timeFactor Tree.wideSelection TreeUI +UIColorHighlighter.stripingBackground Viewport.background Viewport.font Viewport.foreground From cfbe44b94617c76db4255a44be8f2bae4f33225c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 9 Dec 2020 00:33:01 +0100 Subject: [PATCH 052/178] TableHeader: fixed position of column separators in right-to-left component orientation; do not paint anything if column count is zero --- CHANGELOG.md | 2 ++ .../java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7a408f3..99aaf85d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FlatLaf Change Log #### Fixed bugs +- TableHeader: Fixed position of column separators in right-to-left component + orientation. - SwingX: Fixed striping background highlighting color (e.g. alternating table rows) in dark themes. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java index c311da68..a3ca46a7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java @@ -98,10 +98,13 @@ public class FlatTableHeaderUI @Override public void paint( Graphics g, JComponent c ) { + if( header.getColumnModel().getColumnCount() <= 0 ) + return; + // do not paint borders if JTableHeader.setDefaultRenderer() was used TableCellRenderer defaultRenderer = header.getDefaultRenderer(); boolean paintBorders = isSystemDefaultRenderer( defaultRenderer ); - if( !paintBorders && header.getColumnModel().getColumnCount() > 0 ) { + if( !paintBorders ) { // check whether the renderer delegates to the system default renderer Component rendererComponent = defaultRenderer.getTableCellRendererComponent( header.getTable(), "", false, false, -1, 0 ); @@ -168,7 +171,8 @@ public class FlatTableHeaderUI g2.fill( new Rectangle2D.Float( x - lineWidth, topLineIndent, lineWidth, height - bottomLineIndent ) ); } } else { - int x = width; + Rectangle cellRect = header.getHeaderRect( 0 ); + int x = cellRect.x + cellRect.width; for( int i = 0; i < sepCount; i++ ) { x -= columnModel.getColumn( i ).getWidth(); g2.fill( new Rectangle2D.Float( x - (i < sepCount - 1 ? lineWidth : 0), From eabb1f84f6c94cd97a84b1d39c3a36b0f5320a07 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 9 Dec 2020 23:04:04 +0100 Subject: [PATCH 053/178] Table and TableHeader: fixed missing right vertical grid line if using table as row header in scroll pane (issues #152 and #46) --- CHANGELOG.md | 2 + .../formdev/flatlaf/ui/FlatTableHeaderUI.java | 54 ++++--- .../com/formdev/flatlaf/ui/FlatTableUI.java | 36 +++-- .../flatlaf/testing/FlatComponents2Test.java | 132 +++++++++++++++++- .../flatlaf/testing/FlatComponents2Test.jfd | 18 ++- 5 files changed, 208 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99aaf85d..4d2b276c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FlatLaf Change Log #### Fixed bugs +- Table and TableHeader: Fixed missing right vertical grid line if using table + as row header in scroll pane. (issues #152 and #46) - TableHeader: Fixed position of column separators in right-to-left component orientation. - SwingX: Fixed striping background highlighting color (e.g. alternating table diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java index a3ca46a7..50722d54 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java @@ -31,6 +31,7 @@ import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.ScrollPaneConstants; import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.border.Border; @@ -148,6 +149,9 @@ public class FlatTableHeaderUI float bottomLineIndent = lineWidth * 3; TableColumnModel columnModel = header.getColumnModel(); int columnCount = columnModel.getColumnCount(); + int sepCount = columnCount; + if( hideLastVerticalLine() ) + sepCount--; Graphics2D g2 = (Graphics2D) g.create(); try { @@ -160,24 +164,30 @@ public class FlatTableHeaderUI // paint column separator lines g2.setColor( separatorColor ); - int sepCount = columnCount; - if( header.getTable() != null && header.getTable().getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && !isVerticalScrollBarVisible() ) - sepCount--; + float y = topLineIndent; + float h = height - bottomLineIndent; if( header.getComponentOrientation().isLeftToRight() ) { int x = 0; for( int i = 0; i < sepCount; i++ ) { x += columnModel.getColumn( i ).getWidth(); - g2.fill( new Rectangle2D.Float( x - lineWidth, topLineIndent, lineWidth, height - bottomLineIndent ) ); + g2.fill( new Rectangle2D.Float( x - lineWidth, y, lineWidth, h ) ); } + + // paint trailing separator (on right side) + if( !hideTrailingVerticalLine() ) + g2.fill( new Rectangle2D.Float( header.getWidth() - lineWidth, y, lineWidth, h ) ); } else { Rectangle cellRect = header.getHeaderRect( 0 ); int x = cellRect.x + cellRect.width; for( int i = 0; i < sepCount; i++ ) { x -= columnModel.getColumn( i ).getWidth(); - g2.fill( new Rectangle2D.Float( x - (i < sepCount - 1 ? lineWidth : 0), - topLineIndent, lineWidth, height - bottomLineIndent ) ); + g2.fill( new Rectangle2D.Float( x - (i < sepCount - 1 ? lineWidth : 0), y, lineWidth, h ) ); } + + // paint trailing separator (on left side) + if( !hideTrailingVerticalLine() ) + g2.fill( new Rectangle2D.Float( 0, y, lineWidth, h ) ); } } finally { g2.dispose(); @@ -234,20 +244,30 @@ public class FlatTableHeaderUI return size; } - private boolean isVerticalScrollBarVisible() { - JScrollPane scrollPane = getScrollPane(); - return (scrollPane != null && scrollPane.getVerticalScrollBar() != null) - ? scrollPane.getVerticalScrollBar().isVisible() - : false; + protected boolean hideLastVerticalLine() { + Container viewport = header.getParent(); + Container viewportParent = (viewport != null) ? viewport.getParent() : null; + if( !(viewportParent instanceof JScrollPane) ) + return false; + + Rectangle cellRect = header.getHeaderRect( header.getColumnModel().getColumnCount() - 1 ); + + // using component orientation of scroll pane here because it is also used in FlatTableUI + JScrollPane scrollPane = (JScrollPane) viewportParent; + return scrollPane.getComponentOrientation().isLeftToRight() + ? cellRect.x + cellRect.width >= viewport.getWidth() + : cellRect.x <= 0; } - private JScrollPane getScrollPane() { - Container parent = header.getParent(); - if( parent == null ) - return null; + protected boolean hideTrailingVerticalLine() { + Container viewport = header.getParent(); + Container viewportParent = (viewport != null) ? viewport.getParent() : null; + if( !(viewportParent instanceof JScrollPane) ) + return false; - parent = parent.getParent(); - return (parent instanceof JScrollPane) ? (JScrollPane) parent : null; + JScrollPane scrollPane = (JScrollPane) viewportParent; + return viewport == scrollPane.getColumnHeader() && + scrollPane.getCorner( ScrollPaneConstants.UPPER_TRAILING_CORNER ) == null; } //---- class FlatTableCellHeaderRenderer ---------------------------------- diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java index ea73f861..f436f195 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.ui; import java.awt.Color; +import java.awt.Container; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Graphics; @@ -26,8 +27,10 @@ import java.awt.event.FocusListener; import java.awt.geom.Rectangle2D; import javax.swing.JCheckBox; import javax.swing.JComponent; -import javax.swing.JTable; +import javax.swing.JScrollPane; +import javax.swing.JViewport; import javax.swing.LookAndFeel; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicTableUI; @@ -215,16 +218,11 @@ public class FlatTableUI boolean verticalLines = table.getShowVerticalLines(); if( horizontalLines || verticalLines ) { // fix grid painting issues in BasicTableUI - // - do not paint last vertical grid line if auto-resize mode is not off - // - in right-to-left component orientation, do not paint last vertical grid line - // in any auto-resize mode; can not paint on left side of table because - // cells are painted over left line + // - do not paint last vertical grid line if line is on right edge of scroll pane // - fix unstable grid line thickness when scaled at 125%, 150%, 175%, 225%, ... // which paints either 1px or 2px lines depending on location - boolean hideLastVerticalLine = - table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF || - !table.getComponentOrientation().isLeftToRight(); + boolean hideLastVerticalLine = hideLastVerticalLine(); int tableWidth = table.getWidth(); double systemScaleFactor = UIScale.getSystemScaleFactor( (Graphics2D) g ); @@ -281,4 +279,26 @@ public class FlatTableUI super.paint( g, c ); } + + protected boolean hideLastVerticalLine() { + Container viewport = SwingUtilities.getUnwrappedParent( table ); + Container viewportParent = (viewport != null) ? viewport.getParent() : null; + if( !(viewportParent instanceof JScrollPane) ) + return false; + + // do not hide last vertical line if table is smaller than viewport + if( table.getX() + table.getWidth() < viewport.getWidth() ) + return false; + + // in left-to-right: + // - do not hide last vertical line if table used as row header in scroll pane + // in right-to-left: + // - hide last vertical line if table used as row header in scroll pane + // - do not hide last vertical line if table is in center and scroll pane has row header + JScrollPane scrollPane = (JScrollPane) viewportParent; + JViewport rowHeader = scrollPane.getRowHeader(); + return scrollPane.getComponentOrientation().isLeftToRight() + ? (viewport != rowHeader) + : (viewport == rowHeader || rowHeader == null); + } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java index 996569cf..819fbe85 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java @@ -17,6 +17,8 @@ package com.formdev.flatlaf.testing; import java.awt.Color; +import java.awt.Component; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.datatransfer.DataFlavor; @@ -29,10 +31,13 @@ import java.util.List; import java.util.Map; import java.util.Random; import javax.swing.*; +import javax.swing.event.TableModelEvent; +import javax.swing.event.TableModelListener; import javax.swing.table.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import com.formdev.flatlaf.icons.FlatMenuArrowIcon; +import com.formdev.flatlaf.util.UIScale; import net.miginfocom.swing.*; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.JXTreeTable; @@ -53,6 +58,7 @@ public class FlatComponents2Test public static void main( String[] args ) { SwingUtilities.invokeLater( () -> { FlatTestFrame frame = FlatTestFrame.create( args, "FlatComponents2Test" ); + frame.useApplyComponentOrientation = true; frame.showFrame( FlatComponents2Test::new ); } ); } @@ -60,7 +66,9 @@ public class FlatComponents2Test private final TestListModel listModel; private final TestTreeModel treeModel; private final TestTableModel tableModel; - private final JTable[] allTables; + private final List allTables = new ArrayList<>(); + private final List allTablesInclRowHeader = new ArrayList<>(); + private JTable rowHeaderTable1; FlatComponents2Test() { initComponents(); @@ -96,7 +104,10 @@ public class FlatComponents2Test xTreeTable1.setTreeTableModel( new FileSystemModel( new File( "." ) ) ); xTreeTable1.setHighlighters( simpleStriping, magenta, rollover, shading ); - allTables = new JTable[] { table1, xTable1, xTreeTable1 }; + allTables.add( table1 ); + allTables.add( xTable1 ); + allTables.add( xTreeTable1 ); + allTablesInclRowHeader.addAll( allTables ); expandTree( tree1 ); expandTree( tree2 ); @@ -219,6 +230,7 @@ public class FlatComponents2Test JButton button = null; if( show ) { button = new JButton( new FlatMenuArrowIcon() ); + button.applyComponentOrientation( getComponentOrientation() ); button.addActionListener( e -> { JOptionPane.showMessageDialog( this, "hello" ); } ); @@ -237,25 +249,72 @@ public class FlatComponents2Test } private void showHorizontalLinesChanged() { - for( JTable table : allTables ) + for( JTable table : allTablesInclRowHeader ) table.setShowHorizontalLines( showHorizontalLinesCheckBox.isSelected() ); } private void showVerticalLinesChanged() { - for( JTable table : allTables ) + for( JTable table : allTablesInclRowHeader ) table.setShowVerticalLines( showVerticalLinesCheckBox.isSelected() ); } private void intercellSpacingChanged() { - for( JTable table : allTables ) + for( JTable table : allTablesInclRowHeader ) table.setIntercellSpacing( intercellSpacingCheckBox.isSelected() ? new Dimension( 1, 1 ) : new Dimension() ); } private void redGridColorChanged() { - for( JTable table : allTables ) + for( JTable table : allTablesInclRowHeader ) table.setGridColor( redGridColorCheckBox.isSelected() ? Color.red : UIManager.getColor( "Table.gridColor" ) ); } + private void rowHeaderChanged() { + if( rowHeaderCheckBox.isSelected() ) { + TestTableRowHeaderModel rowHeaderModel = new TestTableRowHeaderModel( tableModel ); + rowHeaderTable1 = new JTable( rowHeaderModel ); + rowHeaderTable1.setPreferredScrollableViewportSize( UIScale.scale( new Dimension( 50, 50 ) ) ); + rowHeaderTable1.setSelectionModel( table1.getSelectionModel() ); + + DefaultTableCellRenderer rowHeaderRenderer = new DefaultTableCellRenderer(); + rowHeaderRenderer.setHorizontalAlignment( JLabel.CENTER ); + rowHeaderTable1.setDefaultRenderer( Object.class, rowHeaderRenderer ); + table1ScrollPane.setRowHeaderView( rowHeaderTable1 ); + + JViewport headerViewport = new JViewport(); + headerViewport.setView( rowHeaderTable1.getTableHeader() ); + table1ScrollPane.setCorner( ScrollPaneConstants.UPPER_LEADING_CORNER, headerViewport ); + + table1ScrollPane.applyComponentOrientation( getComponentOrientation() ); + + allTablesInclRowHeader.add( rowHeaderTable1 ); + + showHorizontalLinesChanged(); + showVerticalLinesChanged(); + intercellSpacingChanged(); + redGridColorChanged(); + } else { + table1ScrollPane.setRowHeader( null ); + table1ScrollPane.setCorner( ScrollPaneConstants.UPPER_LEADING_CORNER, null ); + allTablesInclRowHeader.remove( rowHeaderTable1 ); + + ((TestTableRowHeaderModel)rowHeaderTable1.getModel()).dispose(); + rowHeaderTable1 = null; + } + } + + @Override + public void applyComponentOrientation( ComponentOrientation o ) { + super.applyComponentOrientation( o ); + + // swap upper right and left corners (other corners are not used in this app) + Component leftCorner = table1ScrollPane.getCorner( ScrollPaneConstants.UPPER_LEFT_CORNER ); + Component rightCorner = table1ScrollPane.getCorner( ScrollPaneConstants.UPPER_RIGHT_CORNER ); + table1ScrollPane.setCorner( ScrollPaneConstants.UPPER_LEFT_CORNER, null ); + table1ScrollPane.setCorner( ScrollPaneConstants.UPPER_RIGHT_CORNER, null ); + table1ScrollPane.setCorner( ScrollPaneConstants.UPPER_LEFT_CORNER, rightCorner ); + table1ScrollPane.setCorner( ScrollPaneConstants.UPPER_RIGHT_CORNER, leftCorner ); + } + @Override public void updateUI() { super.updateUI(); @@ -300,6 +359,7 @@ public class FlatComponents2Test JLabel autoResizeModeLabel = new JLabel(); autoResizeModeField = new JComboBox<>(); showHorizontalLinesCheckBox = new JCheckBox(); + rowHeaderCheckBox = new JCheckBox(); showVerticalLinesCheckBox = new JCheckBox(); intercellSpacingCheckBox = new JCheckBox(); redGridColorCheckBox = new JCheckBox(); @@ -461,7 +521,7 @@ public class FlatComponents2Test panel3.add(tableRowCountLabel, "cell 0 2"); //---- tableRowCountSpinner ---- - tableRowCountSpinner.setModel(new SpinnerNumberModel(20, 0, null, 10)); + tableRowCountSpinner.setModel(new SpinnerNumberModel(20, 0, null, 5)); tableRowCountSpinner.addChangeListener(e -> tableRowCountChanged()); panel3.add(tableRowCountSpinner, "cell 0 3"); } @@ -515,6 +575,11 @@ public class FlatComponents2Test showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged()); tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 1"); + //---- rowHeaderCheckBox ---- + rowHeaderCheckBox.setText("row header"); + rowHeaderCheckBox.addActionListener(e -> rowHeaderChanged()); + tableOptionsPanel.add(rowHeaderCheckBox, "cell 1 1"); + //---- showVerticalLinesCheckBox ---- showVerticalLinesCheckBox.setText("show vertical lines"); showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged()); @@ -588,6 +653,7 @@ public class FlatComponents2Test private JTable table1; private JComboBox autoResizeModeField; private JCheckBox showHorizontalLinesCheckBox; + private JCheckBox rowHeaderCheckBox; private JCheckBox showVerticalLinesCheckBox; private JCheckBox intercellSpacingCheckBox; private JCheckBox redGridColorCheckBox; @@ -885,4 +951,56 @@ public class FlatComponents2Test fireTableCellUpdated( rowIndex, columnIndex ); } } + + //---- TestTableRowHeaderModel -------------------------------------------- + + private class TestTableRowHeaderModel + extends AbstractTableModel + implements TableModelListener + { + private final TableModel model; + + TestTableRowHeaderModel( TableModel model ) { + this.model = model; + + model.addTableModelListener( this ); + } + + void dispose() { + model.removeTableModelListener( this ); + } + + @Override + public int getRowCount() { + return model.getRowCount(); + } + + @Override + public int getColumnCount() { + return 1; + } + + @Override + public String getColumnName( int columnIndex ) { + return "Row #"; + } + + @Override + public Object getValueAt( int rowIndex, int columnIndex ) { + return rowIndex + 1; + } + + @Override + public void tableChanged( TableModelEvent e ) { + switch( e.getType() ) { + case TableModelEvent.INSERT: + fireTableRowsInserted( e.getFirstRow(), e.getLastRow() ); + break; + + case TableModelEvent.DELETE: + fireTableRowsDeleted( e.getFirstRow(), e.getLastRow() ); + break; + } + } + } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd index 9e88c213..48b13c2f 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd @@ -64,7 +64,7 @@ new FormModel { } ) add( new FormComponent( "javax.swing.JSpinner" ) { name: "listRowCountSpinner" - "model": &SpinnerNumberModel0 new javax.swing.SpinnerNumberModel { + "model": new javax.swing.SpinnerNumberModel { minimum: 0 stepSize: 10 value: 20 @@ -184,7 +184,11 @@ new FormModel { } ) add( new FormComponent( "javax.swing.JSpinner" ) { name: "tableRowCountSpinner" - "model": #SpinnerNumberModel0 + "model": new javax.swing.SpinnerNumberModel { + minimum: 0 + stepSize: 5 + value: 20 + } auxiliary() { "JavaCodeGenerator.variableLocal": false } @@ -251,6 +255,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 1" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "rowHeaderCheckBox" + "text": "row header" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowHeaderChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "showVerticalLinesCheckBox" "text": "show vertical lines" From 923d58519f6ea5b7619a107a53a9a5efab37af4e Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 10 Dec 2020 20:30:27 +0100 Subject: [PATCH 054/178] Extras: added extension interfaces and classes for JComboBox, JFormattedTextField, JPasswordField, JScrollBar, JScrollPane and JTextField (issue #117) --- .../extras/components/FlatComboBox.java | 32 ++++++++ .../components/FlatFormattedTextField.java | 32 ++++++++ .../extras/components/FlatPasswordField.java | 32 ++++++++ .../extras/components/FlatScrollBar.java | 32 ++++++++ .../extras/components/FlatScrollPane.java | 32 ++++++++ .../extras/components/FlatTextField.java | 32 ++++++++ .../extensions/FlatComboBoxExtension.java | 48 ++++++++++++ .../extensions/FlatComponentExtension.java | 65 +++++++++++++++++ .../extensions/FlatScrollBarExtension.java | 49 +++++++++++++ .../extensions/FlatScrollPaneExtension.java | 64 ++++++++++++++++ .../extensions/FlatTextFieldExtension.java | 73 +++++++++++++++++++ .../flatlaf/testing/FlatComponentsTest.java | 33 +++++---- .../flatlaf/testing/FlatComponentsTest.jfd | 32 ++++---- 13 files changed, 524 insertions(+), 32 deletions(-) create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java new file mode 100644 index 00000000..1e90718d --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import javax.swing.JComboBox; +import com.formdev.flatlaf.extras.components.extensions.FlatComboBoxExtension; + +/** + * Subclass of {@link JComboBox} that implements {@link FlatComboBoxExtension} + * to provide easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatComboBox + extends JComboBox + implements FlatComboBoxExtension +{ +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java new file mode 100644 index 00000000..b2c11342 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import javax.swing.JFormattedTextField; +import com.formdev.flatlaf.extras.components.extensions.FlatTextFieldExtension; + +/** + * Subclass of {@link JFormattedTextField} that implements {@link FlatTextFieldExtension} + * to provide easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatFormattedTextField + extends JFormattedTextField + implements FlatTextFieldExtension +{ +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java new file mode 100644 index 00000000..6c172e68 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import javax.swing.JPasswordField; +import com.formdev.flatlaf.extras.components.extensions.FlatTextFieldExtension; + +/** + * Subclass of {@link JPasswordField} that implements {@link FlatTextFieldExtension} + * to provide easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatPasswordField + extends JPasswordField + implements FlatTextFieldExtension +{ +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java new file mode 100644 index 00000000..cba09974 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import javax.swing.JScrollBar; +import com.formdev.flatlaf.extras.components.extensions.FlatScrollBarExtension; + +/** + * Subclass of {@link JScrollBar} that implements {@link FlatScrollBarExtension} + * to provide easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatScrollBar + extends JScrollBar + implements FlatScrollBarExtension +{ +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java new file mode 100644 index 00000000..07f70db5 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import javax.swing.JScrollPane; +import com.formdev.flatlaf.extras.components.extensions.FlatScrollPaneExtension; + +/** + * Subclass of {@link JScrollPane} that implements {@link FlatScrollPaneExtension} + * to provide easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatScrollPane + extends JScrollPane + implements FlatScrollPaneExtension +{ +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java new file mode 100644 index 00000000..45c49e5b --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import javax.swing.JTextField; +import com.formdev.flatlaf.extras.components.extensions.FlatTextFieldExtension; + +/** + * Subclass of {@link JTextField} that implements {@link FlatTextFieldExtension} + * to provide easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatTextField + extends JTextField + implements FlatTextFieldExtension +{ +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java new file mode 100644 index 00000000..b259ce81 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java @@ -0,0 +1,48 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components.extensions; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JComboBox; + +/** + * Extension interface for {@link JComboBox} that provides + * easy access to FlatLaf specific client properties. + *

+ * Use this interface if you already have a subclass of {@link JComboBox} + * in your project and want add access to FlatLaf features to your class. + * Otherwise use {@link FlatComboBox}. + * + * @author Karl Tauber + */ +public interface FlatComboBoxExtension + extends FlatComponentExtension +{ + /** + * Returns the placeholder text that is only painted if the editable combo box is empty. + */ + default String getPlaceholderText() { + return (String) getClientProperty( PLACEHOLDER_TEXT ); + } + + /** + * Sets the placeholder text that is only painted if the editable combo box is empty. + */ + default void setPlaceholderText( String placeholderText ) { + putClientProperty( PLACEHOLDER_TEXT, placeholderText ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java new file mode 100644 index 00000000..f3744282 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components.extensions; + +import javax.swing.JComponent; +import javax.swing.UIManager; + +/** + * Base interface for all FlatLaf component extensions. + * Extensions use client properties to store property values in components. + * + * @author Karl Tauber + */ +public interface FlatComponentExtension +{ + /** + * Overrides {@link JComponent#getClientProperty(Object)}. + */ + Object getClientProperty( Object key ); + + /** + * Overrides {@link JComponent#putClientProperty(Object, Object)}. + */ + void putClientProperty( Object key, Object value ); + + + default boolean getClientPropertyBoolean( Object key, String defaultValueKey ) { + Object value = getClientProperty( key ); + return (value instanceof Boolean) ? (boolean) value : UIManager.getBoolean( defaultValueKey ); + } + + default > T getClientPropertyEnumString( Object key, Class enumType, + String defaultValueKey, T defaultValue ) + { + Object value = getClientProperty( key ); + if( !(value instanceof String) && defaultValueKey != null ) + value = UIManager.getString( defaultValueKey ); + if( value instanceof String ) { + try { + return Enum.valueOf( enumType, (String) value ); + } catch( IllegalArgumentException ex ) { + ex.printStackTrace(); + } + } + return defaultValue; + } + + default > void putClientPropertyEnumString( Object key, Enum value ) { + putClientProperty( key, (value != null) ? value.toString() : null ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java new file mode 100644 index 00000000..007216f7 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java @@ -0,0 +1,49 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components.extensions; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JScrollBar; +import com.formdev.flatlaf.extras.components.FlatScrollBar; + +/** + * Extension interface for {@link JScrollBar} that provides + * easy access to FlatLaf specific client properties. + *

+ * Use this interface if you already have a subclass of {@link JScrollBar} + * in your project and want add access to FlatLaf features to your class. + * Otherwise use {@link FlatScrollBar}. + * + * @author Karl Tauber + */ +public interface FlatScrollBarExtension + extends FlatComponentExtension +{ + /** + * Returns whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + default boolean isShowButtons() { + return getClientPropertyBoolean( SCROLL_BAR_SHOW_BUTTONS, "ScrollBar.showButtons" ); + } + + /** + * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + default void setShowButtons( boolean showButtons ) { + putClientProperty( SCROLL_BAR_SHOW_BUTTONS, showButtons ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java new file mode 100644 index 00000000..52439157 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components.extensions; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JScrollPane; +import com.formdev.flatlaf.extras.components.FlatScrollPane; + +/** + * Extension interface for {@link JScrollPane} that provides + * easy access to FlatLaf specific client properties. + *

+ * Use this interface if you already have a subclass of {@link JScrollPane} + * in your project and want add access to FlatLaf features to your class. + * Otherwise use {@link FlatScrollPane}. + * + * @author Karl Tauber + */ +public interface FlatScrollPaneExtension + extends FlatComponentExtension +{ + /** + * Returns whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + default boolean isShowButtons() { + return getClientPropertyBoolean( SCROLL_BAR_SHOW_BUTTONS, "ScrollBar.showButtons" ); + } + + /** + * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + default void setShowButtons( boolean showButtons ) { + putClientProperty( SCROLL_BAR_SHOW_BUTTONS, showButtons ); + } + + + /** + * Returns whether the scroll pane uses smooth scrolling. + */ + default boolean isSmoothScrolling() { + return getClientPropertyBoolean( SCROLL_PANE_SMOOTH_SCROLLING, "ScrollPane.smoothScrolling" ); + } + + /** + * Specifies whether the scroll pane uses smooth scrolling. + */ + default void setSmoothScrolling( boolean smoothScrolling ) { + putClientProperty( SCROLL_PANE_SMOOTH_SCROLLING, smoothScrolling ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java new file mode 100644 index 00000000..d317a68e --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components.extensions; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JFormattedTextField; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import com.formdev.flatlaf.extras.components.FlatFormattedTextField; +import com.formdev.flatlaf.extras.components.FlatPasswordField; +import com.formdev.flatlaf.extras.components.FlatTextField; + +/** + * Extension interface for {@link JTextField} (and subclasses) that provides + * easy access to FlatLaf specific client properties. + *

+ * Use this interface if you already have a subclass of {@link JTextField}, + * {@link JFormattedTextField} or {@link JPasswordField} + * in your project and want add access to FlatLaf features to your class. + * Otherwise use {@link FlatTextField}, {@link FlatFormattedTextField} or {@link FlatPasswordField}. + * + * @author Karl Tauber + */ +public interface FlatTextFieldExtension + extends FlatComponentExtension +{ + /** + * Returns the placeholder text that is only painted if the text field is empty. + */ + default String getPlaceholderText() { + return (String) getClientProperty( PLACEHOLDER_TEXT ); + } + + /** + * Sets the placeholder text that is only painted if the text field is empty. + */ + default void setPlaceholderText( String placeholderText ) { + putClientProperty( PLACEHOLDER_TEXT, placeholderText ); + } + + + // NOTE: enum names must be equal to allowed strings + enum SelectAllOnFocusPolicy { never, once, always }; + + /** + * Returns whether all text is selected when the text component gains focus. + */ + default SelectAllOnFocusPolicy getSelectAllOnFocusPolicy() { + return getClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, SelectAllOnFocusPolicy.class, + "TextComponent.selectAllOnFocusPolicy", SelectAllOnFocusPolicy.once ); + } + + /** + * Specifies whether all text is selected when the text component gains focus. + */ + default void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { + putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); + } +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index 5e308623..73ef3f10 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -20,6 +20,7 @@ import java.awt.*; import javax.swing.*; import javax.swing.border.*; import com.formdev.flatlaf.FlatClientProperties; +import com.formdev.flatlaf.extras.components.*; import net.miginfocom.swing.*; /** @@ -188,28 +189,28 @@ public class FlatComponentsTest JSpinner spinner2 = new JSpinner(); FlatComponentsTest.ButtonlessSpinner buttonlessSpinner1 = new FlatComponentsTest.ButtonlessSpinner(); FlatComponentsTest.ButtonlessSpinner buttonlessSpinner2 = new FlatComponentsTest.ButtonlessSpinner(); - JComboBox comboBox7 = new JComboBox<>(); + FlatComboBox comboBox7 = new FlatComboBox<>(); JSpinner spinner3 = new JSpinner(); JLabel textFieldLabel = new JLabel(); textField1 = new JTextField(); JTextField textField2 = new JTextField(); JTextField textField3 = new JTextField(); JTextField textField4 = new JTextField(); - JTextField textField6 = new JTextField(); + FlatTextField textField6 = new FlatTextField(); JTextField textField5 = new JTextField(); JLabel formattedTextFieldLabel = new JLabel(); JFormattedTextField formattedTextField1 = new JFormattedTextField(); JFormattedTextField formattedTextField2 = new JFormattedTextField(); JFormattedTextField formattedTextField3 = new JFormattedTextField(); JFormattedTextField formattedTextField4 = new JFormattedTextField(); - JFormattedTextField formattedTextField5 = new JFormattedTextField(); + FlatFormattedTextField formattedTextField5 = new FlatFormattedTextField(); JFormattedTextField formattedTextField6 = new JFormattedTextField(); JLabel passwordFieldLabel = new JLabel(); JPasswordField passwordField1 = new JPasswordField(); JPasswordField passwordField2 = new JPasswordField(); JPasswordField passwordField3 = new JPasswordField(); JPasswordField passwordField4 = new JPasswordField(); - JPasswordField passwordField5 = new JPasswordField(); + FlatPasswordField passwordField5 = new FlatPasswordField(); JPasswordField passwordField6 = new JPasswordField(); JLabel textAreaLabel = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); @@ -247,8 +248,8 @@ public class FlatComponentsTest JButton button19 = new JButton(); JScrollBar scrollBar2 = new JScrollBar(); JScrollBar scrollBar3 = new JScrollBar(); - JScrollBar scrollBar7 = new JScrollBar(); - JScrollBar scrollBar8 = new JScrollBar(); + FlatScrollBar scrollBar7 = new FlatScrollBar(); + FlatScrollBar scrollBar8 = new FlatScrollBar(); JSeparator separator2 = new JSeparator(); JSlider slider2 = new JSlider(); JSlider slider4 = new JSlider(); @@ -278,8 +279,8 @@ public class FlatComponentsTest JLabel scrollBarLabel = new JLabel(); JScrollBar scrollBar1 = new JScrollBar(); JScrollBar scrollBar4 = new JScrollBar(); - JScrollBar scrollBar5 = new JScrollBar(); - JScrollBar scrollBar6 = new JScrollBar(); + FlatScrollBar scrollBar5 = new FlatScrollBar(); + FlatScrollBar scrollBar6 = new FlatScrollBar(); JLabel separatorLabel = new JLabel(); JSeparator separator1 = new JSeparator(); JPanel panel2 = new JPanel(); @@ -686,7 +687,7 @@ public class FlatComponentsTest //---- comboBox7 ---- comboBox7.setEditable(true); - comboBox7.putClientProperty("JTextField.placeholderText", "Placeholder"); + comboBox7.setPlaceholderText("Placeholder"); add(comboBox7, "cell 5 6,growx"); //---- spinner3 ---- @@ -719,7 +720,7 @@ public class FlatComponentsTest add(textField4, "cell 4 7,growx"); //---- textField6 ---- - textField6.putClientProperty("JTextField.placeholderText", "Placeholder"); + textField6.setPlaceholderText("Placeholder"); add(textField6, "cell 5 7,growx"); //---- textField5 ---- @@ -752,7 +753,7 @@ public class FlatComponentsTest add(formattedTextField4, "cell 4 8,growx"); //---- formattedTextField5 ---- - formattedTextField5.putClientProperty("JTextField.placeholderText", "Placeholder"); + formattedTextField5.setPlaceholderText("Placeholder"); add(formattedTextField5, "cell 5 8,growx"); //---- formattedTextField6 ---- @@ -785,7 +786,7 @@ public class FlatComponentsTest add(passwordField4, "cell 4 9,growx"); //---- passwordField5 ---- - passwordField5.putClientProperty("JTextField.placeholderText", "Placeholder"); + passwordField5.setPlaceholderText("Placeholder"); add(passwordField5, "cell 5 9,growx"); //---- passwordField6 ---- @@ -996,12 +997,12 @@ public class FlatComponentsTest add(scrollBar3, "cell 2 13 1 6,growy"); //---- scrollBar7 ---- - scrollBar7.putClientProperty("JScrollBar.showButtons", true); + scrollBar7.setShowButtons(true); add(scrollBar7, "cell 2 13 1 6,growy"); //---- scrollBar8 ---- scrollBar8.setEnabled(false); - scrollBar8.putClientProperty("JScrollBar.showButtons", true); + scrollBar8.setShowButtons(true); add(scrollBar8, "cell 2 13 1 6,growy"); //---- separator2 ---- @@ -1173,13 +1174,13 @@ public class FlatComponentsTest //---- scrollBar5 ---- scrollBar5.setOrientation(Adjustable.HORIZONTAL); - scrollBar5.putClientProperty("JScrollBar.showButtons", true); + scrollBar5.setShowButtons(true); add(scrollBar5, "cell 1 16,growx"); //---- scrollBar6 ---- scrollBar6.setOrientation(Adjustable.HORIZONTAL); scrollBar6.setEnabled(false); - scrollBar6.putClientProperty("JScrollBar.showButtons", true); + scrollBar6.setShowButtons(true); add(scrollBar6, "cell 1 17,growx"); //---- separatorLabel ---- diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index 324865e1..7e8c7633 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -466,10 +466,10 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 6,growx" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatComboBox" ) { name: "comboBox7" "editable": true - "$client.JTextField.placeholderText": "Placeholder" + "placeholderText": "Placeholder" auxiliary() { "JavaCodeGenerator.typeParameters": "String" } @@ -522,9 +522,9 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 7,growx" } ) - add( new FormComponent( "javax.swing.JTextField" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTextField" ) { name: "textField6" - "$client.JTextField.placeholderText": "Placeholder" + "placeholderText": "Placeholder" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 5 7,growx" } ) @@ -569,9 +569,9 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 8,growx" } ) - add( new FormComponent( "javax.swing.JFormattedTextField" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatFormattedTextField" ) { name: "formattedTextField5" - "$client.JTextField.placeholderText": "Placeholder" + "placeholderText": "Placeholder" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 5 8,growx" } ) @@ -616,9 +616,9 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 9,growx" } ) - add( new FormComponent( "javax.swing.JPasswordField" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatPasswordField" ) { name: "passwordField5" - "$client.JTextField.placeholderText": "Placeholder" + "placeholderText": "Placeholder" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 5 9,growx" } ) @@ -850,16 +850,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 13 1 6,growy" } ) - add( new FormComponent( "javax.swing.JScrollBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatScrollBar" ) { name: "scrollBar7" - "$client.JScrollBar.showButtons": true + "showButtons": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 13 1 6,growy" } ) - add( new FormComponent( "javax.swing.JScrollBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatScrollBar" ) { name: "scrollBar8" "enabled": false - "$client.JScrollBar.showButtons": true + "showButtons": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 13 1 6,growy" } ) @@ -1098,18 +1098,18 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 15,growx" } ) - add( new FormComponent( "javax.swing.JScrollBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatScrollBar" ) { name: "scrollBar5" "orientation": 0 - "$client.JScrollBar.showButtons": true + "showButtons": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 16,growx" } ) - add( new FormComponent( "javax.swing.JScrollBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatScrollBar" ) { name: "scrollBar6" "orientation": 0 "enabled": false - "$client.JScrollBar.showButtons": true + "showButtons": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 17,growx" } ) From 3a8b30ca8e7e8423aa2717b41ca50fa901b72755 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 13:00:20 +0100 Subject: [PATCH 055/178] Extras: removed extension interfaces and moved methods to components classes because: - Javadoc for components that implement extension interfaces are useless because they do not include default methods from the extension interface - GUI builders do not recognize default methods from the extension interface and it is not possible to edit extension properties in GUI builder - the idea of adding the extension interface to own components can be also achieved by changing superclass of own component (issue #117) --- flatlaf-extras/build.gradle.kts | 1 + .../extras/components/FlatComboBox.java | 20 ++++- .../FlatComponentExtension.java | 2 +- .../components/FlatFormattedTextField.java | 39 +++++++++- .../extras/components/FlatPasswordField.java | 39 +++++++++- .../extras/components/FlatScrollBar.java | 20 ++++- .../extras/components/FlatScrollPane.java | 35 ++++++++- .../extras/components/FlatTextField.java | 39 +++++++++- .../extensions/FlatComboBoxExtension.java | 48 ------------ .../extensions/FlatScrollBarExtension.java | 49 ------------- .../extensions/FlatScrollPaneExtension.java | 64 ---------------- .../extensions/FlatTextFieldExtension.java | 73 ------------------- 12 files changed, 170 insertions(+), 259 deletions(-) rename flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/{extensions => }/FlatComponentExtension.java (97%) delete mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java delete mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java delete mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java delete mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java diff --git a/flatlaf-extras/build.gradle.kts b/flatlaf-extras/build.gradle.kts index 8be930dc..3fe98c75 100644 --- a/flatlaf-extras/build.gradle.kts +++ b/flatlaf-extras/build.gradle.kts @@ -40,6 +40,7 @@ tasks { this as StandardJavadocDocletOptions use( true ) tags = listOf( "uiDefault", "clientProperty" ) + addStringOption( "Xdoclint:all,-missing", "-Xdoclint:all,-missing" ) } isFailOnError = false } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java index 1e90718d..22312042 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java @@ -16,17 +16,29 @@ package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JComboBox; -import com.formdev.flatlaf.extras.components.extensions.FlatComboBoxExtension; /** - * Subclass of {@link JComboBox} that implements {@link FlatComboBoxExtension} - * to provide easy access to FlatLaf specific client properties. + * Subclass of {@link JComboBox} that provides easy access to FlatLaf specific client properties. * * @author Karl Tauber */ public class FlatComboBox extends JComboBox - implements FlatComboBoxExtension + implements FlatComponentExtension { + /** + * Returns the placeholder text that is only painted if the editable combo box is empty. + */ + public String getPlaceholderText() { + return (String) getClientProperty( PLACEHOLDER_TEXT ); + } + + /** + * Sets the placeholder text that is only painted if the editable combo box is empty. + */ + public void setPlaceholderText( String placeholderText ) { + putClientProperty( PLACEHOLDER_TEXT, placeholderText ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java similarity index 97% rename from flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java rename to flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java index f3744282..5df828a0 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComponentExtension.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.formdev.flatlaf.extras.components.extensions; +package com.formdev.flatlaf.extras.components; import javax.swing.JComponent; import javax.swing.UIManager; diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java index b2c11342..db7cd5cd 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java @@ -16,17 +16,48 @@ package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JFormattedTextField; -import com.formdev.flatlaf.extras.components.extensions.FlatTextFieldExtension; /** - * Subclass of {@link JFormattedTextField} that implements {@link FlatTextFieldExtension} - * to provide easy access to FlatLaf specific client properties. + * Subclass of {@link JFormattedTextField} that provides easy access to FlatLaf specific client properties. * * @author Karl Tauber */ public class FlatFormattedTextField extends JFormattedTextField - implements FlatTextFieldExtension + implements FlatComponentExtension { + /** + * Returns the placeholder text that is only painted if the text field is empty. + */ + public String getPlaceholderText() { + return (String) getClientProperty( PLACEHOLDER_TEXT ); + } + + /** + * Sets the placeholder text that is only painted if the text field is empty. + */ + public void setPlaceholderText( String placeholderText ) { + putClientProperty( PLACEHOLDER_TEXT, placeholderText ); + } + + + // NOTE: enum names must be equal to allowed strings + enum SelectAllOnFocusPolicy { never, once, always }; + + /** + * Returns whether all text is selected when the text component gains focus. + */ + public SelectAllOnFocusPolicy getSelectAllOnFocusPolicy() { + return getClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, SelectAllOnFocusPolicy.class, + "TextComponent.selectAllOnFocusPolicy", SelectAllOnFocusPolicy.once ); + } + + /** + * Specifies whether all text is selected when the text component gains focus. + */ + public void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { + putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java index 6c172e68..fd0cd289 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java @@ -16,17 +16,48 @@ package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JPasswordField; -import com.formdev.flatlaf.extras.components.extensions.FlatTextFieldExtension; /** - * Subclass of {@link JPasswordField} that implements {@link FlatTextFieldExtension} - * to provide easy access to FlatLaf specific client properties. + * Subclass of {@link JPasswordField} that provides easy access to FlatLaf specific client properties. * * @author Karl Tauber */ public class FlatPasswordField extends JPasswordField - implements FlatTextFieldExtension + implements FlatComponentExtension { + /** + * Returns the placeholder text that is only painted if the text field is empty. + */ + public String getPlaceholderText() { + return (String) getClientProperty( PLACEHOLDER_TEXT ); + } + + /** + * Sets the placeholder text that is only painted if the text field is empty. + */ + public void setPlaceholderText( String placeholderText ) { + putClientProperty( PLACEHOLDER_TEXT, placeholderText ); + } + + + // NOTE: enum names must be equal to allowed strings + enum SelectAllOnFocusPolicy { never, once, always }; + + /** + * Returns whether all text is selected when the text component gains focus. + */ + public SelectAllOnFocusPolicy getSelectAllOnFocusPolicy() { + return getClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, SelectAllOnFocusPolicy.class, + "TextComponent.selectAllOnFocusPolicy", SelectAllOnFocusPolicy.once ); + } + + /** + * Specifies whether all text is selected when the text component gains focus. + */ + public void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { + putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java index cba09974..eba79afe 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollBar.java @@ -16,17 +16,29 @@ package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JScrollBar; -import com.formdev.flatlaf.extras.components.extensions.FlatScrollBarExtension; /** - * Subclass of {@link JScrollBar} that implements {@link FlatScrollBarExtension} - * to provide easy access to FlatLaf specific client properties. + * Subclass of {@link JScrollBar} that provides easy access to FlatLaf specific client properties. * * @author Karl Tauber */ public class FlatScrollBar extends JScrollBar - implements FlatScrollBarExtension + implements FlatComponentExtension { + /** + * Returns whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + public boolean isShowButtons() { + return getClientPropertyBoolean( SCROLL_BAR_SHOW_BUTTONS, "ScrollBar.showButtons" ); + } + + /** + * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + public void setShowButtons( boolean showButtons ) { + putClientProperty( SCROLL_BAR_SHOW_BUTTONS, showButtons ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java index 07f70db5..ed0ef473 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java @@ -16,17 +16,44 @@ package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JScrollPane; -import com.formdev.flatlaf.extras.components.extensions.FlatScrollPaneExtension; /** - * Subclass of {@link JScrollPane} that implements {@link FlatScrollPaneExtension} - * to provide easy access to FlatLaf specific client properties. + * Subclass of {@link JScrollPane} that provides easy access to FlatLaf specific client properties. * * @author Karl Tauber */ public class FlatScrollPane extends JScrollPane - implements FlatScrollPaneExtension + implements FlatComponentExtension { + /** + * Returns whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + public boolean isShowButtons() { + return getClientPropertyBoolean( SCROLL_BAR_SHOW_BUTTONS, "ScrollBar.showButtons" ); + } + + /** + * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. + */ + public void setShowButtons( boolean showButtons ) { + putClientProperty( SCROLL_BAR_SHOW_BUTTONS, showButtons ); + } + + + /** + * Returns whether the scroll pane uses smooth scrolling. + */ + public boolean isSmoothScrolling() { + return getClientPropertyBoolean( SCROLL_PANE_SMOOTH_SCROLLING, "ScrollPane.smoothScrolling" ); + } + + /** + * Specifies whether the scroll pane uses smooth scrolling. + */ + public void setSmoothScrolling( boolean smoothScrolling ) { + putClientProperty( SCROLL_PANE_SMOOTH_SCROLLING, smoothScrolling ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java index 45c49e5b..fe3755ef 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java @@ -16,17 +16,48 @@ package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JTextField; -import com.formdev.flatlaf.extras.components.extensions.FlatTextFieldExtension; /** - * Subclass of {@link JTextField} that implements {@link FlatTextFieldExtension} - * to provide easy access to FlatLaf specific client properties. + * Subclass of {@link JTextField} that provides easy access to FlatLaf specific client properties. * * @author Karl Tauber */ public class FlatTextField extends JTextField - implements FlatTextFieldExtension + implements FlatComponentExtension { + /** + * Returns the placeholder text that is only painted if the text field is empty. + */ + public String getPlaceholderText() { + return (String) getClientProperty( PLACEHOLDER_TEXT ); + } + + /** + * Sets the placeholder text that is only painted if the text field is empty. + */ + public void setPlaceholderText( String placeholderText ) { + putClientProperty( PLACEHOLDER_TEXT, placeholderText ); + } + + + // NOTE: enum names must be equal to allowed strings + enum SelectAllOnFocusPolicy { never, once, always }; + + /** + * Returns whether all text is selected when the text component gains focus. + */ + public SelectAllOnFocusPolicy getSelectAllOnFocusPolicy() { + return getClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, SelectAllOnFocusPolicy.class, + "TextComponent.selectAllOnFocusPolicy", SelectAllOnFocusPolicy.once ); + } + + /** + * Specifies whether all text is selected when the text component gains focus. + */ + public void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { + putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java deleted file mode 100644 index b259ce81..00000000 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatComboBoxExtension.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2020 FormDev Software GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.formdev.flatlaf.extras.components.extensions; - -import static com.formdev.flatlaf.FlatClientProperties.*; -import javax.swing.JComboBox; - -/** - * Extension interface for {@link JComboBox} that provides - * easy access to FlatLaf specific client properties. - *

- * Use this interface if you already have a subclass of {@link JComboBox} - * in your project and want add access to FlatLaf features to your class. - * Otherwise use {@link FlatComboBox}. - * - * @author Karl Tauber - */ -public interface FlatComboBoxExtension - extends FlatComponentExtension -{ - /** - * Returns the placeholder text that is only painted if the editable combo box is empty. - */ - default String getPlaceholderText() { - return (String) getClientProperty( PLACEHOLDER_TEXT ); - } - - /** - * Sets the placeholder text that is only painted if the editable combo box is empty. - */ - default void setPlaceholderText( String placeholderText ) { - putClientProperty( PLACEHOLDER_TEXT, placeholderText ); - } -} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java deleted file mode 100644 index 007216f7..00000000 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollBarExtension.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2020 FormDev Software GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.formdev.flatlaf.extras.components.extensions; - -import static com.formdev.flatlaf.FlatClientProperties.*; -import javax.swing.JScrollBar; -import com.formdev.flatlaf.extras.components.FlatScrollBar; - -/** - * Extension interface for {@link JScrollBar} that provides - * easy access to FlatLaf specific client properties. - *

- * Use this interface if you already have a subclass of {@link JScrollBar} - * in your project and want add access to FlatLaf features to your class. - * Otherwise use {@link FlatScrollBar}. - * - * @author Karl Tauber - */ -public interface FlatScrollBarExtension - extends FlatComponentExtension -{ - /** - * Returns whether the decrease/increase arrow buttons of a scrollbar are shown. - */ - default boolean isShowButtons() { - return getClientPropertyBoolean( SCROLL_BAR_SHOW_BUTTONS, "ScrollBar.showButtons" ); - } - - /** - * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. - */ - default void setShowButtons( boolean showButtons ) { - putClientProperty( SCROLL_BAR_SHOW_BUTTONS, showButtons ); - } -} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java deleted file mode 100644 index 52439157..00000000 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatScrollPaneExtension.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2020 FormDev Software GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.formdev.flatlaf.extras.components.extensions; - -import static com.formdev.flatlaf.FlatClientProperties.*; -import javax.swing.JScrollPane; -import com.formdev.flatlaf.extras.components.FlatScrollPane; - -/** - * Extension interface for {@link JScrollPane} that provides - * easy access to FlatLaf specific client properties. - *

- * Use this interface if you already have a subclass of {@link JScrollPane} - * in your project and want add access to FlatLaf features to your class. - * Otherwise use {@link FlatScrollPane}. - * - * @author Karl Tauber - */ -public interface FlatScrollPaneExtension - extends FlatComponentExtension -{ - /** - * Returns whether the decrease/increase arrow buttons of a scrollbar are shown. - */ - default boolean isShowButtons() { - return getClientPropertyBoolean( SCROLL_BAR_SHOW_BUTTONS, "ScrollBar.showButtons" ); - } - - /** - * Specifies whether the decrease/increase arrow buttons of a scrollbar are shown. - */ - default void setShowButtons( boolean showButtons ) { - putClientProperty( SCROLL_BAR_SHOW_BUTTONS, showButtons ); - } - - - /** - * Returns whether the scroll pane uses smooth scrolling. - */ - default boolean isSmoothScrolling() { - return getClientPropertyBoolean( SCROLL_PANE_SMOOTH_SCROLLING, "ScrollPane.smoothScrolling" ); - } - - /** - * Specifies whether the scroll pane uses smooth scrolling. - */ - default void setSmoothScrolling( boolean smoothScrolling ) { - putClientProperty( SCROLL_PANE_SMOOTH_SCROLLING, smoothScrolling ); - } -} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java deleted file mode 100644 index d317a68e..00000000 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/extensions/FlatTextFieldExtension.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2020 FormDev Software GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.formdev.flatlaf.extras.components.extensions; - -import static com.formdev.flatlaf.FlatClientProperties.*; -import javax.swing.JFormattedTextField; -import javax.swing.JPasswordField; -import javax.swing.JTextField; -import com.formdev.flatlaf.extras.components.FlatFormattedTextField; -import com.formdev.flatlaf.extras.components.FlatPasswordField; -import com.formdev.flatlaf.extras.components.FlatTextField; - -/** - * Extension interface for {@link JTextField} (and subclasses) that provides - * easy access to FlatLaf specific client properties. - *

- * Use this interface if you already have a subclass of {@link JTextField}, - * {@link JFormattedTextField} or {@link JPasswordField} - * in your project and want add access to FlatLaf features to your class. - * Otherwise use {@link FlatTextField}, {@link FlatFormattedTextField} or {@link FlatPasswordField}. - * - * @author Karl Tauber - */ -public interface FlatTextFieldExtension - extends FlatComponentExtension -{ - /** - * Returns the placeholder text that is only painted if the text field is empty. - */ - default String getPlaceholderText() { - return (String) getClientProperty( PLACEHOLDER_TEXT ); - } - - /** - * Sets the placeholder text that is only painted if the text field is empty. - */ - default void setPlaceholderText( String placeholderText ) { - putClientProperty( PLACEHOLDER_TEXT, placeholderText ); - } - - - // NOTE: enum names must be equal to allowed strings - enum SelectAllOnFocusPolicy { never, once, always }; - - /** - * Returns whether all text is selected when the text component gains focus. - */ - default SelectAllOnFocusPolicy getSelectAllOnFocusPolicy() { - return getClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, SelectAllOnFocusPolicy.class, - "TextComponent.selectAllOnFocusPolicy", SelectAllOnFocusPolicy.once ); - } - - /** - * Specifies whether all text is selected when the text component gains focus. - */ - default void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { - putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); - } -} From 1323b46ac7ebb7bc07ca928d8918724f04e64948 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 13:28:55 +0100 Subject: [PATCH 056/178] Extras: added extension class for JProgressBar (issue #117) --- .../components/FlatComponentExtension.java | 10 ++++ .../extras/components/FlatProgressBar.java | 59 +++++++++++++++++++ .../flatlaf/testing/FlatComponentsTest.java | 46 ++++++++++++--- .../flatlaf/testing/FlatComponentsTest.jfd | 30 ++++++++-- 4 files changed, 132 insertions(+), 13 deletions(-) create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatProgressBar.java diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java index 5df828a0..e488137b 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java @@ -43,6 +43,16 @@ public interface FlatComponentExtension return (value instanceof Boolean) ? (boolean) value : UIManager.getBoolean( defaultValueKey ); } + default boolean getClientPropertyBoolean( Object key, boolean defaultValue ) { + Object value = getClientProperty( key ); + return (value instanceof Boolean) ? (boolean) value : defaultValue; + } + + default void putClientPropertyBoolean( Object key, boolean value, boolean defaultValue ) { + putClientProperty( key, (value != defaultValue) ? value : null ); + } + + default > T getClientPropertyEnumString( Object key, Class enumType, String defaultValueKey, T defaultValue ) { diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatProgressBar.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatProgressBar.java new file mode 100644 index 00000000..c4698374 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatProgressBar.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JProgressBar; + +/** + * Subclass of {@link JProgressBar} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatProgressBar + extends JProgressBar + implements FlatComponentExtension +{ + /** + * Returns whether the progress bar has always the larger height even if no string is painted. + */ + public boolean isLargeHeight() { + return getClientPropertyBoolean( PROGRESS_BAR_LARGE_HEIGHT, false ); + } + + /** + * Specifies whether the progress bar has always the larger height even if no string is painted. + */ + public void setLargeHeight( boolean largeHeight ) { + putClientPropertyBoolean( PROGRESS_BAR_LARGE_HEIGHT, largeHeight, false ); + } + + + /** + * Returns whether the progress bar is paint with square edges. + */ + public boolean isSquare() { + return getClientPropertyBoolean( PROGRESS_BAR_SQUARE, false ); + } + + /** + * Specifies whether the progress bar is paint with square edges. + */ + public void setSquare( boolean square ) { + putClientPropertyBoolean( PROGRESS_BAR_SQUARE, square, false ); + } +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index 73ef3f10..41198240 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -56,6 +56,22 @@ public class FlatComponentsTest progressBar4.setIndeterminate( indeterminate ); } + private void squareChanged() { + boolean square = squareCheckBox.isSelected(); + progressBar1.setSquare( square ); + progressBar2.setSquare( square ); + progressBar3.setSquare( square ); + progressBar4.setSquare( square ); + } + + private void largeHeightChanged() { + boolean largeHeight = largeHeightCheckBox.isSelected(); + progressBar1.setLargeHeight( largeHeight ); + progressBar2.setLargeHeight( largeHeight ); + progressBar3.setLargeHeight( largeHeight ); + progressBar4.setLargeHeight( largeHeight ); + } + private void borderPaintedChanged() { boolean borderPainted = borderPaintedCheckBox.isSelected(); @@ -254,8 +270,8 @@ public class FlatComponentsTest JSlider slider2 = new JSlider(); JSlider slider4 = new JSlider(); JScrollPane scrollPane14 = new JScrollPane(); - progressBar3 = new JProgressBar(); - progressBar4 = new JProgressBar(); + progressBar3 = new FlatProgressBar(); + progressBar4 = new FlatProgressBar(); JToolBar toolBar2 = new JToolBar(); JButton button9 = new JButton(); JButton button10 = new JButton(); @@ -291,12 +307,14 @@ public class FlatComponentsTest slider3 = new JSlider(); JSlider slider5 = new JSlider(); JLabel progressBarLabel = new JLabel(); - progressBar1 = new JProgressBar(); - progressBar2 = new JProgressBar(); + progressBar1 = new FlatProgressBar(); + progressBar2 = new FlatProgressBar(); indeterminateCheckBox = new JCheckBox(); + squareCheckBox = new JCheckBox(); JLabel toolTipLabel = new JLabel(); JToolTip toolTip1 = new JToolTip(); JToolTip toolTip2 = new JToolTip(); + largeHeightCheckBox = new JCheckBox(); JLabel toolBarLabel = new JLabel(); JToolBar toolBar1 = new JToolBar(); JButton button4 = new JButton(); @@ -1249,6 +1267,11 @@ public class FlatComponentsTest indeterminateCheckBox.addActionListener(e -> indeterminateProgress()); add(indeterminateCheckBox, "cell 4 21"); + //---- squareCheckBox ---- + squareCheckBox.setText("square"); + squareCheckBox.addActionListener(e -> squareChanged()); + add(squareCheckBox, "cell 4 21"); + //---- toolTipLabel ---- toolTipLabel.setText("JToolTip:"); add(toolTipLabel, "cell 0 22"); @@ -1261,6 +1284,11 @@ public class FlatComponentsTest toolTip2.setTipText("Tool tip with\nmultiple\nlines."); add(toolTip2, "cell 1 22 3 1"); + //---- largeHeightCheckBox ---- + largeHeightCheckBox.setText("large height"); + largeHeightCheckBox.addActionListener(e -> largeHeightChanged()); + add(largeHeightCheckBox, "cell 4 22,aligny top,growy 0"); + //---- toolBarLabel ---- toolBarLabel.setText("JToolBar:"); add(toolBarLabel, "cell 0 23"); @@ -1389,8 +1417,8 @@ public class FlatComponentsTest // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JTextField textField1; - private JProgressBar progressBar3; - private JProgressBar progressBar4; + private FlatProgressBar progressBar3; + private FlatProgressBar progressBar4; private JComboBox buttonTypeComboBox; private JCheckBox borderPaintedCheckBox; private JCheckBox roundRectCheckBox; @@ -1402,9 +1430,11 @@ public class FlatComponentsTest private JRadioButton magentaCyanOutlineRadioButton; private JCheckBox focusPaintedCheckBox; private JSlider slider3; - private JProgressBar progressBar1; - private JProgressBar progressBar2; + private FlatProgressBar progressBar1; + private FlatProgressBar progressBar2; private JCheckBox indeterminateCheckBox; + private JCheckBox squareCheckBox; + private JCheckBox largeHeightCheckBox; // JFormDesigner - End of variables declaration //GEN-END:variables //---- class TestDefaultButton -------------------------------------------- diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index 7e8c7633..da17c68a 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.0.337" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -892,7 +892,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 13,grow" } ) - add( new FormComponent( "javax.swing.JProgressBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatProgressBar" ) { name: "progressBar3" "orientation": 1 "value": 60 @@ -902,7 +902,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 13 1 6,growy" } ) - add( new FormComponent( "javax.swing.JProgressBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatProgressBar" ) { name: "progressBar4" "orientation": 1 "value": 60 @@ -1187,7 +1187,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 21" } ) - add( new FormComponent( "javax.swing.JProgressBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatProgressBar" ) { name: "progressBar1" "value": 60 auxiliary() { @@ -1196,7 +1196,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 21 3 1,growx" } ) - add( new FormComponent( "javax.swing.JProgressBar" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatProgressBar" ) { name: "progressBar2" "stringPainted": true "value": 60 @@ -1216,6 +1216,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 21" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "squareCheckBox" + "text": "square" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "squareChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 21" + } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "toolTipLabel" "text": "JToolTip:" @@ -1234,6 +1244,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 22 3 1" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "largeHeightCheckBox" + "text": "large height" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "largeHeightChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 22,aligny top,growy 0" + } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "toolBarLabel" "text": "JToolBar:" From 91bc994532e21ff547a6274ec6996207eac27b35 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 13:39:51 +0100 Subject: [PATCH 057/178] Extras: made enums in text components public (issue #117) --- .../flatlaf/extras/components/FlatFormattedTextField.java | 2 +- .../formdev/flatlaf/extras/components/FlatPasswordField.java | 2 +- .../com/formdev/flatlaf/extras/components/FlatTextField.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java index db7cd5cd..3e59ab79 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java @@ -44,7 +44,7 @@ public class FlatFormattedTextField // NOTE: enum names must be equal to allowed strings - enum SelectAllOnFocusPolicy { never, once, always }; + public enum SelectAllOnFocusPolicy { never, once, always }; /** * Returns whether all text is selected when the text component gains focus. diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java index fd0cd289..f042ab6c 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java @@ -44,7 +44,7 @@ public class FlatPasswordField // NOTE: enum names must be equal to allowed strings - enum SelectAllOnFocusPolicy { never, once, always }; + public enum SelectAllOnFocusPolicy { never, once, always }; /** * Returns whether all text is selected when the text component gains focus. diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java index fe3755ef..f3750be9 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java @@ -44,7 +44,7 @@ public class FlatTextField // NOTE: enum names must be equal to allowed strings - enum SelectAllOnFocusPolicy { never, once, always }; + public enum SelectAllOnFocusPolicy { never, once, always }; /** * Returns whether all text is selected when the text component gains focus. From 821efaff402d9313fcf51107ac6b3dbc22cab3b1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 14:01:42 +0100 Subject: [PATCH 058/178] Extras: removed duplicate enums in text components (issue #117) --- .../flatlaf/extras/components/FlatFormattedTextField.java | 4 +--- .../formdev/flatlaf/extras/components/FlatPasswordField.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java index 3e59ab79..68cde840 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JFormattedTextField; +import com.formdev.flatlaf.extras.components.FlatTextField.SelectAllOnFocusPolicy; /** * Subclass of {@link JFormattedTextField} that provides easy access to FlatLaf specific client properties. @@ -43,9 +44,6 @@ public class FlatFormattedTextField } - // NOTE: enum names must be equal to allowed strings - public enum SelectAllOnFocusPolicy { never, once, always }; - /** * Returns whether all text is selected when the text component gains focus. */ diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java index f042ab6c..e4088ade 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; import javax.swing.JPasswordField; +import com.formdev.flatlaf.extras.components.FlatTextField.SelectAllOnFocusPolicy; /** * Subclass of {@link JPasswordField} that provides easy access to FlatLaf specific client properties. @@ -43,9 +44,6 @@ public class FlatPasswordField } - // NOTE: enum names must be equal to allowed strings - public enum SelectAllOnFocusPolicy { never, once, always }; - /** * Returns whether all text is selected when the text component gains focus. */ From 511a4044d7edb8487db5fa980b5d94279eab3a1c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 17:18:35 +0100 Subject: [PATCH 059/178] Extras: added extension classes for JButton and JToggleButton (issue #117) --- .../flatlaf/extras/components/FlatButton.java | 94 ++++++++++++ .../components/FlatComponentExtension.java | 18 +++ .../extras/components/FlatToggleButton.java | 138 ++++++++++++++++++ .../flatlaf/testing/FlatComponentsTest.java | 115 ++++++++------- .../flatlaf/testing/FlatComponentsTest.jfd | 99 ++++++------- .../flatlaf/testing/FlatTestEnumComboBox.java | 113 ++++++++++++++ 6 files changed, 466 insertions(+), 111 deletions(-) create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestEnumComboBox.java diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java new file mode 100644 index 00000000..d76eba16 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JButton; + +/** + * Subclass of {@link JButton} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatButton + extends JButton + implements FlatComponentExtension +{ + // NOTE: enum names must be equal to allowed strings + public enum ButtonType { none, square, roundRect, tab, help, toolBarButton }; + + /** + * Returns type of a button. + */ + public ButtonType getButtonType() { + return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none ); + } + + /** + * Specifies type of a button. + */ + public void setButtonType( ButtonType buttonType ) { + if( buttonType == ButtonType.none ) + buttonType = null; + putClientPropertyEnumString( BUTTON_TYPE, buttonType ); + } + + + /** + * Returns whether the button preferred size will be made square (quadratically). + */ + public boolean isSquareSize() { + return getClientPropertyBoolean( SQUARE_SIZE, false ); + } + + /** + * Specifies whether the button preferred size will be made square (quadratically). + */ + public void setSquareSize( boolean squareSize ) { + putClientPropertyBoolean( SQUARE_SIZE, squareSize, false ); + } + + + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Button.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns minimum height of a component. + */ + public int getMinimumHeight() { + return getClientPropertyInt( MINIMUM_HEIGHT, 0 ); + } + + /** + * Specifies minimum height of a component. + */ + public void setMinimumHeight( int minimumHeight ) { + putClientProperty( MINIMUM_HEIGHT, (minimumHeight >= 0) ? minimumHeight : null ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java index e488137b..139ea768 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java @@ -16,6 +16,7 @@ package com.formdev.flatlaf.extras.components; +import java.awt.Color; import javax.swing.JComponent; import javax.swing.UIManager; @@ -53,6 +54,23 @@ public interface FlatComponentExtension } + default int getClientPropertyInt( Object key, String defaultValueKey ) { + Object value = getClientProperty( key ); + return (value instanceof Integer) ? (int) value : UIManager.getInt( defaultValueKey ); + } + + default int getClientPropertyInt( Object key, int defaultValue ) { + Object value = getClientProperty( key ); + return (value instanceof Integer) ? (int) value : defaultValue; + } + + + default Color getClientPropertyColor( Object key, String defaultValueKey ) { + Object value = getClientProperty( key ); + return (value instanceof Color) ? (Color) value : UIManager.getColor( defaultValueKey ); + } + + default > T getClientPropertyEnumString( Object key, Class enumType, String defaultValueKey, T defaultValue ) { diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java new file mode 100644 index 00000000..3bccdd6e --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java @@ -0,0 +1,138 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; +import javax.swing.JToggleButton; +import com.formdev.flatlaf.extras.components.FlatButton.ButtonType; + +/** + * Subclass of {@link JToggleButton} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatToggleButton + extends JToggleButton + implements FlatComponentExtension +{ + /** + * Returns type of a button. + */ + public ButtonType getButtonType() { + return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none ); + } + + /** + * Specifies type of a button. + */ + public void setButtonType( ButtonType buttonType ) { + if( buttonType == ButtonType.none ) + buttonType = null; + putClientPropertyEnumString( BUTTON_TYPE, buttonType ); + } + + + /** + * Returns whether the button preferred size will be made square (quadratically). + */ + public boolean isSquareSize() { + return getClientPropertyBoolean( SQUARE_SIZE, false ); + } + + /** + * Specifies whether the button preferred size will be made square (quadratically). + */ + public void setSquareSize( boolean squareSize ) { + putClientPropertyBoolean( SQUARE_SIZE, squareSize, false ); + } + + + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "ToggleButton.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns minimum height of a component. + */ + public int getMinimumHeight() { + return getClientPropertyInt( MINIMUM_HEIGHT, 0 ); + } + + /** + * Specifies minimum height of a component. + */ + public void setMinimumHeight( int minimumHeight ) { + putClientProperty( MINIMUM_HEIGHT, (minimumHeight >= 0) ? minimumHeight : null ); + } + + + /** + * Returns height of underline if toggle button type is {@link ButtonType#tab}. + */ + public int getTabUnderlineHeight() { + return getClientPropertyInt( TAB_BUTTON_UNDERLINE_HEIGHT, "ToggleButton.tab.underlineHeight" ); + } + + /** + * Specifies height of underline if toggle button type is {@link ButtonType#tab}. + */ + public void setTabUnderlineHeight( int tabUnderlineHeight ) { + putClientProperty( TAB_BUTTON_UNDERLINE_HEIGHT, (tabUnderlineHeight >= 0) ? tabUnderlineHeight : null ); + } + + + /** + * Returns color of underline if toggle button type is {@link ButtonType#tab}. + */ + public Color getTabUnderlineColor() { + return getClientPropertyColor( TAB_BUTTON_UNDERLINE_COLOR, "ToggleButton.tab.underlineColor" ); + } + + /** + * Specifies color of underline if toggle button type is {@link ButtonType#tab}. + */ + public void setTabUnderlineColor( Color tabUnderlineColor ) { + putClientProperty( TAB_BUTTON_UNDERLINE_COLOR, tabUnderlineColor ); + } + + + /** + * Returns background color if selected and toggle button type is {@link ButtonType#tab}. + */ + public Color getTabSelectedBackground() { + return getClientPropertyColor( TAB_BUTTON_SELECTED_BACKGROUND, "ToggleButton.tab.selectedBackground" ); + } + + /** + * Specifies background color if selected and toggle button type is {@link ButtonType#tab}. + */ + public void setTabSelectedBackground( Color tabSelectedBackground ) { + putClientProperty( TAB_BUTTON_SELECTED_BACKGROUND, tabSelectedBackground ); + } +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index 41198240..e696fa17 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -21,6 +21,7 @@ import javax.swing.*; import javax.swing.border.*; import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.extras.components.*; +import com.formdev.flatlaf.extras.components.FlatButton.ButtonType; import net.miginfocom.swing.*; /** @@ -38,6 +39,8 @@ public class FlatComponentsTest FlatComponentsTest() { initComponents(); + + buttonTypeComboBox.init( ButtonType.class, true ); } private void changeProgress() { @@ -116,13 +119,16 @@ public class FlatComponentsTest } private void buttonTypeChanged() { - String buttonType = (String) buttonTypeComboBox.getSelectedItem(); - if( "-".equals( buttonType ) ) - buttonType = null; + ButtonType buttonType = buttonTypeComboBox.getSelectedValue(); + String buttonTypeStr = (buttonType != null && buttonType != ButtonType.none) ? buttonType.toString() : null; for( Component c : getComponents() ) { - if( c instanceof AbstractButton ) - ((AbstractButton)c).putClientProperty( FlatClientProperties.BUTTON_TYPE, buttonType ); + if( c instanceof FlatButton ) + ((FlatButton)c).setButtonType( buttonType ); + else if( c instanceof FlatToggleButton ) + ((FlatToggleButton)c).setButtonType( buttonType ); + else if( c instanceof AbstractButton ) + ((AbstractButton)c).putClientProperty( FlatClientProperties.BUTTON_TYPE, buttonTypeStr ); } } @@ -154,14 +160,14 @@ public class FlatComponentsTest FlatComponentsTest.TestMultiLineLabel testMultiLineLabel1 = new FlatComponentsTest.TestMultiLineLabel(); JLabel buttonLabel = new JLabel(); JButton button1 = new JButton(); - JButton button17 = new JButton(); - JButton button22 = new JButton(); + FlatButton button17 = new FlatButton(); + FlatButton button22 = new FlatButton(); JButton button2 = new JButton(); - JButton button18 = new JButton(); - JButton button23 = new JButton(); + FlatButton button18 = new FlatButton(); + FlatButton button23 = new FlatButton(); FlatComponentsTest.TestDefaultButton button5 = new FlatComponentsTest.TestDefaultButton(); - JButton button3 = new JButton(); - JButton button12 = new JButton(); + FlatButton button3 = new FlatButton(); + FlatButton button12 = new FlatButton(); JButton button13 = new JButton(); JButton button14 = new JButton(); JButton button15 = new JButton(); @@ -169,11 +175,11 @@ public class FlatComponentsTest JButton button20 = new JButton(); JLabel toggleButtonLabel = new JLabel(); JToggleButton toggleButton1 = new JToggleButton(); - JToggleButton toggleButton9 = new JToggleButton(); - JToggleButton toggleButton19 = new JToggleButton(); + FlatToggleButton toggleButton9 = new FlatToggleButton(); + FlatToggleButton toggleButton19 = new FlatToggleButton(); JToggleButton toggleButton2 = new JToggleButton(); - JToggleButton toggleButton10 = new JToggleButton(); - JToggleButton toggleButton20 = new JToggleButton(); + FlatToggleButton toggleButton10 = new FlatToggleButton(); + FlatToggleButton toggleButton20 = new FlatToggleButton(); JToggleButton toggleButton3 = new JToggleButton(); JToggleButton toggleButton4 = new JToggleButton(); JToggleButton toggleButton11 = new JToggleButton(); @@ -186,8 +192,8 @@ public class FlatComponentsTest JCheckBox checkBox2 = new JCheckBox(); JCheckBox checkBox3 = new JCheckBox(); JCheckBox checkBox4 = new JCheckBox(); - JToggleButton toggleButton5 = new JToggleButton(); - JToggleButton toggleButton8 = new JToggleButton(); + FlatToggleButton toggleButton5 = new FlatToggleButton(); + FlatToggleButton toggleButton8 = new FlatToggleButton(); JLabel radioButtonLabel = new JLabel(); JRadioButton radioButton1 = new JRadioButton(); JRadioButton radioButton2 = new JRadioButton(); @@ -281,7 +287,7 @@ public class FlatComponentsTest JPanel panel3 = new JPanel(); JButton button21 = new JButton(); JPanel panel5 = new JPanel(); - buttonTypeComboBox = new JComboBox<>(); + buttonTypeComboBox = new FlatTestEnumComboBox<>(); borderPaintedCheckBox = new JCheckBox(); roundRectCheckBox = new JCheckBox(); contentAreaFilledCheckBox = new JCheckBox(); @@ -327,16 +333,16 @@ public class FlatComponentsTest JToggleButton toggleButton17 = new JToggleButton(); JLabel label3 = new JLabel(); JToolBar toolBar3 = new JToolBar(); - JButton button26 = new JButton(); - JButton button27 = new JButton(); - JToggleButton toggleButton23 = new JToggleButton(); - JToggleButton toggleButton24 = new JToggleButton(); + FlatButton button26 = new FlatButton(); + FlatButton button27 = new FlatButton(); + FlatToggleButton toggleButton23 = new FlatToggleButton(); + FlatToggleButton toggleButton24 = new FlatToggleButton(); JLabel label4 = new JLabel(); JToolBar toolBar4 = new JToolBar(); - JButton button28 = new JButton(); - JButton button29 = new JButton(); - JToggleButton toggleButton25 = new JToggleButton(); - JToggleButton toggleButton26 = new JToggleButton(); + FlatButton button28 = new FlatButton(); + FlatButton button29 = new FlatButton(); + FlatToggleButton toggleButton25 = new FlatToggleButton(); + FlatToggleButton toggleButton26 = new FlatToggleButton(); //======== this ======== setLayout(new MigLayout( @@ -406,14 +412,14 @@ public class FlatComponentsTest //---- button17 ---- button17.setText("Sq"); - button17.putClientProperty("JButton.buttonType", "square"); - button17.putClientProperty("JComponent.minimumWidth", 0); + button17.setButtonType(FlatButton.ButtonType.square); + button17.setMinimumWidth(0); add(button17, "cell 1 1"); //---- button22 ---- button22.setText("Rd"); - button22.putClientProperty("JButton.buttonType", "roundRect"); - button22.putClientProperty("JComponent.minimumWidth", 0); + button22.setButtonType(FlatButton.ButtonType.roundRect); + button22.setMinimumWidth(0); add(button22, "cell 1 1"); //---- button2 ---- @@ -425,16 +431,16 @@ public class FlatComponentsTest //---- button18 ---- button18.setText("Sq"); - button18.putClientProperty("JButton.buttonType", "square"); + button18.setButtonType(FlatButton.ButtonType.square); button18.setEnabled(false); - button18.putClientProperty("JComponent.minimumWidth", 0); + button18.setMinimumWidth(0); add(button18, "cell 2 1"); //---- button23 ---- button23.setText("Rd"); - button23.putClientProperty("JButton.buttonType", "roundRect"); + button23.setButtonType(FlatButton.ButtonType.roundRect); button23.setEnabled(false); - button23.putClientProperty("JComponent.minimumWidth", 0); + button23.setMinimumWidth(0); add(button23, "cell 2 1"); //---- button5 ---- @@ -445,12 +451,12 @@ public class FlatComponentsTest //---- button3 ---- button3.setText("Help"); - button3.putClientProperty("JButton.buttonType", "help"); + button3.setButtonType(FlatButton.ButtonType.help); add(button3, "cell 4 1"); //---- button12 ---- button12.setText("Help"); - button12.putClientProperty("JButton.buttonType", "help"); + button12.setButtonType(FlatButton.ButtonType.help); button12.setEnabled(false); add(button12, "cell 4 1"); @@ -485,12 +491,12 @@ public class FlatComponentsTest //---- toggleButton9 ---- toggleButton9.setText("Sq"); - toggleButton9.putClientProperty("JButton.buttonType", "square"); + toggleButton9.setButtonType(FlatButton.ButtonType.square); add(toggleButton9, "cell 1 2"); //---- toggleButton19 ---- toggleButton19.setText("Rd"); - toggleButton19.putClientProperty("JButton.buttonType", "roundRect"); + toggleButton19.setButtonType(FlatButton.ButtonType.roundRect); add(toggleButton19, "cell 1 2"); //---- toggleButton2 ---- @@ -500,13 +506,13 @@ public class FlatComponentsTest //---- toggleButton10 ---- toggleButton10.setText("Sq"); - toggleButton10.putClientProperty("JButton.buttonType", "square"); + toggleButton10.setButtonType(FlatButton.ButtonType.square); toggleButton10.setEnabled(false); add(toggleButton10, "cell 2 2"); //---- toggleButton20 ---- toggleButton20.setText("Rd"); - toggleButton20.putClientProperty("JButton.buttonType", "roundRect"); + toggleButton20.setButtonType(FlatButton.ButtonType.roundRect); toggleButton20.setEnabled(false); add(toggleButton20, "cell 2 2"); @@ -574,13 +580,13 @@ public class FlatComponentsTest //---- toggleButton5 ---- toggleButton5.setText("Tab"); - toggleButton5.putClientProperty("JButton.buttonType", "tab"); + toggleButton5.setButtonType(FlatButton.ButtonType.tab); toggleButton5.setSelected(true); add(toggleButton5, "cell 5 3"); //---- toggleButton8 ---- toggleButton8.setText("Tab"); - toggleButton8.putClientProperty("JButton.buttonType", "tab"); + toggleButton8.setButtonType(FlatButton.ButtonType.tab); toggleButton8.setEnabled(false); toggleButton8.setSelected(true); add(toggleButton8, "cell 5 3"); @@ -1110,13 +1116,6 @@ public class FlatComponentsTest "[]")); //---- buttonTypeComboBox ---- - buttonTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] { - "-", - "square", - "roundRect", - "tab", - "help" - })); buttonTypeComboBox.addActionListener(e -> buttonTypeChanged()); panel5.add(buttonTypeComboBox, "cell 0 0"); @@ -1347,24 +1346,24 @@ public class FlatComponentsTest //---- button26 ---- button26.setIcon(UIManager.getIcon("Tree.closedIcon")); - button26.putClientProperty("JButton.buttonType", "square"); + button26.setButtonType(FlatButton.ButtonType.square); toolBar3.add(button26); //---- button27 ---- button27.setIcon(UIManager.getIcon("Tree.openIcon")); - button27.putClientProperty("JButton.buttonType", "square"); + button27.setButtonType(FlatButton.ButtonType.square); toolBar3.add(button27); //---- toggleButton23 ---- toggleButton23.setIcon(UIManager.getIcon("FileView.computerIcon")); toggleButton23.setSelected(true); - toggleButton23.putClientProperty("JButton.buttonType", "square"); + toggleButton23.setButtonType(FlatButton.ButtonType.square); toolBar3.add(toggleButton23); //---- toggleButton24 ---- toggleButton24.setIcon(UIManager.getIcon("FileView.floppyDriveIcon")); toggleButton24.setSelected(true); - toggleButton24.putClientProperty("JButton.buttonType", "square"); + toggleButton24.setButtonType(FlatButton.ButtonType.square); toolBar3.add(toggleButton24); } add(toolBar3, "cell 1 23 5 1"); @@ -1378,24 +1377,24 @@ public class FlatComponentsTest //---- button28 ---- button28.setIcon(UIManager.getIcon("Tree.closedIcon")); - button28.putClientProperty("JButton.buttonType", "roundRect"); + button28.setButtonType(FlatButton.ButtonType.roundRect); toolBar4.add(button28); //---- button29 ---- button29.setIcon(UIManager.getIcon("Tree.openIcon")); - button29.putClientProperty("JButton.buttonType", "roundRect"); + button29.setButtonType(FlatButton.ButtonType.roundRect); toolBar4.add(button29); //---- toggleButton25 ---- toggleButton25.setIcon(UIManager.getIcon("FileView.computerIcon")); toggleButton25.setSelected(true); - toggleButton25.putClientProperty("JButton.buttonType", "roundRect"); + toggleButton25.setButtonType(FlatButton.ButtonType.roundRect); toolBar4.add(toggleButton25); //---- toggleButton26 ---- toggleButton26.setIcon(UIManager.getIcon("FileView.floppyDriveIcon")); toggleButton26.setSelected(true); - toggleButton26.putClientProperty("JButton.buttonType", "roundRect"); + toggleButton26.setButtonType(FlatButton.ButtonType.roundRect); toolBar4.add(toggleButton26); } add(toolBar4, "cell 1 23 5 1"); @@ -1419,7 +1418,7 @@ public class FlatComponentsTest private JTextField textField1; private FlatProgressBar progressBar3; private FlatProgressBar progressBar4; - private JComboBox buttonTypeComboBox; + private FlatTestEnumComboBox buttonTypeComboBox; private JCheckBox borderPaintedCheckBox; private JCheckBox roundRectCheckBox; private JCheckBox contentAreaFilledCheckBox; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index da17c68a..1e87e0b5 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -53,19 +53,19 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1" } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button17" "text": "Sq" - "$client.JButton.buttonType": "square" - "$client.JComponent.minimumWidth": 0 + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square + "minimumWidth": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1" } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button22" "text": "Rd" - "$client.JButton.buttonType": "roundRect" - "$client.JComponent.minimumWidth": 0 + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect + "minimumWidth": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1" } ) @@ -78,21 +78,21 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 1" } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button18" "text": "Sq" - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square "enabled": false - "$client.JComponent.minimumWidth": 0 + "minimumWidth": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 1" } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button23" "text": "Rd" - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect "enabled": false - "$client.JComponent.minimumWidth": 0 + "minimumWidth": 0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 1" } ) @@ -104,17 +104,17 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 1" } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button3" "text": "Help" - "$client.JButton.buttonType": "help" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType help }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 1" } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button12" "text": "Help" - "$client.JButton.buttonType": "help" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType help "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 1" @@ -162,17 +162,17 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 2" } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton9" "text": "Sq" - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 2" } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton19" "text": "Rd" - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 2" } ) @@ -183,18 +183,18 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 2" } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton10" "text": "Sq" - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 2" } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton20" "text": "Rd" - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 2" @@ -285,18 +285,18 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 3" } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton5" "text": "Tab" - "$client.JButton.buttonType": "tab" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType tab "selected": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 5 3" } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton8" "text": "Tab" - "$client.JButton.buttonType": "tab" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType tab "enabled": false "selected": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -963,18 +963,11 @@ new FormModel { } ) { name: "panel5" "border": new javax.swing.border.TitledBorder( "Control" ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "buttonTypeComboBox" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "-" - addElement( "-" ) - addElement( "square" ) - addElement( "roundRect" ) - addElement( "tab" ) - addElement( "help" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false + "JavaCodeGenerator.typeParameters": "ButtonType" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -1317,27 +1310,27 @@ new FormModel { } ) add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { name: "toolBar3" - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button26" "icon": #SwingIcon1 - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button27" "icon": #SwingIcon2 - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton23" "icon": #SwingIcon4 "selected": true - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton24" "icon": #SwingIcon5 "selected": true - "$client.JButton.buttonType": "square" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 23 5 1" @@ -1350,27 +1343,27 @@ new FormModel { } ) add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { name: "toolBar4" - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button28" "icon": #SwingIcon1 - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect } ) - add( new FormComponent( "javax.swing.JButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button29" "icon": #SwingIcon2 - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton25" "icon": #SwingIcon4 "selected": true - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect } ) - add( new FormComponent( "javax.swing.JToggleButton" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) { name: "toggleButton26" "icon": #SwingIcon5 "selected": true - "$client.JButton.buttonType": "roundRect" + "buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 23 5 1" diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestEnumComboBox.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestEnumComboBox.java new file mode 100644 index 00000000..b92355b6 --- /dev/null +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestEnumComboBox.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.testing; + +import java.awt.Component; +import java.util.Objects; +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; +import javax.swing.JComboBox; +import javax.swing.JList; +import javax.swing.plaf.basic.BasicComboBoxRenderer; + +/** + * @author Karl Tauber + */ +public class FlatTestEnumComboBox + extends JComboBox +{ + @SuppressWarnings( "unchecked" ) + public void init( Class enumType, boolean supportDefault ) { + setRenderer( new EnumComboBoxRenderer() ); + setModel( new EnumComboBoxModel<>( enumType, supportDefault ) ); + } + + @SuppressWarnings( "unchecked" ) + public E getSelectedValue() { + return (E) getSelectedItem(); + } + + @Override + public int getSelectedIndex() { + if( getSelectedItem() == null && getItemCount() > 0 && getItemAt( 0 ) == null ) + return 0; + + return super.getSelectedIndex(); + } + + //---- class EnumComboBoxRenderer ----------------------------------------- + + public static class EnumComboBoxRenderer + extends BasicComboBoxRenderer + { + @SuppressWarnings( "rawtypes" ) + @Override + public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus ) { + setEnabled( value != null || isSelected ); + if( value == null ) + value = "(default)"; + return super.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus ); + } + } + + //---- class EnumComboBoxModel -------------------------------------------- + + public static class EnumComboBoxModel + extends AbstractListModel + implements ComboBoxModel + { + private final boolean supportDefault; + private final E[] values; + private Object selectedItem; + + public EnumComboBoxModel( Class enumType, boolean supportDefault ) { + this.supportDefault = supportDefault; + values = enumType.getEnumConstants(); + + if( !supportDefault ) + selectedItem = values[0]; + } + + @Override + public int getSize() { + return values.length + (supportDefault ? 1 : 0); + } + + @Override + public E getElementAt( int index ) { + if( supportDefault ) { + if( index == 0 ) + return null; + index--; + } + return values[index]; + } + + @Override + public Object getSelectedItem() { + return selectedItem; + } + + @Override + public void setSelectedItem( Object anItem ) { + if( !Objects.equals( selectedItem, anItem ) ) { + selectedItem = anItem; + fireContentsChanged( this, -1, -1 ); + } + } + } +} From ab51f35d5dfe31d4c15c6828d13d1eb0bd602079 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 18:05:58 +0100 Subject: [PATCH 060/178] Extras: added extension classes for JEditorPane, JSpinner, JTextArea and JTextPane; added minimumWidth and roundRect properties (issue #117) --- .../extras/components/FlatComboBox.java | 30 ++++++++++ .../extras/components/FlatEditorPane.java | 44 ++++++++++++++ .../components/FlatFormattedTextField.java | 30 ++++++++++ .../extras/components/FlatPasswordField.java | 30 ++++++++++ .../extras/components/FlatSpinner.java | 59 +++++++++++++++++++ .../extras/components/FlatTextArea.java | 44 ++++++++++++++ .../extras/components/FlatTextField.java | 30 ++++++++++ .../extras/components/FlatTextPane.java | 44 ++++++++++++++ 8 files changed, 311 insertions(+) create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatEditorPane.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextArea.java create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextPane.java diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java index 22312042..316484cf 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java @@ -41,4 +41,34 @@ public class FlatComboBox public void setPlaceholderText( String placeholderText ) { putClientProperty( PLACEHOLDER_TEXT, placeholderText ); } + + + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "ComboBox.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns whether the component is painted with round edges. + */ + public boolean isRoundRect() { + return getClientPropertyBoolean( COMPONENT_ROUND_RECT, false ); + } + + /** + * Specifies whether the component is painted with round edges. + */ + public void setRoundRect( boolean roundRect ) { + putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatEditorPane.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatEditorPane.java new file mode 100644 index 00000000..403ccb43 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatEditorPane.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JEditorPane; + +/** + * Subclass of {@link JEditorPane} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatEditorPane + extends JEditorPane + implements FlatComponentExtension +{ + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java index 68cde840..f481f5cc 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java @@ -58,4 +58,34 @@ public class FlatFormattedTextField public void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); } + + + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns whether the component is painted with round edges. + */ + public boolean isRoundRect() { + return getClientPropertyBoolean( COMPONENT_ROUND_RECT, false ); + } + + /** + * Specifies whether the component is painted with round edges. + */ + public void setRoundRect( boolean roundRect ) { + putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java index e4088ade..a5ba8c17 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java @@ -58,4 +58,34 @@ public class FlatPasswordField public void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); } + + + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns whether the component is painted with round edges. + */ + public boolean isRoundRect() { + return getClientPropertyBoolean( COMPONENT_ROUND_RECT, false ); + } + + /** + * Specifies whether the component is painted with round edges. + */ + public void setRoundRect( boolean roundRect ) { + putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java new file mode 100644 index 00000000..109a7ecf --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JSpinner; + +/** + * Subclass of {@link JSpinner} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatSpinner + extends JSpinner + implements FlatComponentExtension +{ + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns whether the component is painted with round edges. + */ + public boolean isRoundRect() { + return getClientPropertyBoolean( COMPONENT_ROUND_RECT, false ); + } + + /** + * Specifies whether the component is painted with round edges. + */ + public void setRoundRect( boolean roundRect ) { + putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextArea.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextArea.java new file mode 100644 index 00000000..a0568d97 --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextArea.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JTextArea; + +/** + * Subclass of {@link JTextArea} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatTextArea + extends JTextArea + implements FlatComponentExtension +{ + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } +} diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java index f3750be9..7604c093 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java @@ -60,4 +60,34 @@ public class FlatTextField public void setSelectAllOnFocusPolicy( SelectAllOnFocusPolicy selectAllOnFocusPolicy ) { putClientPropertyEnumString( SELECT_ALL_ON_FOCUS_POLICY, selectAllOnFocusPolicy ); } + + + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } + + + /** + * Returns whether the component is painted with round edges. + */ + public boolean isRoundRect() { + return getClientPropertyBoolean( COMPONENT_ROUND_RECT, false ); + } + + /** + * Specifies whether the component is painted with round edges. + */ + public void setRoundRect( boolean roundRect ) { + putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextPane.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextPane.java new file mode 100644 index 00000000..4660068a --- /dev/null +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextPane.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.extras.components; + +import static com.formdev.flatlaf.FlatClientProperties.*; +import javax.swing.JTextPane; + +/** + * Subclass of {@link JTextPane} that provides easy access to FlatLaf specific client properties. + * + * @author Karl Tauber + */ +public class FlatTextPane + extends JTextPane + implements FlatComponentExtension +{ + /** + * Returns minimum width of a component. + */ + public int getMinimumWidth() { + return getClientPropertyInt( MINIMUM_WIDTH, "Component.minimumWidth" ); + } + + /** + * Specifies minimum width of a component. + */ + public void setMinimumWidth( int minimumWidth ) { + putClientProperty( MINIMUM_WIDTH, (minimumWidth >= 0) ? minimumWidth : null ); + } +} From 534384438b7ac1fab8cea58aab16ad62db006e9b Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 11 Dec 2020 23:44:52 +0100 Subject: [PATCH 061/178] Extras: added extension class for JTabbedPane (issue #117) --- .../formdev/flatlaf/FlatClientProperties.java | 6 +- .../components/FlatComponentExtension.java | 6 + .../extras/components/FlatTabbedPane.java | 537 ++++++++++++++++++ .../flatlaf/testing/FlatContainerTest.java | 267 ++++----- .../flatlaf/testing/FlatContainerTest.jfd | 97 +--- 5 files changed, 693 insertions(+), 220 deletions(-) create mode 100644 flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTabbedPane.java diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java index 4cbdb775..73a8cdc5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java @@ -264,7 +264,7 @@ public interface FlatClientProperties String TABBED_PANE_HAS_FULL_BORDER = "JTabbedPane.hasFullBorder"; /** - * Specifies whether the tab area should be hidded if it contains only one tab. + * Specifies whether the tab area should be hidden if it contains only one tab. *

* Component {@link javax.swing.JTabbedPane}
* Value type {@link java.lang.Boolean} @@ -349,7 +349,7 @@ public interface FlatClientProperties * Specifies the callback that is invoked when a tab close button is clicked. * The callback is responsible for closing the tab. *

- * Either use a {@link java.util.function.IntConsumer} that received the tab index as parameter: + * Either use a {@link java.util.function.IntConsumer} that receives the tab index as parameter: *

{@code
 	 * myTabbedPane.putClientProperty( "JTabbedPane.tabCloseCallback",
 	 *     (IntConsumer) tabIndex -> {
@@ -357,7 +357,7 @@ public interface FlatClientProperties
 	 *     } );
 	 * }
* Or use a {@link java.util.function.BiConsumer}<javax.swing.JTabbedPane, Integer> - * that received the tabbed pane and the tab index as parameters: + * that receives the tabbed pane and the tab index as parameters: *
{@code
 	 * myTabbedPane.putClientProperty( "JTabbedPane.tabCloseCallback",
 	 *     (BiConsumer) (tabbedPane, tabIndex) -> {
diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java
index 139ea768..29f753c3 100644
--- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java
+++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComponentExtension.java
@@ -17,6 +17,7 @@
 package com.formdev.flatlaf.extras.components;
 
 import java.awt.Color;
+import java.awt.Insets;
 import javax.swing.JComponent;
 import javax.swing.UIManager;
 
@@ -70,6 +71,11 @@ public interface FlatComponentExtension
 		return (value instanceof Color) ? (Color) value : UIManager.getColor( defaultValueKey );
 	}
 
+	default Insets getClientPropertyInsets( Object key, String defaultValueKey ) {
+		Object value = getClientProperty( key );
+		return (value instanceof Insets) ? (Insets) value : UIManager.getInsets( defaultValueKey );
+	}
+
 
 	default > T getClientPropertyEnumString( Object key, Class enumType,
 		String defaultValueKey, T defaultValue )
diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTabbedPane.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTabbedPane.java
new file mode 100644
index 00000000..7cd70ce2
--- /dev/null
+++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTabbedPane.java
@@ -0,0 +1,537 @@
+/*
+ * Copyright 2020 FormDev Software GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.formdev.flatlaf.extras.components;
+
+import static com.formdev.flatlaf.FlatClientProperties.*;
+import java.awt.Component;
+import java.awt.Insets;
+import java.util.function.BiConsumer;
+import javax.swing.JComponent;
+import javax.swing.JTabbedPane;
+import javax.swing.SwingConstants;
+
+/**
+ * Subclass of {@link JTabbedPane} that provides easy access to FlatLaf specific client properties.
+ *
+ * @author Karl Tauber
+ */
+public class FlatTabbedPane
+	extends JTabbedPane
+	implements FlatComponentExtension
+{
+	/**
+	 * Returns whether separators are shown between tabs.
+	 */
+	public boolean isShowTabSeparators() {
+		return getClientPropertyBoolean( TABBED_PANE_SHOW_TAB_SEPARATORS, "TabbedPane.showTabSeparators" );
+	}
+
+	/**
+	 * Specifies whether separators are shown between tabs.
+	 */
+	public void setShowTabSeparators( boolean showTabSeparators ) {
+		putClientProperty( TABBED_PANE_SHOW_TAB_SEPARATORS, showTabSeparators );
+	}
+
+
+	/**
+	 * Returns whether the separator between tabs area and content area should be shown.
+	 */
+	public boolean isShowContentSeparators() {
+		return getClientPropertyBoolean( TABBED_PANE_SHOW_CONTENT_SEPARATOR, true );
+	}
+
+	/**
+	 * Specifies whether the separator between tabs area and content area should be shown.
+	 */
+	public void setShowContentSeparators( boolean showContentSeparators ) {
+		putClientPropertyBoolean( TABBED_PANE_SHOW_CONTENT_SEPARATOR, showContentSeparators, true );
+	}
+
+
+	/**
+	 * Returns whether a full border is painted around a tabbed pane.
+	 */
+	public boolean isHasFullBorder() {
+		return getClientPropertyBoolean( TABBED_PANE_HAS_FULL_BORDER, "TabbedPane.hasFullBorder" );
+	}
+
+	/**
+	 * Specifies whether a full border is painted around a tabbed pane.
+	 */
+	public void setHasFullBorder( boolean hasFullBorder ) {
+		putClientProperty( TABBED_PANE_HAS_FULL_BORDER, hasFullBorder );
+	}
+
+
+	/**
+	 * Returns whether the tab area should be hidden if it contains only one tab.
+	 */
+	public boolean isHideTabAreaWithOneTab() {
+		return getClientPropertyBoolean( TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB, false );
+	}
+
+	/**
+	 * Specifies whether the tab area should be hidden if it contains only one tab.
+	 */
+	public void setHideTabAreaWithOneTab( boolean hideTabAreaWithOneTab ) {
+		putClientPropertyBoolean( TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB, hideTabAreaWithOneTab, false );
+	}
+
+
+	/**
+	 * Returns the minimum width of a tab.
+	 */
+	public int getMinimumTabWidth() {
+		return getClientPropertyInt( TABBED_PANE_MINIMUM_TAB_WIDTH, "TabbedPane.minimumTabWidth" );
+	}
+
+	/**
+	 * Specifies the minimum width of a tab.
+	 */
+	public void setMinimumTabWidth( int minimumTabWidth ) {
+		putClientProperty( TABBED_PANE_MINIMUM_TAB_WIDTH, (minimumTabWidth >= 0) ? minimumTabWidth : null );
+	}
+
+
+	/**
+	 * Returns the minimum width of the tab at the given tab index.
+	 */
+	public int getMinimumTabWidth( int tabIndex ) {
+		JComponent c = (JComponent) getComponentAt( tabIndex );
+		return clientPropertyInt( c, TABBED_PANE_MINIMUM_TAB_WIDTH, 0 );
+	}
+
+	/**
+	 * Specifies the minimum width of the tab at the given tab index.
+	 */
+	public void setMinimumTabWidth( int tabIndex, int minimumTabWidth ) {
+		JComponent c = (JComponent) getComponentAt( tabIndex );
+		c.putClientProperty( TABBED_PANE_MINIMUM_TAB_WIDTH, (minimumTabWidth >= 0) ? minimumTabWidth : null );
+	}
+
+
+	/**
+	 * Returns the maximum width of a tab.
+	 */
+	public int getMaximumTabWidth() {
+		return getClientPropertyInt( TABBED_PANE_MAXIMUM_TAB_WIDTH, "TabbedPane.maximumTabWidth" );
+	}
+
+	/**
+	 * Specifies the maximum width of a tab.
+	 * 

+ * Applied only if tab does not have a custom tab component + * (see {@link javax.swing.JTabbedPane#setTabComponentAt(int, java.awt.Component)}). + */ + public void setMaximumTabWidth( int maximumTabWidth ) { + putClientProperty( TABBED_PANE_MAXIMUM_TAB_WIDTH, (maximumTabWidth >= 0) ? maximumTabWidth : null ); + } + + + /** + * Returns the maximum width of the tab at the given tab index. + */ + public int getMaximumTabWidth( int tabIndex ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + return clientPropertyInt( c, TABBED_PANE_MAXIMUM_TAB_WIDTH, 0 ); + } + + /** + * Specifies the maximum width of the tab at the given tab index. + *

+ * Applied only if tab does not have a custom tab component + * (see {@link javax.swing.JTabbedPane#setTabComponentAt(int, java.awt.Component)}). + */ + public void setMaximumTabWidth( int tabIndex, int maximumTabWidth ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + c.putClientProperty( TABBED_PANE_MAXIMUM_TAB_WIDTH, (maximumTabWidth >= 0) ? maximumTabWidth : null ); + } + + + /** + * Returns the height of a tab. + */ + public int getTabHeight() { + return getClientPropertyInt( TABBED_PANE_TAB_HEIGHT, "TabbedPane.tabHeight" ); + } + + /** + * Specifies the height of a tab. + */ + public void setTabHeight( int tabHeight ) { + putClientProperty( TABBED_PANE_TAB_HEIGHT, (tabHeight >= 0) ? tabHeight : null ); + } + + + /** + * Returns the insets of a tab. + */ + public Insets getTabInsets() { + return getClientPropertyInsets( TABBED_PANE_TAB_INSETS, "TabbedPane.tabInsets" ); + } + + /** + * Specifies the insets of a tab. + */ + public void setTabInsets( Insets tabInsets ) { + putClientProperty( TABBED_PANE_TAB_INSETS, tabInsets ); + } + + + /** + * Returns the insets of the tab at the given tab index. + */ + public Insets getTabInsets( int tabIndex ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + return (Insets) c.getClientProperty( TABBED_PANE_TAB_INSETS ); + } + + /** + * Specifies the insets of the tab at the given tab index. + */ + public void setTabInsets( int tabIndex, Insets tabInsets ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + c.putClientProperty( TABBED_PANE_TAB_INSETS, tabInsets ); + } + + + /** + * Returns the insets of the tab area. + */ + public Insets getTabAreaInsets() { + return getClientPropertyInsets( TABBED_PANE_TAB_AREA_INSETS, "TabbedPane.tabAreaInsets" ); + } + + /** + * Specifies the insets of the tab area. + */ + public void setTabAreaInsets( Insets tabAreaInsets ) { + putClientProperty( TABBED_PANE_TAB_AREA_INSETS, tabAreaInsets ); + } + + + /** + * Returns whether all tabs are closable. + */ + public boolean isTabsClosable() { + return getClientPropertyBoolean( TABBED_PANE_TAB_CLOSABLE, false ); + } + + /** + * Specifies whether all tabs are closable. + * If set to {@code true}, all tabs in that tabbed pane are closable. + * To make individual tabs closable, use {@link #setTabClosable(int, boolean)}. + *

+ * Note that you have to specify a callback (see {@link #setTabCloseCallback(BiConsumer)}) + * that is invoked when the user clicks a tab close button. + * The callback is responsible for closing the tab. + */ + public void setTabsClosable( boolean tabClosable ) { + putClientPropertyBoolean( TABBED_PANE_TAB_CLOSABLE, tabClosable, false ); + } + + + /** + * Returns whether the tab at the given tab index is closable. + */ + public Boolean isTabClosable( int tabIndex ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + Object value = c.getClientProperty( TABBED_PANE_TAB_CLOSABLE ); + return (value instanceof Boolean) ? (boolean) value : isTabsClosable(); + } + + /** + * Specifies whether the tab at the given tab index is closable. + * To make all tabs closable, use {@link #setTabsClosable(boolean)}. + *

+ * Note that you have to specify a callback (see {@link #setTabCloseCallback(BiConsumer)}) + * that is invoked when the user clicks a tab close button. + * The callback is responsible for closing the tab. + */ + public void setTabClosable( int tabIndex, boolean tabClosable ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + c.putClientProperty( TABBED_PANE_TAB_CLOSABLE, tabClosable ); + } + + + /** + * Returns the tooltip text used for tab close buttons. + */ + public String getTabCloseToolTipText() { + return (String) getClientProperty( TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT ); + } + + /** + * Specifies the tooltip text used for tab close buttons. + */ + public void setTabCloseToolTipText( String tabCloseToolTipText ) { + putClientProperty( TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT, tabCloseToolTipText ); + } + + + /** + * Returns the tooltip text used for tab close button at the given tab index. + */ + public String getTabCloseToolTipText( int tabIndex ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + return (String) c.getClientProperty( TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT ); + } + + /** + * Specifies the tooltip text used for tab close button at the given tab index. + */ + public void setTabCloseToolTipText( int tabIndex, String tabCloseToolTipText ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + c.putClientProperty( TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT, tabCloseToolTipText ); + } + + + /** + * Returns the callback that is invoked when a tab close button is clicked. + * The callback is responsible for closing the tab. + */ + @SuppressWarnings( "unchecked" ) + public BiConsumer getTabCloseCallback() { + return (BiConsumer) getClientProperty( TABBED_PANE_TAB_CLOSE_CALLBACK ); + } + + /** + * Specifies the callback that is invoked when a tab close button is clicked. + * The callback is responsible for closing the tab. + *

+ * Use a {@link java.util.function.BiConsumer}<javax.swing.JTabbedPane, Integer> + * that receives the tabbed pane and the tab index as parameters: + *

{@code
+	 * myTabbedPane.setTabCloseCallback( (tabbedPane, tabIndex) -> {
+	 *     // close tab here
+	 * } );
+	 * }
+ * If you need to check whether a modifier key (e.g. Alt or Shift) was pressed + * while the user clicked the tab close button, use {@link java.awt.EventQueue#getCurrentEvent} + * to get current event, check whether it is a {@link java.awt.event.MouseEvent} + * and invoke its methods. E.g. + *
{@code
+	 * AWTEvent e = EventQueue.getCurrentEvent();
+	 * boolean shift = (e instanceof MouseEvent) ? ((MouseEvent)e).isShiftDown() : false;
+	 * }
+ */ + public void setTabCloseCallback( BiConsumer tabCloseCallback ) { + putClientProperty( TABBED_PANE_TAB_CLOSE_CALLBACK, tabCloseCallback ); + } + + + /** + * Returns the callback that is invoked when the tab close button at the given tab index is clicked. + * The callback is responsible for closing the tab. + */ + @SuppressWarnings( "unchecked" ) + public BiConsumer getTabCloseCallback( int tabIndex ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + return (BiConsumer) c.getClientProperty( TABBED_PANE_TAB_CLOSE_CALLBACK ); + } + + /** + * Specifies the callback that is invoked when the tab close button at the given tab index is clicked. + * The callback is responsible for closing the tab. + * + * @see #setTabCloseCallback(BiConsumer) + */ + public void setTabCloseCallback( int tabIndex, BiConsumer tabCloseCallback ) { + JComponent c = (JComponent) getComponentAt( tabIndex ); + c.putClientProperty( TABBED_PANE_TAB_CLOSE_CALLBACK, tabCloseCallback ); + } + + + // NOTE: enum names must be equal to allowed strings + public enum TabsPopupPolicy { never, asNeeded }; + + /** + * Returns the display policy for the "more tabs" button, + * which shows a popup menu with the (partly) hidden tabs. + */ + public TabsPopupPolicy getTabsPopupPolicy() { + return getClientPropertyEnumString( TABBED_PANE_TABS_POPUP_POLICY, TabsPopupPolicy.class, + "TabbedPane.tabsPopupPolicy", TabsPopupPolicy.asNeeded ); + } + + /** + * Specifies the display policy for the "more tabs" button, + * which shows a popup menu with the (partly) hidden tabs. + */ + public void setTabsPopupPolicy( TabsPopupPolicy tabsPopupPolicy ) { + putClientPropertyEnumString( TABBED_PANE_TABS_POPUP_POLICY, tabsPopupPolicy ); + } + + + // NOTE: enum names must be equal to allowed strings + public enum ScrollButtonsPolicy { never, asNeeded, asNeededSingle }; + + /** + * Returns the display policy for the forward/backward scroll arrow buttons. + */ + public ScrollButtonsPolicy getScrollButtonsPolicy() { + return getClientPropertyEnumString( TABBED_PANE_SCROLL_BUTTONS_POLICY, ScrollButtonsPolicy.class, + "TabbedPane.scrollButtonsPolicy", ScrollButtonsPolicy.asNeededSingle ); + } + + /** + * Specifies the display policy for the forward/backward scroll arrow buttons. + */ + public void setScrollButtonsPolicy( ScrollButtonsPolicy scrollButtonsPolicy ) { + putClientPropertyEnumString( TABBED_PANE_SCROLL_BUTTONS_POLICY, scrollButtonsPolicy ); + } + + + // NOTE: enum names must be equal to allowed strings + public enum ScrollButtonsPlacement { both, trailing }; + + /** + * Returns the placement of the forward/backward scroll arrow buttons. + */ + public ScrollButtonsPlacement getScrollButtonsPlacement() { + return getClientPropertyEnumString( TABBED_PANE_SCROLL_BUTTONS_PLACEMENT, ScrollButtonsPlacement.class, + "TabbedPane.scrollButtonsPlacement", ScrollButtonsPlacement.both ); + } + + /** + * Specifies the placement of the forward/backward scroll arrow buttons. + */ + public void setScrollButtonsPlacement( ScrollButtonsPlacement scrollButtonsPlacement ) { + putClientPropertyEnumString( TABBED_PANE_SCROLL_BUTTONS_PLACEMENT, scrollButtonsPlacement ); + } + + + // NOTE: enum names must be equal to allowed strings + public enum TabAreaAlignment { leading, trailing, center, fill }; + + /** + * Returns the alignment of the tab area. + */ + public TabAreaAlignment getTabAreaAlignment() { + return getClientPropertyEnumString( TABBED_PANE_TAB_AREA_ALIGNMENT, TabAreaAlignment.class, + "TabbedPane.tabAreaAlignment", TabAreaAlignment.leading ); + } + + /** + * Specifies the alignment of the tab area. + */ + public void setTabAreaAlignment( TabAreaAlignment tabAreaAlignment ) { + putClientPropertyEnumString( TABBED_PANE_TAB_AREA_ALIGNMENT, tabAreaAlignment ); + } + + + // NOTE: enum names must be equal to allowed strings + public enum TabAlignment { leading, trailing, center }; + + /** + * Returns the horizontal alignment of the tab title and icon. + */ + public TabAlignment getTabAlignment() { + return getClientPropertyEnumString( TABBED_PANE_TAB_ALIGNMENT, TabAlignment.class, + "TabbedPane.tabAlignment", TabAlignment.center ); + } + + /** + * Specifies the horizontal alignment of the tab title and icon. + */ + public void setTabAlignment( TabAlignment tabAlignment ) { + putClientPropertyEnumString( TABBED_PANE_TAB_ALIGNMENT, tabAlignment ); + } + + + // NOTE: enum names must be equal to allowed strings + public enum TabWidthMode { preferred, equal, compact }; + + /** + * Returns how the tabs should be sized. + */ + public TabWidthMode getTabWidthMode() { + return getClientPropertyEnumString( TABBED_PANE_TAB_WIDTH_MODE, TabWidthMode.class, + "TabbedPane.tabWidthMode", TabWidthMode.preferred ); + } + + /** + * Specifies how the tabs should be sized. + */ + public void setTabWidthMode( TabWidthMode tabWidthMode ) { + putClientPropertyEnumString( TABBED_PANE_TAB_WIDTH_MODE, tabWidthMode ); + } + + + /** + * Returns the tab icon placement (relative to tab title). + */ + public int getTabIconPlacement() { + return getClientPropertyInt( TABBED_PANE_TAB_ICON_PLACEMENT, SwingConstants.LEADING ); + } + + /** + * Specifies the tab icon placement (relative to tab title). + *

+ * Allowed Values are: + *

    + *
  • {@link SwingConstants#LEADING} (default) + *
  • {@link SwingConstants#TRAILING} + *
  • {@link SwingConstants#TOP} + *
  • {@link SwingConstants#BOTTOM} + *
+ */ + public void setTabIconPlacement( int tabIconPlacement ) { + putClientProperty( TABBED_PANE_TAB_ICON_PLACEMENT, (tabIconPlacement >= 0) ? tabIconPlacement : null ); + } + + + /** + * Returns a component that will be placed at the leading edge of the tabs area. + */ + public Component getLeadingComponent() { + return (Component) getClientProperty( TABBED_PANE_LEADING_COMPONENT ); + } + + /** + * Specifies a component that will be placed at the leading edge of the tabs area. + *

+ * For top and bottom tab placement, the layed out component size will be + * the preferred component width and the tab area height.
+ * For left and right tab placement, the layed out component size will be + * the tab area width and the preferred component height. + */ + public void setLeadingComponent( Component leadingComponent ) { + putClientProperty( TABBED_PANE_LEADING_COMPONENT, leadingComponent ); + } + + + /** + * Returns a component that will be placed at the trailing edge of the tabs area. + */ + public Component getTrailingComponent() { + return (Component) getClientProperty( TABBED_PANE_TRAILING_COMPONENT ); + } + + /** + * Specifies a component that will be placed at the trailing edge of the tabs area. + *

+ * For top and bottom tab placement, the layed out component size will be + * the available horizontal space (minimum is preferred component width) and the tab area height.
+ * For left and right tab placement, the layed out component size will be + * the tab area width and the available vertical space (minimum is preferred component height). + */ + public void setTrailingComponent( Component trailingComponent ) { + putClientProperty( TABBED_PANE_TRAILING_COMPONENT, trailingComponent ); + } +} diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java index 4fdc86af..d1d063e5 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java @@ -19,11 +19,12 @@ package com.formdev.flatlaf.testing; import static com.formdev.flatlaf.FlatClientProperties.*; import java.awt.*; import java.awt.event.MouseEvent; -import java.util.function.BiConsumer; import javax.swing.*; import javax.swing.border.*; import com.formdev.flatlaf.FlatLaf; import com.formdev.flatlaf.extras.TriStateCheckBox; +import com.formdev.flatlaf.extras.components.FlatTabbedPane; +import com.formdev.flatlaf.extras.components.FlatTabbedPane.*; import com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon; import com.formdev.flatlaf.util.ScaledImageIcon; import com.jgoodies.forms.layout.*; @@ -46,11 +47,21 @@ public class FlatContainerTest public FlatContainerTest() { initComponents(); + tabPlacementField.init( TabPlacement.class, true ); + iconPlacementField.init( TabIconPlacement.class, true ); + tabsPopupPolicyField.init( TabsPopupPolicy.class, true ); + scrollButtonsPolicyField.init( ScrollButtonsPolicy.class, true ); + scrollButtonsPlacementField.init( ScrollButtonsPlacement.class, true ); + tabAreaAlignmentField.init( TabAreaAlignment.class, true ); + tabAlignmentField.init( TabAlignment.class, true ); + tabWidthModeField.init( TabWidthMode.class, true ); + tabCountChanged(); tabsClosableCheckBox.setSelected( true ); tabsClosableChanged(); - putTabbedPanesClientProperty( TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT, "Close" ); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabCloseToolTipText( "Close" ); tabScrollCheckBox.setSelected( true ); tabScrollChanged(); @@ -79,7 +90,7 @@ public class FlatContainerTest } private void hideTabAreaWithOneTabChanged() { - boolean hideTabAreaWithOneTab = hideTabAreaWithOneTabCheckBox.isSelected(); + Boolean hideTabAreaWithOneTab = hideTabAreaWithOneTabCheckBox.isSelected() ? true : null; putTabbedPanesClientProperty( TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB, hideTabAreaWithOneTab ); } @@ -158,6 +169,7 @@ public class FlatContainerTest setTabIcons( tabbedPane ); tabIconSizeSpinner.setEnabled( tabIconsCheckBox.isSelected() ); + iconPlacementField.setEnabled( tabIconsCheckBox.isSelected() ); } private void setTabIcons( JTabbedPane tabbedPane ) { @@ -182,14 +194,10 @@ public class FlatContainerTest } private void iconPlacementChanged() { - Object iconPlacement = null; - switch( (String) iconPlacementField.getSelectedItem() ) { - case "leading": iconPlacement = SwingConstants.LEADING; break; - case "trailing": iconPlacement = SwingConstants.TRAILING; break; - case "top": iconPlacement = SwingConstants.TOP; break; - case "bottom": iconPlacement = SwingConstants.BOTTOM; break; - } - putTabbedPanesClientProperty( TABBED_PANE_TAB_ICON_PLACEMENT, iconPlacement ); + TabIconPlacement value = iconPlacementField.getSelectedValue(); + int iconPlacement = (value != null) ? value.value : -1; + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabIconPlacement( iconPlacement ); } private void customBorderChanged() { @@ -252,13 +260,8 @@ public class FlatContainerTest } private void tabPlacementChanged() { - int tabPlacement = -1; - switch( (String) tabPlacementField.getSelectedItem() ) { - case "top": tabPlacement = SwingConstants.TOP; break; - case "bottom": tabPlacement = SwingConstants.BOTTOM; break; - case "left": tabPlacement = SwingConstants.LEFT; break; - case "right": tabPlacement = SwingConstants.RIGHT; break; - } + TabPlacement value = tabPlacementField.getSelectedValue(); + int tabPlacement = (value != null) ? value.value : -1; tabbedPane1.setTabPlacement( (tabPlacement >= 0) ? tabPlacement : SwingConstants.TOP ); tabbedPane2.setTabPlacement( (tabPlacement >= 0) ? tabPlacement : SwingConstants.BOTTOM ); @@ -267,49 +270,39 @@ public class FlatContainerTest } private void tabsPopupPolicyChanged() { - String value = (String) tabsPopupPolicyField.getSelectedItem(); - if( "default".equals( value ) ) - value = null; - putTabbedPanesClientProperty( TABBED_PANE_TABS_POPUP_POLICY, value ); + TabsPopupPolicy value = tabsPopupPolicyField.getSelectedValue(); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabsPopupPolicy( value ); } private void scrollButtonsPolicyChanged() { - String value = (String) scrollButtonsPolicyField.getSelectedItem(); - if( "default".equals( value ) ) - value = null; - putTabbedPanesClientProperty( TABBED_PANE_SCROLL_BUTTONS_POLICY, value ); + ScrollButtonsPolicy value = scrollButtonsPolicyField.getSelectedValue(); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setScrollButtonsPolicy( value ); } private void scrollButtonsPlacementChanged() { - String value = (String) scrollButtonsPlacementField.getSelectedItem(); - if( "default".equals( value ) ) - value = null; - putTabbedPanesClientProperty( TABBED_PANE_SCROLL_BUTTONS_PLACEMENT, value ); + ScrollButtonsPlacement value = scrollButtonsPlacementField.getSelectedValue(); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setScrollButtonsPlacement( value ); } private void tabAreaAlignmentChanged() { - String value = (String) tabAreaAlignmentField.getSelectedItem(); - if( "default".equals( value ) ) - value = null; - putTabbedPanesClientProperty( TABBED_PANE_TAB_AREA_ALIGNMENT, value ); + TabAreaAlignment value = tabAreaAlignmentField.getSelectedValue(); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabAreaAlignment( value ); } private void tabAlignmentChanged() { - String value = (String) tabAlignmentField.getSelectedItem(); - Integer tabAlignment = null; - switch( value ) { - case "center": tabAlignment = SwingConstants.CENTER; break; - case "leading": tabAlignment = SwingConstants.LEADING; break; - case "trailing": tabAlignment = SwingConstants.TRAILING; break; - } - putTabbedPanesClientProperty( TABBED_PANE_TAB_ALIGNMENT, tabAlignment ); + TabAlignment value = tabAlignmentField.getSelectedValue(); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabAlignment( value ); } private void tabWidthModeChanged() { - String value = (String) tabWidthModeField.getSelectedItem(); - if( "default".equals( value ) ) - value = null; - putTabbedPanesClientProperty( TABBED_PANE_TAB_WIDTH_MODE, value ); + TabWidthMode value = tabWidthModeField.getSelectedValue(); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabWidthMode( value ); } private void tabBackForegroundChanged() { @@ -349,65 +342,74 @@ public class FlatContainerTest private void tabsClosableChanged() { boolean closable = tabsClosableCheckBox.isSelected(); - putTabbedPanesClientProperty( TABBED_PANE_TAB_CLOSABLE, closable ? true : null ); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabsClosable( closable ); if( closable ) { - putTabbedPanesClientProperty( TABBED_PANE_TAB_CLOSE_CALLBACK, - (BiConsumer) (tabbedPane, tabIndex) -> { + for( FlatTabbedPane tabbedPane : allTabbedPanes ) { + tabbedPane.setTabCloseCallback( (tabbedPane2, tabIndex) -> { AWTEvent e = EventQueue.getCurrentEvent(); int modifiers = (e instanceof MouseEvent) ? ((MouseEvent)e).getModifiers() : 0; - JOptionPane.showMessageDialog( this, "Closed tab '" + tabbedPane.getTitleAt( tabIndex ) + "'." + JOptionPane.showMessageDialog( this, "Closed tab '" + tabbedPane2.getTitleAt( tabIndex ) + "'." + "\n\n(modifiers: " + MouseEvent.getMouseModifiersText( modifiers ) + ")", "Tab Closed", JOptionPane.PLAIN_MESSAGE ); } ); + } } } private void secondTabClosableChanged() { - Boolean value = secondTabClosableCheckBox.getValue(); + Boolean closable = secondTabClosableCheckBox.getValue(); - for( JTabbedPane tabbedPane : allTabbedPanes ) { + for( FlatTabbedPane tabbedPane : allTabbedPanes ) { if( tabbedPane.getTabCount() > 1 ) { - Component c = tabbedPane.getComponentAt( 1 ); - ((JComponent)c).putClientProperty( TABBED_PANE_TAB_CLOSABLE, value ); + if( closable != null ) + tabbedPane.setTabClosable( 1, closable ); + else { + JComponent c = (JComponent) tabbedPane.getComponentAt( 1 ); + c.putClientProperty( TABBED_PANE_TAB_CLOSABLE, null ); + } } } } private void tabAreaInsetsChanged() { Insets insets = tabAreaInsetsCheckBox.isSelected() ? new Insets( 5, 5, 10, 10 ) : null; - putTabbedPanesClientProperty( TABBED_PANE_TAB_AREA_INSETS, insets ); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabAreaInsets( insets ); } private void smallerTabHeightChanged() { - Integer tabHeight = smallerTabHeightCheckBox.isSelected() ? 26 : null; - putTabbedPanesClientProperty( TABBED_PANE_TAB_HEIGHT, tabHeight ); + int tabHeight = smallerTabHeightCheckBox.isSelected() ? 26 : -1; + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabHeight( tabHeight ); } private void smallerInsetsChanged() { Insets insets = smallerInsetsCheckBox.isSelected() ? new Insets( 2, 2, 2, 2 ) : null; - putTabbedPanesClientProperty( TABBED_PANE_TAB_INSETS, insets ); + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setTabInsets( insets ); } private void secondTabWiderChanged() { Insets insets = secondTabWiderCheckBox.isSelected() ? new Insets( 4, 20, 4, 20 ) : null; - for( JTabbedPane tabbedPane : allTabbedPanes ) { - if( tabbedPane.getTabCount() > 1 ) { - Component c = tabbedPane.getComponentAt( 1 ); - ((JComponent)c).putClientProperty( TABBED_PANE_TAB_INSETS, insets ); - } + for( FlatTabbedPane tabbedPane : allTabbedPanes ) { + if( tabbedPane.getTabCount() > 1 ) + tabbedPane.setTabInsets( 1, insets ); } } private void minimumTabWidthChanged() { - Integer minimumTabWidth = minimumTabWidthCheckBox.isSelected() ? 100 : null; - putTabbedPanesClientProperty( TABBED_PANE_MINIMUM_TAB_WIDTH, minimumTabWidth ); + int minimumTabWidth = minimumTabWidthCheckBox.isSelected() ? 100 : -1; + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setMinimumTabWidth( minimumTabWidth ); } private void maximumTabWidthChanged() { - Integer maximumTabWidth = maximumTabWidthCheckBox.isSelected() ? 60 : null; - putTabbedPanesClientProperty( TABBED_PANE_MAXIMUM_TAB_WIDTH, maximumTabWidth ); + int maximumTabWidth = maximumTabWidthCheckBox.isSelected() ? 60 : -1; + for( FlatTabbedPane tabbedPane : allTabbedPanes ) + tabbedPane.setMaximumTabWidth( maximumTabWidth ); } private void initComponents() { @@ -424,10 +426,10 @@ public class FlatContainerTest JPanel panel13 = new JPanel(); JLabel label4 = new JLabel(); JLabel tabbedPaneLabel = new JLabel(); - tabbedPane1 = new JTabbedPane(); - tabbedPane3 = new JTabbedPane(); - tabbedPane2 = new JTabbedPane(); - tabbedPane4 = new JTabbedPane(); + tabbedPane1 = new FlatTabbedPane(); + tabbedPane3 = new FlatTabbedPane(); + tabbedPane2 = new FlatTabbedPane(); + tabbedPane4 = new FlatTabbedPane(); FlatTestFrame.NoRightToLeftPanel tabbedPaneControlPanel = new FlatTestFrame.NoRightToLeftPanel(); tabScrollCheckBox = new JCheckBox(); JLabel tabCountLabel = new JLabel(); @@ -436,24 +438,24 @@ public class FlatContainerTest htmlTabsCheckBox = new JCheckBox(); multiLineTabsCheckBox = new JCheckBox(); JLabel tabsPopupPolicyLabel = new JLabel(); - tabsPopupPolicyField = new JComboBox<>(); + tabsPopupPolicyField = new FlatTestEnumComboBox<>(); tabBackForegroundCheckBox = new JCheckBox(); JLabel scrollButtonsPolicyLabel = new JLabel(); - scrollButtonsPolicyField = new JComboBox<>(); + scrollButtonsPolicyField = new FlatTestEnumComboBox<>(); tabIconsCheckBox = new JCheckBox(); tabIconSizeSpinner = new JSpinner(); - iconPlacementField = new JComboBox<>(); + iconPlacementField = new FlatTestEnumComboBox<>(); JLabel scrollButtonsPlacementLabel = new JLabel(); - scrollButtonsPlacementField = new JComboBox<>(); + scrollButtonsPlacementField = new FlatTestEnumComboBox<>(); tabsClosableCheckBox = new JCheckBox(); JLabel tabPlacementLabel = new JLabel(); - tabPlacementField = new JComboBox<>(); + tabPlacementField = new FlatTestEnumComboBox<>(); secondTabClosableCheckBox = new TriStateCheckBox(); JLabel tabAreaAlignmentLabel = new JLabel(); - tabAreaAlignmentField = new JComboBox<>(); - tabAlignmentField = new JComboBox<>(); + tabAreaAlignmentField = new FlatTestEnumComboBox<>(); + tabAlignmentField = new FlatTestEnumComboBox<>(); JLabel tabWidthModeLabel = new JLabel(); - tabWidthModeField = new JComboBox<>(); + tabWidthModeField = new FlatTestEnumComboBox<>(); leadingComponentCheckBox = new JCheckBox(); customBorderCheckBox = new JCheckBox(); tabAreaInsetsCheckBox = new JCheckBox(); @@ -623,11 +625,6 @@ public class FlatContainerTest tabbedPaneControlPanel.add(tabsPopupPolicyLabel, "cell 0 1"); //---- tabsPopupPolicyField ---- - tabsPopupPolicyField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "asNeeded", - "never" - })); tabsPopupPolicyField.addActionListener(e -> tabsPopupPolicyChanged()); tabbedPaneControlPanel.add(tabsPopupPolicyField, "cell 1 1"); @@ -641,12 +638,6 @@ public class FlatContainerTest tabbedPaneControlPanel.add(scrollButtonsPolicyLabel, "cell 0 2"); //---- scrollButtonsPolicyField ---- - scrollButtonsPolicyField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "asNeededSingle", - "asNeeded", - "never" - })); scrollButtonsPolicyField.addActionListener(e -> scrollButtonsPolicyChanged()); tabbedPaneControlPanel.add(scrollButtonsPolicyField, "cell 1 2"); @@ -662,12 +653,7 @@ public class FlatContainerTest tabbedPaneControlPanel.add(tabIconSizeSpinner, "cell 2 2"); //---- iconPlacementField ---- - iconPlacementField.setModel(new DefaultComboBoxModel<>(new String[] { - "leading", - "trailing", - "top", - "bottom" - })); + iconPlacementField.setEnabled(false); iconPlacementField.addActionListener(e -> iconPlacementChanged()); tabbedPaneControlPanel.add(iconPlacementField, "cell 2 2"); @@ -676,11 +662,6 @@ public class FlatContainerTest tabbedPaneControlPanel.add(scrollButtonsPlacementLabel, "cell 0 3"); //---- scrollButtonsPlacementField ---- - scrollButtonsPlacementField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "both", - "trailing" - })); scrollButtonsPlacementField.addActionListener(e -> scrollButtonsPlacementChanged()); tabbedPaneControlPanel.add(scrollButtonsPlacementField, "cell 1 3"); @@ -694,13 +675,6 @@ public class FlatContainerTest tabbedPaneControlPanel.add(tabPlacementLabel, "cell 0 4"); //---- tabPlacementField ---- - tabPlacementField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "top", - "bottom", - "left", - "right" - })); tabPlacementField.addActionListener(e -> tabPlacementChanged()); tabbedPaneControlPanel.add(tabPlacementField, "cell 1 4"); @@ -714,23 +688,10 @@ public class FlatContainerTest tabbedPaneControlPanel.add(tabAreaAlignmentLabel, "cell 0 5"); //---- tabAreaAlignmentField ---- - tabAreaAlignmentField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "leading", - "trailing", - "center", - "fill" - })); tabAreaAlignmentField.addActionListener(e -> tabAreaAlignmentChanged()); tabbedPaneControlPanel.add(tabAreaAlignmentField, "cell 1 5"); //---- tabAlignmentField ---- - tabAlignmentField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "leading", - "trailing", - "center" - })); tabAlignmentField.addActionListener(e -> tabAlignmentChanged()); tabbedPaneControlPanel.add(tabAlignmentField, "cell 1 5"); @@ -739,12 +700,6 @@ public class FlatContainerTest tabbedPaneControlPanel.add(tabWidthModeLabel, "cell 2 5"); //---- tabWidthModeField ---- - tabWidthModeField.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "preferred", - "equal", - "compact" - })); tabWidthModeField.addActionListener(e -> tabWidthModeChanged()); tabbedPaneControlPanel.add(tabWidthModeField, "cell 2 5"); @@ -818,32 +773,32 @@ public class FlatContainerTest add(panel9, "cell 0 0"); // JFormDesigner - End of component initialization //GEN-END:initComponents - allTabbedPanes = new JTabbedPane[] { tabbedPane1, tabbedPane2, tabbedPane3, tabbedPane4 }; + allTabbedPanes = new FlatTabbedPane[] { tabbedPane1, tabbedPane2, tabbedPane3, tabbedPane4 }; } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables - private JTabbedPane tabbedPane1; - private JTabbedPane tabbedPane3; - private JTabbedPane tabbedPane2; - private JTabbedPane tabbedPane4; + private FlatTabbedPane tabbedPane1; + private FlatTabbedPane tabbedPane3; + private FlatTabbedPane tabbedPane2; + private FlatTabbedPane tabbedPane4; private JCheckBox tabScrollCheckBox; private JSpinner tabCountSpinner; private JCheckBox customTabsCheckBox; private JCheckBox htmlTabsCheckBox; private JCheckBox multiLineTabsCheckBox; - private JComboBox tabsPopupPolicyField; + private FlatTestEnumComboBox tabsPopupPolicyField; private JCheckBox tabBackForegroundCheckBox; - private JComboBox scrollButtonsPolicyField; + private FlatTestEnumComboBox scrollButtonsPolicyField; private JCheckBox tabIconsCheckBox; private JSpinner tabIconSizeSpinner; - private JComboBox iconPlacementField; - private JComboBox scrollButtonsPlacementField; + private FlatTestEnumComboBox iconPlacementField; + private FlatTestEnumComboBox scrollButtonsPlacementField; private JCheckBox tabsClosableCheckBox; - private JComboBox tabPlacementField; + private FlatTestEnumComboBox tabPlacementField; private TriStateCheckBox secondTabClosableCheckBox; - private JComboBox tabAreaAlignmentField; - private JComboBox tabAlignmentField; - private JComboBox tabWidthModeField; + private FlatTestEnumComboBox tabAreaAlignmentField; + private FlatTestEnumComboBox tabAlignmentField; + private FlatTestEnumComboBox tabWidthModeField; private JCheckBox leadingComponentCheckBox; private JCheckBox customBorderCheckBox; private JCheckBox tabAreaInsetsCheckBox; @@ -859,7 +814,37 @@ public class FlatContainerTest private JCheckBox hideTabAreaWithOneTabCheckBox; // JFormDesigner - End of variables declaration //GEN-END:variables - private JTabbedPane[] allTabbedPanes; + private FlatTabbedPane[] allTabbedPanes; + + //---- enum TabPlacement -------------------------------------------------- + + enum TabPlacement { + top( SwingConstants.TOP ), + bottom( SwingConstants.BOTTOM ), + left( SwingConstants.LEFT ), + right( SwingConstants.RIGHT ); + + public final int value; + + TabPlacement( int value ) { + this.value = value; + } + }; + + //---- enum TabIconPlacement ---------------------------------------------- + + enum TabIconPlacement { + leading( SwingConstants.LEADING ), + trailing( SwingConstants.TRAILING ), + top( SwingConstants.TOP ), + bottom( SwingConstants.BOTTOM ); + + public final int value; + + TabIconPlacement( int value ) { + this.value = value; + } + }; //---- class Tab1Panel ---------------------------------------------------- diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd index 205708ed..1034387c 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd @@ -91,7 +91,7 @@ new FormModel { "gridX": 1 "gridY": 5 } ) - add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { + add( new FormContainer( "com.formdev.flatlaf.extras.components.FlatTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "tabbedPane1" auxiliary() { "JavaCodeGenerator.variableLocal": false @@ -100,7 +100,7 @@ new FormModel { "gridX": 1 "gridY": 7 } ) - add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { + add( new FormContainer( "com.formdev.flatlaf.extras.components.FlatTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "tabbedPane3" "tabPlacement": 2 auxiliary() { @@ -110,7 +110,7 @@ new FormModel { "gridX": 3 "gridY": 7 } ) - add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { + add( new FormContainer( "com.formdev.flatlaf.extras.components.FlatTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "tabbedPane2" "tabPlacement": 3 auxiliary() { @@ -119,7 +119,7 @@ new FormModel { }, new FormLayoutConstraints( class com.jgoodies.forms.layout.CellConstraints ) { "gridY": 9 } ) - add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { + add( new FormContainer( "com.formdev.flatlaf.extras.components.FlatTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "tabbedPane4" "tabPlacement": 4 auxiliary() { @@ -202,17 +202,11 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 1" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "tabsPopupPolicyField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "asNeeded" ) - addElement( "never" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "TabsPopupPolicy" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsPopupPolicyChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -234,18 +228,11 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 2" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "scrollButtonsPolicyField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "asNeededSingle" ) - addElement( "asNeeded" ) - addElement( "never" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "ScrollButtonsPolicy" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -280,18 +267,12 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 2" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "iconPlacementField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "leading" - addElement( "leading" ) - addElement( "trailing" ) - addElement( "top" ) - addElement( "bottom" ) - } + "enabled": false auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "TabIconPlacement" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "iconPlacementChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -303,17 +284,11 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 3" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "scrollButtonsPlacementField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "both" ) - addElement( "trailing" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "ScrollButtonsPlacement" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPlacementChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -335,19 +310,11 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 4" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "tabPlacementField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "top" ) - addElement( "bottom" ) - addElement( "left" ) - addElement( "right" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "TabPlacement" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -369,36 +336,21 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 5" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "tabAreaAlignmentField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "leading" ) - addElement( "trailing" ) - addElement( "center" ) - addElement( "fill" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "TabAreaAlignment" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabAreaAlignmentChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 5" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "tabAlignmentField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "leading" ) - addElement( "trailing" ) - addElement( "center" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "TabAlignment" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabAlignmentChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { @@ -410,18 +362,11 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 5" } ) - add( new FormComponent( "javax.swing.JComboBox" ) { + add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) { name: "tabWidthModeField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "preferred" ) - addElement( "equal" ) - addElement( "compact" ) - } auxiliary() { "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" + "JavaCodeGenerator.typeParameters": "TabWidthMode" } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabWidthModeChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { From 234003e2b178ab50bfaf6f34573e8db788774c0c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Dec 2020 00:33:51 +0100 Subject: [PATCH 062/178] Extras: Renamed tri-state check box class from `com.formdev.flatlaf.extras.TriStateCheckBox` to `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox` --- CHANGELOG.md | 7 +++++++ .../formdev/flatlaf/demo/extras/ExtrasPanel.java | 5 +++-- .../com/formdev/flatlaf/demo/extras/ExtrasPanel.jfd | 2 +- flatlaf-extras/README.md | 2 +- .../FlatTriStateCheckBox.java} | 13 +++++++------ .../formdev/flatlaf/testing/FlatContainerTest.java | 6 +++--- .../formdev/flatlaf/testing/FlatContainerTest.jfd | 2 +- .../flatlaf/testing/FlatInternalFrameTest.java | 10 +++++----- .../flatlaf/testing/FlatInternalFrameTest.jfd | 2 +- .../com/formdev/flatlaf/testing/FlatTestFrame.java | 7 ++++--- .../com/formdev/flatlaf/testing/FlatTestFrame.jfd | 2 +- .../flatlaf/testing/extras/FlatExtrasTest.java | 9 +++++---- .../flatlaf/testing/extras/FlatExtrasTest.jfd | 4 ++-- 13 files changed, 41 insertions(+), 30 deletions(-) rename flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/{TriStateCheckBox.java => components/FlatTriStateCheckBox.java} (89%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d2b276c..f5c0a485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ FlatLaf Change Log ## 0.46-SNAPSHOT +#### New features and improvements + +- Extras: Renamed tri-state check box class from + `com.formdev.flatlaf.extras.TriStateCheckBox` to + `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`. + + #### Fixed bugs - Table and TableHeader: Fixed missing right vertical grid line if using table diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.java index a7291324..37cfec1f 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.demo.extras; import javax.swing.*; import com.formdev.flatlaf.extras.*; +import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox; import net.miginfocom.swing.*; /** @@ -63,7 +64,7 @@ public class ExtrasPanel // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents label4 = new JLabel(); label1 = new JLabel(); - triStateCheckBox1 = new TriStateCheckBox(); + triStateCheckBox1 = new FlatTriStateCheckBox(); triStateLabel1 = new JLabel(); label2 = new JLabel(); svgIconsPanel = new JPanel(); @@ -124,7 +125,7 @@ public class ExtrasPanel // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JLabel label4; private JLabel label1; - private TriStateCheckBox triStateCheckBox1; + private FlatTriStateCheckBox triStateCheckBox1; private JLabel triStateLabel1; private JLabel label2; private JPanel svgIconsPanel; diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.jfd index 80741d5c..a121bc65 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.jfd +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/extras/ExtrasPanel.jfd @@ -21,7 +21,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 1" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "triStateCheckBox1" "text": "Three States" addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox1Changed", false ) ) diff --git a/flatlaf-extras/README.md b/flatlaf-extras/README.md index a4c6aeab..3e3e0c3d 100644 --- a/flatlaf-extras/README.md +++ b/flatlaf-extras/README.md @@ -7,7 +7,7 @@ This sub-project provides some additional components and classes: An icon that displays SVG using [svgSalamander](https://github.com/JFormDesigner/svgSalamander).\ ![FlatSVGIcon.png](../images/extras-FlatSVGIcon.png) -- [TriStateCheckBox](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/TriStateCheckBox.html): +- [FlatTriStateCheckBox](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.html): A tri-state check box.\ ![TriStateCheckBox.png](../images/extras-TriStateCheckBox.png) - [FlatAnimatedLafChange](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/FlatAnimatedLafChange.html): diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/TriStateCheckBox.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java similarity index 89% rename from flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/TriStateCheckBox.java rename to flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java index a60c45ef..781fac03 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/TriStateCheckBox.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java @@ -14,8 +14,9 @@ * limitations under the License. */ -package com.formdev.flatlaf.extras; +package com.formdev.flatlaf.extras.components; +import static com.formdev.flatlaf.FlatClientProperties.*; import java.awt.Color; import java.awt.Graphics; import java.awt.event.ItemEvent; @@ -36,7 +37,7 @@ import com.formdev.flatlaf.FlatLaf; * * @author Karl Tauber */ -public class TriStateCheckBox +public class FlatTriStateCheckBox extends JCheckBox { public enum State { INDETERMINATE, SELECTED, UNSELECTED } @@ -44,15 +45,15 @@ public class TriStateCheckBox private State state; private boolean thirdStateEnabled = true; - public TriStateCheckBox() { + public FlatTriStateCheckBox() { this( null ); } - public TriStateCheckBox( String text ) { + public FlatTriStateCheckBox( String text ) { this( text, State.INDETERMINATE ); } - public TriStateCheckBox( String text, State initialState ) { + public FlatTriStateCheckBox( String text, State initialState ) { super( text ); setModel( new ToggleButtonModel() { @@ -89,7 +90,7 @@ public class TriStateCheckBox State oldState = this.state; this.state = state; - putClientProperty( "JButton.selectedState", state == State.INDETERMINATE ? "indeterminate" : null ); + putClientProperty( SELECTED_STATE, state == State.INDETERMINATE ? SELECTED_STATE_INDETERMINATE : null ); firePropertyChange( "state", oldState, state ); repaint(); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java index d1d063e5..5dc283ed 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java @@ -22,9 +22,9 @@ import java.awt.event.MouseEvent; import javax.swing.*; import javax.swing.border.*; import com.formdev.flatlaf.FlatLaf; -import com.formdev.flatlaf.extras.TriStateCheckBox; import com.formdev.flatlaf.extras.components.FlatTabbedPane; import com.formdev.flatlaf.extras.components.FlatTabbedPane.*; +import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox; import com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon; import com.formdev.flatlaf.util.ScaledImageIcon; import com.jgoodies.forms.layout.*; @@ -450,7 +450,7 @@ public class FlatContainerTest tabsClosableCheckBox = new JCheckBox(); JLabel tabPlacementLabel = new JLabel(); tabPlacementField = new FlatTestEnumComboBox<>(); - secondTabClosableCheckBox = new TriStateCheckBox(); + secondTabClosableCheckBox = new FlatTriStateCheckBox(); JLabel tabAreaAlignmentLabel = new JLabel(); tabAreaAlignmentField = new FlatTestEnumComboBox<>(); tabAlignmentField = new FlatTestEnumComboBox<>(); @@ -795,7 +795,7 @@ public class FlatContainerTest private FlatTestEnumComboBox scrollButtonsPlacementField; private JCheckBox tabsClosableCheckBox; private FlatTestEnumComboBox tabPlacementField; - private TriStateCheckBox secondTabClosableCheckBox; + private FlatTriStateCheckBox secondTabClosableCheckBox; private FlatTestEnumComboBox tabAreaAlignmentField; private FlatTestEnumComboBox tabAlignmentField; private FlatTestEnumComboBox tabWidthModeField; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd index 1034387c..62d181c7 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.jfd @@ -320,7 +320,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 4" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "secondTabClosableCheckBox" "text": "Second Tab closable" auxiliary() { diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.java index ede122a5..c7cefe9d 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.java @@ -19,7 +19,7 @@ package com.formdev.flatlaf.testing; import java.awt.*; import java.beans.PropertyVetoException; import javax.swing.*; -import com.formdev.flatlaf.extras.TriStateCheckBox; +import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox; import com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon; import com.formdev.flatlaf.util.UIScale; import net.miginfocom.swing.*; @@ -63,9 +63,9 @@ public class FlatInternalFrameTest maximizableCheckBox.isSelected(), iconifiableCheckBox.isSelected() ); - if( iconCheckBox.getState() == TriStateCheckBox.State.SELECTED ) + if( iconCheckBox.getState() == FlatTriStateCheckBox.State.SELECTED ) internalFrame.setFrameIcon( new FlatFileViewFloppyDriveIcon() ); - else if( iconCheckBox.getState() == TriStateCheckBox.State.UNSELECTED ) + else if( iconCheckBox.getState() == FlatTriStateCheckBox.State.UNSELECTED ) internalFrame.setFrameIcon( null ); if( menuBarCheckBox.isSelected() ) { @@ -115,7 +115,7 @@ public class FlatInternalFrameTest closableCheckBox = new JCheckBox(); iconifiableCheckBox = new JCheckBox(); maximizableCheckBox = new JCheckBox(); - iconCheckBox = new TriStateCheckBox(); + iconCheckBox = new FlatTriStateCheckBox(); menuBarCheckBox = new JCheckBox(); titleLabel = new JLabel(); titleField = new JTextField(); @@ -207,7 +207,7 @@ public class FlatInternalFrameTest private JCheckBox closableCheckBox; private JCheckBox iconifiableCheckBox; private JCheckBox maximizableCheckBox; - private TriStateCheckBox iconCheckBox; + private FlatTriStateCheckBox iconCheckBox; private JCheckBox menuBarCheckBox; private JLabel titleLabel; private JTextField titleField; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.jfd index d9a9a8ef..69f42896 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatInternalFrameTest.jfd @@ -50,7 +50,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1,alignx left,growx 0" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "iconCheckBox" "text": "Frame icon" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index c6172a72..727c31c3 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -43,7 +43,8 @@ import com.formdev.flatlaf.demo.LookAndFeelsComboBox; import com.formdev.flatlaf.demo.DemoPrefs; import com.formdev.flatlaf.demo.intellijthemes.*; import com.formdev.flatlaf.extras.*; -import com.formdev.flatlaf.extras.TriStateCheckBox.State; +import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox; +import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.SystemInfo; import com.formdev.flatlaf.util.UIScale; @@ -660,7 +661,7 @@ public class FlatTestFrame inspectCheckBox = new JCheckBox(); explicitColorsCheckBox = new JCheckBox(); backgroundCheckBox = new JCheckBox(); - opaqueTriStateCheckBox = new TriStateCheckBox(); + opaqueTriStateCheckBox = new FlatTriStateCheckBox(); sizeVariantComboBox = new JComboBox<>(); closeButton = new JButton(); themesPanel = new IJThemesPanel(); @@ -805,7 +806,7 @@ public class FlatTestFrame private JCheckBox inspectCheckBox; private JCheckBox explicitColorsCheckBox; private JCheckBox backgroundCheckBox; - private TriStateCheckBox opaqueTriStateCheckBox; + private FlatTriStateCheckBox opaqueTriStateCheckBox; private JComboBox sizeVariantComboBox; private JButton closeButton; private IJThemesPanel themesPanel; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd index e174c4d5..03eb55b1 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd @@ -107,7 +107,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 7 0" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "opaqueTriStateCheckBox" "text": "opaque" "mnemonic": 79 diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java index 14da1a5d..098ae845 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java @@ -18,6 +18,7 @@ package com.formdev.flatlaf.testing.extras; import javax.swing.*; import com.formdev.flatlaf.extras.*; +import com.formdev.flatlaf.extras.components.*; import com.formdev.flatlaf.testing.*; import net.miginfocom.swing.*; @@ -117,9 +118,9 @@ public class FlatExtrasTest private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents label1 = new JLabel(); - triStateCheckBox1 = new TriStateCheckBox(); + triStateCheckBox1 = new FlatTriStateCheckBox(); triStateLabel1 = new JLabel(); - triStateCheckBox2 = new TriStateCheckBox(); + triStateCheckBox2 = new FlatTriStateCheckBox(); triStateLabel2 = new JLabel(); label2 = new JLabel(); svgIconsPanel = new JPanel(); @@ -238,9 +239,9 @@ public class FlatExtrasTest // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JLabel label1; - private TriStateCheckBox triStateCheckBox1; + private FlatTriStateCheckBox triStateCheckBox1; private JLabel triStateLabel1; - private TriStateCheckBox triStateCheckBox2; + private FlatTriStateCheckBox triStateCheckBox2; private JLabel triStateLabel2; private JLabel label2; private JPanel svgIconsPanel; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd index fc34f236..0f0c2222 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd @@ -15,7 +15,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 0" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "triStateCheckBox1" "text": "three states" addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox1Changed", false ) ) @@ -29,7 +29,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 0,gapx 30" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "triStateCheckBox2" "text": "third state disabled" "thirdStateEnabled": false From 42a91ba26c5b2487673667a3c4f6e8f648732be1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Dec 2020 12:21:48 +0100 Subject: [PATCH 063/178] Extras: renamed SVG utility class from `com.formdev.flatlaf.extras.SVGUtils` to `com.formdev.flatlaf.extras.FlatSVGUtils` --- CHANGELOG.md | 2 ++ .../src/main/java/com/formdev/flatlaf/demo/DemoFrame.java | 4 ++-- .../flatlaf/extras/{SVGUtils.java => FlatSVGUtils.java} | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) rename flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/{SVGUtils.java => FlatSVGUtils.java} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5c0a485..b81d9237 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ FlatLaf Change Log - Extras: Renamed tri-state check box class from `com.formdev.flatlaf.extras.TriStateCheckBox` to `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`. +- Extras: Renamed SVG utility class from `com.formdev.flatlaf.extras.SVGUtils` + to `com.formdev.flatlaf.extras.FlatSVGUtils`. #### Fixed bugs diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java index 195237c9..f611ee27 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java @@ -32,7 +32,7 @@ import com.formdev.flatlaf.demo.intellijthemes.*; import com.formdev.flatlaf.extras.FlatAnimatedLafChange; import com.formdev.flatlaf.extras.FlatSVGIcon; import com.formdev.flatlaf.extras.FlatUIDefaultsInspector; -import com.formdev.flatlaf.extras.SVGUtils; +import com.formdev.flatlaf.extras.FlatSVGUtils; import com.formdev.flatlaf.ui.JBRCustomDecorations; import net.miginfocom.layout.ConstraintParser; import net.miginfocom.layout.LC; @@ -59,7 +59,7 @@ class DemoFrame updateFontMenuItems(); controlBar.initialize( this, tabbedPane ); - setIconImages( SVGUtils.createWindowIconImages( "/com/formdev/flatlaf/demo/FlatLaf.svg" ) ); + setIconImages( FlatSVGUtils.createWindowIconImages( "/com/formdev/flatlaf/demo/FlatLaf.svg" ) ); if( tabIndex >= 0 && tabIndex < tabbedPane.getTabCount() && tabIndex != tabbedPane.getSelectedIndex() ) tabbedPane.setSelectedIndex( tabIndex ); diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/SVGUtils.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatSVGUtils.java similarity index 98% rename from flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/SVGUtils.java rename to flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatSVGUtils.java index 9f698d48..f40d3d83 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/SVGUtils.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatSVGUtils.java @@ -34,7 +34,7 @@ import com.kitfox.svg.SVGException; * * @author Karl Tauber */ -public class SVGUtils +public class FlatSVGUtils { /** * Creates from the given SVG a list of icon images with different sizes that @@ -131,7 +131,7 @@ public class SVGUtils */ private static SVGDiagram loadSVG( String svgName ) { try { - URL url = SVGUtils.class.getResource( svgName ); + URL url = FlatSVGUtils.class.getResource( svgName ); return SVGCache.getSVGUniverse().getDiagram( url.toURI() ); } catch( URISyntaxException ex ) { throw new RuntimeException( ex ); From 11f9740dbfcaaa237bf53e90912aca0315e09e9f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Dec 2020 13:59:58 +0100 Subject: [PATCH 064/178] Extras: added support for JComponent.outline client property (issue #117) --- CHANGELOG.md | 3 +++ .../formdev/flatlaf/FlatClientProperties.java | 18 ++++++------- .../flatlaf/extras/components/FlatButton.java | 26 +++++++++++++++++++ .../extras/components/FlatComboBox.java | 26 +++++++++++++++++++ .../components/FlatFormattedTextField.java | 26 +++++++++++++++++++ .../extras/components/FlatPasswordField.java | 26 +++++++++++++++++++ .../extras/components/FlatScrollPane.java | 26 +++++++++++++++++++ .../extras/components/FlatSpinner.java | 26 +++++++++++++++++++ .../extras/components/FlatTextField.java | 26 +++++++++++++++++++ .../extras/components/FlatToggleButton.java | 25 ++++++++++++++++++ 10 files changed, 219 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b81d9237..a766914f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ FlatLaf Change Log #### New features and improvements +- Extras: Added standard component extension classes that provides easy access + to FlatLaf specific client properties (see package + `com.formdev.flatlaf.extras.components`). - Extras: Renamed tri-state check box class from `com.formdev.flatlaf.extras.TriStateCheckBox` to `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java index 73a8cdc5..96831b16 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java @@ -130,6 +130,15 @@ public interface FlatClientProperties */ String MINIMUM_HEIGHT = "JComponent.minimumHeight"; + /** + * Paint the component with round edges. + *

+ * Components {@link javax.swing.JComboBox}, {@link javax.swing.JSpinner}, + * {@link javax.swing.JTextField}, {@link javax.swing.JFormattedTextField} and {@link javax.swing.JPasswordField}
+ * Value type {@link java.lang.Boolean} + */ + String COMPONENT_ROUND_RECT = "JComponent.roundRect"; + /** * Specifies the outline color of the component border. *

@@ -161,15 +170,6 @@ public interface FlatClientProperties */ String OUTLINE_WARNING = "warning"; - /** - * Paint the component with round edges. - *

- * Components {@link javax.swing.JComboBox}, {@link javax.swing.JSpinner}, - * {@link javax.swing.JTextField}, {@link javax.swing.JFormattedTextField} and {@link javax.swing.JPasswordField}
- * Value type {@link java.lang.Boolean} - */ - String COMPONENT_ROUND_RECT = "JComponent.roundRect"; - //---- Popup -------------------------------------------------------------- /** diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java index d76eba16..63ede0b4 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JButton; /** @@ -91,4 +92,29 @@ public class FlatButton public void setMinimumHeight( int minimumHeight ) { putClientProperty( MINIMUM_HEIGHT, (minimumHeight >= 0) ? minimumHeight : null ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java index 316484cf..6b9581c7 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatComboBox.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JComboBox; /** @@ -71,4 +72,29 @@ public class FlatComboBox public void setRoundRect( boolean roundRect ) { putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java index f481f5cc..5f943bfe 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatFormattedTextField.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JFormattedTextField; import com.formdev.flatlaf.extras.components.FlatTextField.SelectAllOnFocusPolicy; @@ -88,4 +89,29 @@ public class FlatFormattedTextField public void setRoundRect( boolean roundRect ) { putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java index a5ba8c17..93b88299 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatPasswordField.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JPasswordField; import com.formdev.flatlaf.extras.components.FlatTextField.SelectAllOnFocusPolicy; @@ -88,4 +89,29 @@ public class FlatPasswordField public void setRoundRect( boolean roundRect ) { putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java index ed0ef473..159b477d 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatScrollPane.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JScrollPane; /** @@ -56,4 +57,29 @@ public class FlatScrollPane public void setSmoothScrolling( boolean smoothScrolling ) { putClientProperty( SCROLL_PANE_SMOOTH_SCROLLING, smoothScrolling ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java index 109a7ecf..f4e162f0 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatSpinner.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JSpinner; /** @@ -56,4 +57,29 @@ public class FlatSpinner public void setRoundRect( boolean roundRect ) { putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java index 7604c093..a43d195b 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTextField.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras.components; import static com.formdev.flatlaf.FlatClientProperties.*; +import java.awt.Color; import javax.swing.JTextField; /** @@ -90,4 +91,29 @@ public class FlatTextField public void setRoundRect( boolean roundRect ) { putClientPropertyBoolean( COMPONENT_ROUND_RECT, roundRect, false ); } + + + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } } diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java index 3bccdd6e..a342f890 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatToggleButton.java @@ -92,6 +92,31 @@ public class FlatToggleButton } + /** + * Returns the outline color of the component border. + */ + public Object getOutline() { + return getClientProperty( OUTLINE ); + } + + /** + * Specifies the outline color of the component border. + *

+ * Allowed Values are: + *

    + *
  • {@code null} + *
  • string {@code "error"} + *
  • string {@code "warning"} + *
  • any color (type {@link Color}) + *
  • an array of two colors (type {@link Color}[2]) where the first color + * is for focused state and the second for unfocused state + *
+ */ + public void setOutline( Object outline ) { + putClientProperty( OUTLINE, outline ); + } + + /** * Returns height of underline if toggle button type is {@link ButtonType#tab}. */ From 176de6f245fcf1830dc8bf80d819681596a9a9a8 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Dec 2020 14:21:07 +0100 Subject: [PATCH 065/178] README.md: simplified download sections of subprojects --- flatlaf-extras/README.md | 4 +--- flatlaf-intellij-themes/README.md | 4 ---- flatlaf-jide-oss/README.md | 4 ---- flatlaf-swingx/README.md | 4 ---- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/flatlaf-extras/README.md b/flatlaf-extras/README.md index 3e3e0c3d..3e098b7e 100644 --- a/flatlaf-extras/README.md +++ b/flatlaf-extras/README.md @@ -35,10 +35,8 @@ Otherwise download `flatlaf-extras-.jar` here: [![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf-extras/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf-extras/_latestVersion) -You also need `flatlaf-.jar` and `svgSalamander-.jar`, which -you can download here: +If SVG classes are used, `svgSalamander-.jar` is also required: -[![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf/_latestVersion) [![Download](https://api.bintray.com/packages/jformdesigner/svgSalamander/svgSalamander/images/download.svg)](https://bintray.com/jformdesigner/svgSalamander/svgSalamander/_latestVersion) diff --git a/flatlaf-intellij-themes/README.md b/flatlaf-intellij-themes/README.md index 96e523c8..ad0d1534 100644 --- a/flatlaf-intellij-themes/README.md +++ b/flatlaf-intellij-themes/README.md @@ -25,10 +25,6 @@ Otherwise download `flatlaf-intellij-themes-.jar` here: [![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf-intellij-themes/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf-intellij-themes/_latestVersion) -You also need `flatlaf-.jar`, which you can download here: - -[![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf/_latestVersion) - How to use? ----------- diff --git a/flatlaf-jide-oss/README.md b/flatlaf-jide-oss/README.md index 2de13a14..94677a63 100644 --- a/flatlaf-jide-oss/README.md +++ b/flatlaf-jide-oss/README.md @@ -32,7 +32,3 @@ build script: Otherwise download `flatlaf-jide-oss-.jar` here: [![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf-jide-oss/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf-jide-oss/_latestVersion) - -You also need `flatlaf-.jar`, which you can download here: - -[![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf/_latestVersion) diff --git a/flatlaf-swingx/README.md b/flatlaf-swingx/README.md index 72d7fca4..0545cc62 100644 --- a/flatlaf-swingx/README.md +++ b/flatlaf-swingx/README.md @@ -38,7 +38,3 @@ build script: Otherwise download `flatlaf-swingx-.jar` here: [![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf-swingx/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf-swingx/_latestVersion) - -You also need `flatlaf-.jar`, which you can download here: - -[![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf/_latestVersion) From ffb7a6dfbb5c364e867964b80e37b9c023f90a43 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Dec 2020 14:45:08 +0100 Subject: [PATCH 066/178] README.md: - added demo download section - added link to javadoc of extras components --- flatlaf-demo/README.md | 9 +++++++++ flatlaf-extras/README.md | 3 +++ 2 files changed, 12 insertions(+) diff --git a/flatlaf-demo/README.md b/flatlaf-demo/README.md index 06b7b345..169d90eb 100644 --- a/flatlaf-demo/README.md +++ b/flatlaf-demo/README.md @@ -2,3 +2,12 @@ FlatLaf Demo ============ This sub-project contains the FlatLaf Demo source code. + + +Download +-------- + +[![Download Demo](https://download.formdev.com/flatlaf/images/download-demo.svg)](https://download.formdev.com/flatlaf/flatlaf-demo-latest.jar) + +Run demo with `java -jar flatlaf-demo-.jar` (or double-click it). +Requires Java 8 or newer. diff --git a/flatlaf-extras/README.md b/flatlaf-extras/README.md index 3e098b7e..620f7a86 100644 --- a/flatlaf-extras/README.md +++ b/flatlaf-extras/README.md @@ -10,6 +10,9 @@ This sub-project provides some additional components and classes: - [FlatTriStateCheckBox](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.html): A tri-state check box.\ ![TriStateCheckBox.png](../images/extras-TriStateCheckBox.png) +- Extension classes of standard Swing components that provide easy access to + FlatLaf specific client properties (see package + [com.formdev.flatlaf.extras.components](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/components/package-summary.html)). - [FlatAnimatedLafChange](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/FlatAnimatedLafChange.html): Animated Laf (theme) changing. - [FlatInspector](#ui-inspector): A simple UI inspector that shows information From 8bb8883e22099924a1450c0da6e8d41772428a49 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Dec 2020 18:54:42 +0100 Subject: [PATCH 067/178] IntelliJ Themes: added flag whether a theme is dark to `FlatAllIJThemes.INFOS`. (issue #221) --- CHANGELOG.md | 2 + .../IJThemesClassGenerator.java | 24 ++- .../intellijthemes/FlatAllIJThemes.java | 137 ++++++++++-------- 3 files changed, 100 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a766914f..5c237ef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ FlatLaf Change Log `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`. - Extras: Renamed SVG utility class from `com.formdev.flatlaf.extras.SVGUtils` to `com.formdev.flatlaf.extras.FlatSVGUtils`. +- IntelliJ Themes: Added flag whether a theme is dark to + `FlatAllIJThemes.INFOS`. (issue #221) #### Fixed bugs diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java index 84181186..403a498f 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java @@ -108,7 +108,8 @@ public class IJThemesClassGenerator allInfos.append( THEME_TEMPLATE .replace( "${subPackage}", subPackage ) .replace( "${themeClass}", themeClass ) - .replace( "${themeName}", themeName ) ); + .replace( "${themeName}", themeName ) + .replace( "${dark}", Boolean.toString( ti.dark ) ) ); markdownTable.append( String.format( "[%s](%s) | `com.formdev.flatlaf.intellijthemes%s.%s`\n", themeName, ti.sourceCodeUrl, subPackage, themeClass ) ); @@ -189,11 +190,28 @@ public class IJThemesClassGenerator " */\n" + "public class FlatAllIJThemes\n" + "{\n" + - " public static final LookAndFeelInfo[] INFOS = {\n" + + " public static final FlatIJLookAndFeelInfo[] INFOS = {\n" + "${allInfos}\n" + " };\n" + + "\n" + + " //---- class FlatIJLookAndFeelInfo ----------------------------------------\n" + + "\n" + + " public static class FlatIJLookAndFeelInfo\n" + + " extends LookAndFeelInfo\n" + + " {\n" + + " private final boolean dark;\n" + + "\n" + + " public FlatIJLookAndFeelInfo( String name, String className, boolean dark ) {\n" + + " super( name, className );\n" + + " this.dark = dark;\n" + + " }\n" + + "\n" + + " public boolean isDark() {\n" + + " return dark;\n" + + " }\n" + + " }\n" + "}\n"; private static final String THEME_TEMPLATE = - " new LookAndFeelInfo( \"${themeName}\", \"com.formdev.flatlaf.intellijthemes${subPackage}.${themeClass}\" ),"; + " new FlatIJLookAndFeelInfo( \"${themeName}\", \"com.formdev.flatlaf.intellijthemes${subPackage}.${themeClass}\", ${dark} ),"; } diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java index 518976ca..4dad3a7d 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java @@ -28,65 +28,82 @@ import javax.swing.UIManager.LookAndFeelInfo; */ public class FlatAllIJThemes { - public static final LookAndFeelInfo[] INFOS = { - new LookAndFeelInfo( "Arc", "com.formdev.flatlaf.intellijthemes.FlatArcIJTheme" ), - new LookAndFeelInfo( "Arc - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme" ), - new LookAndFeelInfo( "Arc Dark", "com.formdev.flatlaf.intellijthemes.FlatArcDarkIJTheme" ), - new LookAndFeelInfo( "Arc Dark - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcDarkOrangeIJTheme" ), - new LookAndFeelInfo( "Carbon", "com.formdev.flatlaf.intellijthemes.FlatCarbonIJTheme" ), - new LookAndFeelInfo( "Cobalt 2", "com.formdev.flatlaf.intellijthemes.FlatCobalt2IJTheme" ), - new LookAndFeelInfo( "Cyan light", "com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme" ), - new LookAndFeelInfo( "Dark Flat", "com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme" ), - new LookAndFeelInfo( "Dark purple", "com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme" ), - new LookAndFeelInfo( "Dracula", "com.formdev.flatlaf.intellijthemes.FlatDraculaIJTheme" ), - new LookAndFeelInfo( "Gradianto Dark Fuchsia", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme" ), - new LookAndFeelInfo( "Gradianto Deep Ocean", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme" ), - new LookAndFeelInfo( "Gradianto Midnight Blue", "com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme" ), - new LookAndFeelInfo( "Gradianto Nature Green", "com.formdev.flatlaf.intellijthemes.FlatGradiantoNatureGreenIJTheme" ), - new LookAndFeelInfo( "Gray", "com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme" ), - new LookAndFeelInfo( "Gruvbox Dark Hard", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme" ), - new LookAndFeelInfo( "Gruvbox Dark Medium", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme" ), - new LookAndFeelInfo( "Gruvbox Dark Soft", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkSoftIJTheme" ), - new LookAndFeelInfo( "Hiberbee Dark", "com.formdev.flatlaf.intellijthemes.FlatHiberbeeDarkIJTheme" ), - new LookAndFeelInfo( "High contrast", "com.formdev.flatlaf.intellijthemes.FlatHighContrastIJTheme" ), - new LookAndFeelInfo( "Light Flat", "com.formdev.flatlaf.intellijthemes.FlatLightFlatIJTheme" ), - new LookAndFeelInfo( "Material Design Dark", "com.formdev.flatlaf.intellijthemes.FlatMaterialDesignDarkIJTheme" ), - new LookAndFeelInfo( "Monocai", "com.formdev.flatlaf.intellijthemes.FlatMonocaiIJTheme" ), - new LookAndFeelInfo( "Nord", "com.formdev.flatlaf.intellijthemes.FlatNordIJTheme" ), - new LookAndFeelInfo( "One Dark", "com.formdev.flatlaf.intellijthemes.FlatOneDarkIJTheme" ), - new LookAndFeelInfo( "Solarized Dark", "com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme" ), - new LookAndFeelInfo( "Solarized Light", "com.formdev.flatlaf.intellijthemes.FlatSolarizedLightIJTheme" ), - new LookAndFeelInfo( "Spacegray", "com.formdev.flatlaf.intellijthemes.FlatSpacegrayIJTheme" ), - new LookAndFeelInfo( "Vuesion", "com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme" ), - new LookAndFeelInfo( "Arc Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkIJTheme" ), - new LookAndFeelInfo( "Arc Dark Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkContrastIJTheme" ), - new LookAndFeelInfo( "Atom One Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkIJTheme" ), - new LookAndFeelInfo( "Atom One Dark Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkContrastIJTheme" ), - new LookAndFeelInfo( "Atom One Light (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightIJTheme" ), - new LookAndFeelInfo( "Atom One Light Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightContrastIJTheme" ), - new LookAndFeelInfo( "Dracula (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaIJTheme" ), - new LookAndFeelInfo( "Dracula Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaContrastIJTheme" ), - new LookAndFeelInfo( "GitHub (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubIJTheme" ), - new LookAndFeelInfo( "GitHub Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubContrastIJTheme" ), - new LookAndFeelInfo( "Light Owl (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlIJTheme" ), - new LookAndFeelInfo( "Light Owl Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlContrastIJTheme" ), - new LookAndFeelInfo( "Material Darker (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerIJTheme" ), - new LookAndFeelInfo( "Material Darker Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerContrastIJTheme" ), - new LookAndFeelInfo( "Material Deep Ocean (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanIJTheme" ), - new LookAndFeelInfo( "Material Deep Ocean Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanContrastIJTheme" ), - new LookAndFeelInfo( "Material Lighter (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterIJTheme" ), - new LookAndFeelInfo( "Material Lighter Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterContrastIJTheme" ), - new LookAndFeelInfo( "Material Oceanic (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicIJTheme" ), - new LookAndFeelInfo( "Material Oceanic Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicContrastIJTheme" ), - new LookAndFeelInfo( "Material Palenight (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightIJTheme" ), - new LookAndFeelInfo( "Material Palenight Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightContrastIJTheme" ), - new LookAndFeelInfo( "Monokai Pro (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProIJTheme" ), - new LookAndFeelInfo( "Monokai Pro Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProContrastIJTheme" ), - new LookAndFeelInfo( "Night Owl (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlIJTheme" ), - new LookAndFeelInfo( "Night Owl Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlContrastIJTheme" ), - new LookAndFeelInfo( "Solarized Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkIJTheme" ), - new LookAndFeelInfo( "Solarized Dark Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkContrastIJTheme" ), - new LookAndFeelInfo( "Solarized Light (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightIJTheme" ), - new LookAndFeelInfo( "Solarized Light Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightContrastIJTheme" ), + public static final FlatIJLookAndFeelInfo[] INFOS = { + new FlatIJLookAndFeelInfo( "Arc", "com.formdev.flatlaf.intellijthemes.FlatArcIJTheme", false ), + new FlatIJLookAndFeelInfo( "Arc - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme", false ), + new FlatIJLookAndFeelInfo( "Arc Dark", "com.formdev.flatlaf.intellijthemes.FlatArcDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Arc Dark - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcDarkOrangeIJTheme", true ), + new FlatIJLookAndFeelInfo( "Carbon", "com.formdev.flatlaf.intellijthemes.FlatCarbonIJTheme", true ), + new FlatIJLookAndFeelInfo( "Cobalt 2", "com.formdev.flatlaf.intellijthemes.FlatCobalt2IJTheme", true ), + new FlatIJLookAndFeelInfo( "Cyan light", "com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme", false ), + new FlatIJLookAndFeelInfo( "Dark Flat", "com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme", true ), + new FlatIJLookAndFeelInfo( "Dark purple", "com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme", true ), + new FlatIJLookAndFeelInfo( "Dracula", "com.formdev.flatlaf.intellijthemes.FlatDraculaIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gradianto Dark Fuchsia", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gradianto Deep Ocean", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gradianto Midnight Blue", "com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gradianto Nature Green", "com.formdev.flatlaf.intellijthemes.FlatGradiantoNatureGreenIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gray", "com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme", false ), + new FlatIJLookAndFeelInfo( "Gruvbox Dark Hard", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gruvbox Dark Medium", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme", true ), + new FlatIJLookAndFeelInfo( "Gruvbox Dark Soft", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkSoftIJTheme", true ), + new FlatIJLookAndFeelInfo( "Hiberbee Dark", "com.formdev.flatlaf.intellijthemes.FlatHiberbeeDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "High contrast", "com.formdev.flatlaf.intellijthemes.FlatHighContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Light Flat", "com.formdev.flatlaf.intellijthemes.FlatLightFlatIJTheme", false ), + new FlatIJLookAndFeelInfo( "Material Design Dark", "com.formdev.flatlaf.intellijthemes.FlatMaterialDesignDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Monocai", "com.formdev.flatlaf.intellijthemes.FlatMonocaiIJTheme", true ), + new FlatIJLookAndFeelInfo( "Nord", "com.formdev.flatlaf.intellijthemes.FlatNordIJTheme", true ), + new FlatIJLookAndFeelInfo( "One Dark", "com.formdev.flatlaf.intellijthemes.FlatOneDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Solarized Dark", "com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Solarized Light", "com.formdev.flatlaf.intellijthemes.FlatSolarizedLightIJTheme", false ), + new FlatIJLookAndFeelInfo( "Spacegray", "com.formdev.flatlaf.intellijthemes.FlatSpacegrayIJTheme", true ), + new FlatIJLookAndFeelInfo( "Vuesion", "com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme", true ), + new FlatIJLookAndFeelInfo( "Arc Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Arc Dark Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Atom One Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Atom One Dark Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Atom One Light (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightIJTheme", false ), + new FlatIJLookAndFeelInfo( "Atom One Light Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightContrastIJTheme", false ), + new FlatIJLookAndFeelInfo( "Dracula (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaIJTheme", true ), + new FlatIJLookAndFeelInfo( "Dracula Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "GitHub (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubIJTheme", false ), + new FlatIJLookAndFeelInfo( "GitHub Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubContrastIJTheme", false ), + new FlatIJLookAndFeelInfo( "Light Owl (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlIJTheme", false ), + new FlatIJLookAndFeelInfo( "Light Owl Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlContrastIJTheme", false ), + new FlatIJLookAndFeelInfo( "Material Darker (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Darker Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Deep Ocean (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Deep Ocean Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Lighter (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterIJTheme", false ), + new FlatIJLookAndFeelInfo( "Material Lighter Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterContrastIJTheme", false ), + new FlatIJLookAndFeelInfo( "Material Oceanic (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Oceanic Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Palenight (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightIJTheme", true ), + new FlatIJLookAndFeelInfo( "Material Palenight Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Monokai Pro (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProIJTheme", true ), + new FlatIJLookAndFeelInfo( "Monokai Pro Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Night Owl (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlIJTheme", true ), + new FlatIJLookAndFeelInfo( "Night Owl Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Solarized Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkIJTheme", true ), + new FlatIJLookAndFeelInfo( "Solarized Dark Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Solarized Light (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightIJTheme", false ), + new FlatIJLookAndFeelInfo( "Solarized Light Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightContrastIJTheme", false ), }; + + //---- class FlatIJLookAndFeelInfo ---------------------------------------- + + public static class FlatIJLookAndFeelInfo + extends LookAndFeelInfo + { + private final boolean dark; + + public FlatIJLookAndFeelInfo( String name, String className, boolean dark ) { + super( name, className ); + this.dark = dark; + } + + public boolean isDark() { + return dark; + } + } } From 5155ec93c9882a5db5be3b8f02ef3f070f053415 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 15 Dec 2020 11:19:30 +0100 Subject: [PATCH 068/178] ToolTip: fixed drop shadow for wide tooltips (issue #224; regression since fixed issue #142) --- CHANGELOG.md | 2 ++ .../com/formdev/flatlaf/ui/FlatPopupFactory.java | 13 +++++++------ .../formdev/flatlaf/testing/FlatComponentsTest.java | 1 + .../formdev/flatlaf/testing/FlatComponentsTest.jfd | 1 + 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c237ef8..1fc81f52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ FlatLaf Change Log as row header in scroll pane. (issues #152 and #46) - TableHeader: Fixed position of column separators in right-to-left component orientation. +- ToolTip: Fixed drop shadow for wide tooltips on Windows and Java 9+. (issue + #224) - SwingX: Fixed striping background highlighting color (e.g. alternating table rows) in dark themes. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java index b04a744c..45199226 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java @@ -271,16 +271,17 @@ public class FlatPopupFactory // increase tooltip size if necessary because it may be too small on HiDPI screens // https://bugs.openjdk.java.net/browse/JDK-8213535 - if( contents instanceof JToolTip ) { + if( contents instanceof JToolTip && popupWindow == null ) { Container parent = contents.getParent(); if( parent instanceof JPanel ) { Dimension prefSize = parent.getPreferredSize(); if( !prefSize.equals( parent.getSize() ) ) { - Container panel = SwingUtilities.getAncestorOfClass( Panel.class, parent ); - if( panel != null ) - panel.setSize( prefSize ); // for medium weight popup - else - parent.setSize( prefSize ); // for light weight popup + Container mediumWeightPanel = SwingUtilities.getAncestorOfClass( Panel.class, parent ); + Container c = (mediumWeightPanel != null) + ? mediumWeightPanel // medium weight popup + : parent; // light weight popup + c.setSize( prefSize ); + c.validate(); } } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index e696fa17..5cee1105 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -487,6 +487,7 @@ public class FlatComponentsTest //---- toggleButton1 ---- toggleButton1.setText("Enabled"); + toggleButton1.setToolTipText("LOOOOOOOOOOOOOONG TEXT"); add(toggleButton1, "cell 1 2"); //---- toggleButton9 ---- diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index 1e87e0b5..a7981e66 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -159,6 +159,7 @@ new FormModel { add( new FormComponent( "javax.swing.JToggleButton" ) { name: "toggleButton1" "text": "Enabled" + "toolTipText": "LOOOOOOOOOOOOOONG TEXT" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 2" } ) From 460f0d9dee137643ed0d13978057c0eaea84159b Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 15 Dec 2020 11:25:00 +0100 Subject: [PATCH 069/178] UIScale: fixed NPE in getSystemScaleFactor(Graphics2D) when using Batik SVGGraphics2D (issue #226) --- .../src/main/java/com/formdev/flatlaf/util/UIScale.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java index 686e400c..77ee291d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java @@ -113,7 +113,7 @@ public class UIScale } public static double getSystemScaleFactor( Graphics2D g ) { - return isSystemScalingEnabled() ? g.getDeviceConfiguration().getDefaultTransform().getScaleX() : 1; + return isSystemScalingEnabled() ? getSystemScaleFactor( g.getDeviceConfiguration() ) : 1; } public static double getSystemScaleFactor( GraphicsConfiguration gc ) { From 956001dbd70106e4dafbb20e3fce11372add7273 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 18 Dec 2020 12:17:43 +0100 Subject: [PATCH 070/178] avoid painting text with our rendering hints enabled to avoid antialiased text in some components if text antialiasing is disabled in system (issue #227) --- CHANGELOG.md | 4 ++ .../formdev/flatlaf/ui/FlatComboBoxUI.java | 5 +- .../formdev/flatlaf/ui/FlatProgressBarUI.java | 16 +++--- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 14 ++++- .../formdev/flatlaf/ui/FlatTabbedPaneUI.java | 45 +++++++++------- .../com/formdev/flatlaf/ui/FlatToolTipUI.java | 1 - .../com/formdev/flatlaf/ui/FlatUIUtils.java | 53 +++++++++++++++++-- .../jideoss/ui/FlatJideTabbedPaneUI.java | 17 +++++- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 14 ++++- .../flatlaf/swingx/ui/FlatHyperlinkUI.java | 11 ++-- .../formdev/flatlaf/testing/FlatHtmlTest.java | 47 ++++++++++++++++ .../formdev/flatlaf/testing/FlatHtmlTest.jfd | 52 ++++++++++++++++-- .../flatlaf/testing/FlatTestFrame.java | 3 ++ 13 files changed, 237 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc81f52..e5865eb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ FlatLaf Change Log #224) - SwingX: Fixed striping background highlighting color (e.g. alternating table rows) in dark themes. +- Fixed: If text antialiasing is disabled (in OS system settings or via + `-Dawt.useSystemAAFontSettings=off`), then some components still did use + antialiasing to render text (not-editable ComboBox, ProgressBar, Slider, + TabbedPane and multiline ToolTip). (issue #227) ## 0.45 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java index 52905f8d..82bc86bb 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java @@ -352,7 +352,7 @@ public class FlatComboBoxUI FlatUIUtils.paintParentBackground( g, c ); Graphics2D g2 = (Graphics2D) g; - FlatUIUtils.setRenderingHints( g2 ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g2 ); int width = c.getWidth(); int height = c.getHeight(); @@ -386,6 +386,9 @@ public class FlatComboBoxUI g2.fill( new Rectangle2D.Float( lx, focusWidth, lw, height - 1 - (focusWidth * 2)) ); } + // avoid that the "current value" renderer is invoked with enabled antialiasing + FlatUIUtils.resetRenderingHints( g2, oldRenderingHints ); + paint( g, c ); } diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatProgressBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatProgressBarUI.java index 4ac1efbd..dddc87b7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatProgressBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatProgressBarUI.java @@ -155,7 +155,7 @@ public class FlatProgressBarUI ? 0 : Math.min( UIScale.scale( this.arc ), horizontal ? height : width ); - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); // paint track RoundRectangle2D.Float trackShape = new RoundRectangle2D.Float( x, y, width, height, arc, arc ); @@ -163,6 +163,7 @@ public class FlatProgressBarUI ((Graphics2D)g).fill( trackShape ); // paint progress + int amountFull = 0; if( progressBar.isIndeterminate() ) { boxRect = getBox( boxRect ); if( boxRect != null ) { @@ -170,11 +171,8 @@ public class FlatProgressBarUI ((Graphics2D)g).fill( new RoundRectangle2D.Float( boxRect.x, boxRect.y, boxRect.width, boxRect.height, arc, arc ) ); } - - if( progressBar.isStringPainted() ) - paintString( g, x, y, width, height, 0, insets ); } else { - int amountFull = getAmountFull( insets, width, height ); + amountFull = getAmountFull( insets, width, height ); RoundRectangle2D.Float progressShape = horizontal ? new RoundRectangle2D.Float( c.getComponentOrientation().isLeftToRight() ? x : x + (width - amountFull), @@ -189,10 +187,12 @@ public class FlatProgressBarUI ((Graphics2D)g).fill( area ); } else ((Graphics2D)g).fill( progressShape ); - - if( progressBar.isStringPainted() ) - paintString( g, x, y, width, height, amountFull, insets ); } + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); + + if( progressBar.isStringPainted() ) + paintString( g, x, y, width, height, amountFull, insets ); } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index d286aa70..4779ac40 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -94,6 +94,8 @@ public class FlatSliderUI protected boolean thumbHover; protected boolean thumbPressed; + private Object[] oldRenderingHints; + public static ComponentUI createUI( JComponent c ) { return new FlatSliderUI(); } @@ -211,7 +213,7 @@ public class FlatSliderUI @Override public void paint( Graphics g, JComponent c ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + oldRenderingHints = FlatUIUtils.setRenderingHints( g ); /*debug g.setColor( Color.gray ); @@ -227,6 +229,16 @@ public class FlatSliderUI debug*/ super.paint( g, c ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); + oldRenderingHints = null; + } + + @Override + public void paintLabels( Graphics g ) { + FlatUIUtils.runWithoutRenderingHints( g, oldRenderingHints, () -> { + super.paintLabels( g ); + } ); } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java index 05a8df66..cf4bcc69 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java @@ -226,6 +226,8 @@ public class FlatTabbedPaneUI private boolean rolloverTabClose; private boolean pressedTabClose; + private Object[] oldRenderingHints; + public static ComponentUI createUI( JComponent c ) { return new FlatTabbedPaneUI(); } @@ -791,9 +793,12 @@ public class FlatTabbedPaneUI @Override public void update( Graphics g, JComponent c ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + oldRenderingHints = FlatUIUtils.setRenderingHints( g ); super.update( g, c ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); + oldRenderingHints = null; } @Override @@ -874,27 +879,29 @@ public class FlatTabbedPaneUI { g.setFont( font ); - // html - View view = getTextViewForTab( tabIndex ); - if( view != null ) { - view.paint( g, textRect ); - return; - } + FlatUIUtils.runWithoutRenderingHints( g, oldRenderingHints, () -> { + // html + View view = getTextViewForTab( tabIndex ); + if( view != null ) { + view.paint( g, textRect ); + return; + } - // plain text - Color color; - if( tabPane.isEnabled() && tabPane.isEnabledAt( tabIndex ) ) { - color = tabPane.getForegroundAt( tabIndex ); - if( isSelected && (color instanceof UIResource) && selectedForeground != null ) - color = selectedForeground; - } else - color = disabledForeground; + // plain text + Color color; + if( tabPane.isEnabled() && tabPane.isEnabledAt( tabIndex ) ) { + color = tabPane.getForegroundAt( tabIndex ); + if( isSelected && (color instanceof UIResource) && selectedForeground != null ) + color = selectedForeground; + } else + color = disabledForeground; - int mnemIndex = FlatLaf.isShowMnemonics() ? tabPane.getDisplayedMnemonicIndexAt( tabIndex ) : -1; + int mnemIndex = FlatLaf.isShowMnemonics() ? tabPane.getDisplayedMnemonicIndexAt( tabIndex ) : -1; - g.setColor( color ); - FlatUIUtils.drawStringUnderlineCharAt( tabPane, g, title, mnemIndex, - textRect.x, textRect.y + metrics.getAscent() ); + g.setColor( color ); + FlatUIUtils.drawStringUnderlineCharAt( tabPane, g, title, mnemIndex, + textRect.x, textRect.y + metrics.getAscent() ); + } ); } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java index e900b966..a4be7a4d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java @@ -116,7 +116,6 @@ public class FlatToolTipUI FontMetrics fm = c.getFontMetrics( c.getFont() ); Insets insets = c.getInsets(); - FlatUIUtils.setRenderingHints( (Graphics2D) g ); g.setColor( c.getForeground() ); List lines = StringUtils.split( ((JToolTip)c).getTipText(), '\n' ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index b85d7e93..e2bc2484 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -240,10 +240,57 @@ public class FlatUIUtils /** * Sets rendering hints used for painting. */ - public static void setRenderingHints( Graphics2D g ) { - g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON ); - g.setRenderingHint( RenderingHints.KEY_STROKE_CONTROL, + public static Object[] setRenderingHints( Graphics g ) { + Graphics2D g2 = (Graphics2D) g; + Object[] oldRenderingHints = new Object[] { + g2.getRenderingHint( RenderingHints.KEY_ANTIALIASING ), + g2.getRenderingHint( RenderingHints.KEY_STROKE_CONTROL ), + }; + + g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON ); + g2.setRenderingHint( RenderingHints.KEY_STROKE_CONTROL, MAC_USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE ); + + return oldRenderingHints; + } + + /** + * Resets rendering hints previously set with {@link #setRenderingHints(Graphics2D)}. + */ + public static void resetRenderingHints( Graphics g, Object[] oldRenderingHints ) { + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, oldRenderingHints[0] ); + g2.setRenderingHint( RenderingHints.KEY_STROKE_CONTROL, oldRenderingHints[1] ); + } + + /** + * Temporary resets rendering hints set with {@link #setRenderingHints(Graphics2D)} + * and runs the given runnable. + *

+ * This is intended for painting text while rendering hints are set. + *

+ * If text antialiasing is disabled (in OS system settings or via + * {@code -Dawt.useSystemAAFontSettings=off}), but general antialiasing is enabled, + * then text is still painted using some kind of "grayscale" antialiasing, + * which may make the text look bold (depends on font and font size). + * To avoid this, temporary disable general antialiasing. + * This does not affect text rendering if text antialiasing is enabled (usually the default). + */ + public static void runWithoutRenderingHints( Graphics g, Object[] oldRenderingHints, Runnable runnable ) { + if( oldRenderingHints == null ) { + runnable.run(); + return; + } + + Graphics2D g2 = (Graphics2D) g; + Object[] oldRenderingHints2 = new Object[] { + g2.getRenderingHint( RenderingHints.KEY_ANTIALIASING ), + g2.getRenderingHint( RenderingHints.KEY_STROKE_CONTROL ), + }; + + resetRenderingHints( g2, oldRenderingHints ); + runnable.run(); + resetRenderingHints( g2, oldRenderingHints2 ); } public static Color deriveColor( Color color, Color baseColor ) { diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java index 7d1baea2..86494336 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java @@ -21,6 +21,7 @@ import static com.formdev.flatlaf.FlatClientProperties.clientPropertyBoolean; import static com.formdev.flatlaf.util.UIScale.scale; import java.awt.Color; import java.awt.Dimension; +import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; @@ -62,6 +63,8 @@ public class FlatJideTabbedPaneUI protected boolean hasFullBorder; protected boolean tabsOverlapBorder; + private Object[] oldRenderingHints; + public static ComponentUI createUI( JComponent c ) { return new FlatJideTabbedPaneUI(); } @@ -193,9 +196,12 @@ public class FlatJideTabbedPaneUI @Override public void update( Graphics g, JComponent c ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + oldRenderingHints = FlatUIUtils.setRenderingHints( g ); super.update( g, c ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); + oldRenderingHints = null; } @Override @@ -222,6 +228,15 @@ public class FlatJideTabbedPaneUI g.fillRect( x, y, w, h ); } + @Override + protected void paintText( Graphics g, int tabPlacement, Font font, FontMetrics metrics, + int tabIndex, String title, Rectangle textRect, boolean isSelected ) + { + FlatUIUtils.runWithoutRenderingHints( g, oldRenderingHints, () -> { + super.paintText( g, tabPlacement, font, metrics, tabIndex, title, textRect, isSelected ); + } ); + } + @Override protected void paintTabBorder( Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected ) diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index aa51b1fe..da9de82c 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -60,6 +60,8 @@ public class FlatRangeSliderUI protected Color disabledThumbColor; protected Color disabledThumbBorderColor; + private Object[] oldRenderingHints; + public static ComponentUI createUI( JComponent c ) { return new FlatRangeSliderUI(); } @@ -190,7 +192,7 @@ public class FlatRangeSliderUI @Override public void paint( Graphics g, JComponent c ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + oldRenderingHints = FlatUIUtils.setRenderingHints( g ); /*debug g.setColor( Color.gray ); @@ -209,6 +211,16 @@ public class FlatRangeSliderUI debug*/ super.paint( g, c ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); + oldRenderingHints = null; + } + + @Override + public void paintLabels( Graphics g ) { + FlatUIUtils.runWithoutRenderingHints( g, oldRenderingHints, () -> { + super.paintLabels( g ); + } ); } @Override diff --git a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatHyperlinkUI.java b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatHyperlinkUI.java index ccd4557f..c80f2860 100644 --- a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatHyperlinkUI.java +++ b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatHyperlinkUI.java @@ -60,13 +60,6 @@ public class FlatHyperlinkUI disabledText = null; } - @Override - public void paint( Graphics g, JComponent c ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); - - super.paint( g, c ); - } - @Override protected void paintText( Graphics g, AbstractButton b, Rectangle textRect, String text ) { FlatButtonUI.paintText( g, b, textRect, text, b.isEnabled() ? b.getForeground() : disabledText ); @@ -78,8 +71,12 @@ public class FlatHyperlinkUI private void paintUnderline( Graphics g, Rectangle rect ) { int descent = g.getFontMetrics().getDescent(); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); + ((Graphics2D)g).fill( new Rectangle2D.Float( rect.x, (rect.y + rect.height) - descent + UIScale.scale( 1f ), rect.width, UIScale.scale( 1f ) ) ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java index 72fd3b19..265eca32 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java @@ -21,6 +21,7 @@ import javax.swing.*; import com.formdev.flatlaf.util.StringUtils; import com.formdev.flatlaf.util.UIScale; import net.miginfocom.swing.*; +import org.jdesktop.swingx.*; /** * @author Karl Tauber @@ -89,6 +90,12 @@ public class FlatHtmlTest label14 = new JLabel(); label15 = new JLabel(); label16 = new JLabel(); + label17 = new JLabel(); + comboBox1 = new JComboBox<>(); + comboBox2 = new JComboBox<>(); + label18 = new JLabel(); + xHyperlink1 = new JXHyperlink(); + xHyperlink2 = new JXHyperlink(); label1 = new JLabel(); scrollPane15 = new JScrollPane(); editorPane1 = new JEditorPane(); @@ -150,6 +157,8 @@ public class FlatHtmlTest "[]" + "[]" + "[]" + + "[]" + + "[]" + "[]")); //---- label5 ---- @@ -283,6 +292,38 @@ public class FlatHtmlTest label16.setText("(move mouse here)"); label16.setToolTipText("Some text"); panel1.add(label16, "cell 2 9"); + + //---- label17 ---- + label17.setText("JComboBox:"); + panel1.add(label17, "cell 0 10"); + + //---- comboBox1 ---- + comboBox1.setModel(new DefaultComboBoxModel<>(new String[] { + "Some Bold Text", + "abc", + "def" + })); + panel1.add(comboBox1, "cell 1 10"); + + //---- comboBox2 ---- + comboBox2.setModel(new DefaultComboBoxModel<>(new String[] { + "Some Text", + "abc", + "def" + })); + panel1.add(comboBox2, "cell 2 10"); + + //---- label18 ---- + label18.setText("JXHyperlink:"); + panel1.add(label18, "cell 0 11"); + + //---- xHyperlink1 ---- + xHyperlink1.setText("Some Bold Text"); + panel1.add(xHyperlink1, "cell 1 11"); + + //---- xHyperlink2 ---- + xHyperlink2.setText("Some text"); + panel1.add(xHyperlink2, "cell 2 11"); } add(panel1, "cell 4 0 1 3,aligny top,growy 0"); @@ -400,6 +441,12 @@ public class FlatHtmlTest private JLabel label14; private JLabel label15; private JLabel label16; + private JLabel label17; + private JComboBox comboBox1; + private JComboBox comboBox2; + private JLabel label18; + private JXHyperlink xHyperlink1; + private JXHyperlink xHyperlink2; private JLabel label1; private JScrollPane scrollPane15; private JEditorPane editorPane1; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd index 785f930a..38574374 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -36,7 +36,7 @@ new FormModel { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 0,hidemode 3" "$columnConstraints": "[fill][fill][fill]" - "$rowConstraints": "[][][][][][][][][][]" + "$rowConstraints": "[][][][][][][][][][][][]" } ) { name: "panel1" add( new FormComponent( "javax.swing.JLabel" ) { @@ -227,6 +227,52 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 9" } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label17" + "text": "JComboBox:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 10" + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "comboBox1" + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "Some Bold Text" + addElement( "Some Bold Text" ) + addElement( "abc" ) + addElement( "def" ) + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 10" + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "comboBox2" + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "Some Text" + addElement( "Some Text" ) + addElement( "abc" ) + addElement( "def" ) + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 10" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label18" + "text": "JXHyperlink:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 11" + } ) + add( new FormComponent( "org.jdesktop.swingx.JXHyperlink" ) { + name: "xHyperlink1" + "text": "Some Bold Text" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 11" + } ) + add( new FormComponent( "org.jdesktop.swingx.JXHyperlink" ) { + name: "xHyperlink2" + "text": "Some text" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 11" + } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 0 1 3,aligny top,growy 0" } ) @@ -296,7 +342,7 @@ new FormModel { } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 695, 755 ) + "size": new java.awt.Dimension( 820, 755 ) } ) } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index 727c31c3..1d197994 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -68,6 +68,9 @@ public class FlatTestFrame public boolean applyComponentOrientationToFrame; public static FlatTestFrame create( String[] args, String title ) { + // disable text antialiasing +// System.setProperty( "awt.useSystemAAFontSettings", "off" ); + DemoPrefs.init( PREFS_ROOT_PATH ); // set scale factor From 435068515a2b5981a564b9b9f5652789b07ed2ed Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 18 Dec 2020 13:25:04 +0100 Subject: [PATCH 071/178] always reset our graphics rendering hints (this is usually not necessary because each component gets its own instance of Graphics when painting, but resetting may avoid side effects if our paint methods are invoked directly) --- .../java/com/formdev/flatlaf/ui/FlatArrowButton.java | 9 +++++---- .../java/com/formdev/flatlaf/ui/FlatScrollBarUI.java | 4 ++-- .../main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java | 4 +++- .../java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java | 5 +++-- .../com/formdev/flatlaf/ui/FlatToolBarSeparatorUI.java | 4 +++- .../java/com/formdev/flatlaf/extras/FlatInspector.java | 4 ++-- .../com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java | 4 +++- .../com/formdev/flatlaf/swingx/ui/FlatTaskPaneUI.java | 8 ++++++-- .../formdev/flatlaf/testing/FlatPaintingStringTest.java | 4 +++- .../com/formdev/flatlaf/testing/FlatPaintingTest.java | 4 +++- 10 files changed, 33 insertions(+), 17 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java index 4b0e44f2..e5319a6d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java @@ -166,8 +166,7 @@ public class FlatArrowButton @Override public void paint( Graphics g ) { - Graphics2D g2 = (Graphics2D)g; - FlatUIUtils.setRenderingHints( g2 ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); // paint hover or pressed background if( isEnabled() ) { @@ -179,7 +178,7 @@ public class FlatArrowButton if( background != null ) { g.setColor( deriveBackground( background ) ); - paintBackground( g2 ); + paintBackground( (Graphics2D) g ); } } @@ -191,7 +190,9 @@ public class FlatArrowButton ? hoverForeground : foreground)) : disabledForeground ) ); - paintArrow( g2 ); + paintArrow( (Graphics2D) g ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } protected void paintBackground( Graphics2D g ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java index 27760686..dfe86e99 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java @@ -19,7 +19,6 @@ package com.formdev.flatlaf.ui; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; -import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Rectangle; import java.awt.event.MouseAdapter; @@ -221,8 +220,9 @@ public class FlatScrollBarUI @Override public void paint( Graphics g, JComponent c ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); super.paint( g, c ); + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java index 6fd6a0dd..0e548bc5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java @@ -264,7 +264,7 @@ public class FlatSpinnerUI FlatUIUtils.paintParentBackground( g, c ); Graphics2D g2 = (Graphics2D) g; - FlatUIUtils.setRenderingHints( g2 ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g2 ); int width = c.getWidth(); int height = c.getHeight(); @@ -303,6 +303,8 @@ public class FlatSpinnerUI } paint( g, c ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } //---- class Handler ------------------------------------------------------ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java index c8e71c59..8103cda0 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java @@ -20,7 +20,6 @@ import java.awt.Color; import java.awt.Container; import java.awt.Cursor; import java.awt.Graphics; -import java.awt.Graphics2D; import java.awt.Insets; import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; @@ -148,10 +147,12 @@ public class FlatSplitPaneUI if( "plain".equals( style ) ) return; - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); g.setColor( gripColor ); paintGrip( g, 0, 0, getWidth(), getHeight() ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } protected void paintGrip( Graphics g, int x, int y, int width, int height ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarSeparatorUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarSeparatorUI.java index 8d0fa657..d30eb30c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarSeparatorUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarSeparatorUI.java @@ -106,13 +106,15 @@ public class FlatToolBarSeparatorUI float lineWidth = scale( 1f ); float offset = scale( 2f ); - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); g.setColor( separatorColor ); if( isVertical( c ) ) ((Graphics2D)g).fill( new Rectangle2D.Float( Math.round( (width - lineWidth) / 2f ), offset, lineWidth, height - (offset * 2) ) ); else ((Graphics2D)g).fill( new Rectangle2D.Float( offset, Math.round( (height - lineWidth) / 2f ), width - (offset * 2), lineWidth ) ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } private boolean isVertical( JComponent c ) { diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatInspector.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatInspector.java index 6e9f4225..35f03d46 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatInspector.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatInspector.java @@ -24,7 +24,6 @@ import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Font; import java.awt.Graphics; -import java.awt.Graphics2D; import java.awt.Insets; import java.awt.KeyboardFocusManager; import java.awt.LayoutManager; @@ -348,8 +347,9 @@ public class FlatInspector @Override protected void paintBorder( Graphics g ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); super.paintBorder( g ); + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } }; c.setBackground( new Color( 255, 0, 0, 32 ) ); diff --git a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java index 27ada24a..105f78f6 100644 --- a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java +++ b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java @@ -218,7 +218,7 @@ public class FlatDatePickerUI FlatUIUtils.paintParentBackground( g, c ); Graphics2D g2 = (Graphics2D) g; - FlatUIUtils.setRenderingHints( g2 ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g2 ); int width = c.getWidth(); int height = c.getHeight(); @@ -252,6 +252,8 @@ public class FlatDatePickerUI g2.fill( new Rectangle2D.Float( lx, focusWidth, lw, height - 1 - (focusWidth * 2) ) ); paint( g, c ); + + FlatUIUtils.resetRenderingHints( g2, oldRenderingHints ); } //---- class DefaultEditor ------------------------------------------------ diff --git a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatTaskPaneUI.java b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatTaskPaneUI.java index 5897438e..e71ac7ca 100644 --- a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatTaskPaneUI.java +++ b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatTaskPaneUI.java @@ -146,7 +146,7 @@ public class FlatTaskPaneUI if( color == null ) return; - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); g.setColor( color ); @@ -155,6 +155,8 @@ public class FlatTaskPaneUI path.append( new Rectangle2D.Float( x, y, width, height ), false ); path.append( new Rectangle2D.Float( x + lineWidth, y, width - (lineWidth * 2), height - lineWidth ), false ); ((Graphics2D)g).fill( path ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } @Override @@ -179,9 +181,11 @@ public class FlatTaskPaneUI { @Override public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) { - FlatUIUtils.setRenderingHints( (Graphics2D) g ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); super.paintBorder( c, g, x, y, width, height ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } @Override diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingStringTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingStringTest.java index 155a65c3..d7fa7c3e 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingStringTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingStringTest.java @@ -180,7 +180,7 @@ public class FlatPaintingStringTest @Override protected void paintComponent( Graphics g ) { Graphics2D g2 = (Graphics2D) g; - FlatUIUtils.setRenderingHints( g2 ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g2 ); // simulate component y position at a fraction if( scaleFactor > 1 && SystemInfo.isJava_9_orLater ) @@ -241,6 +241,8 @@ public class FlatPaintingStringTest double textY = t.getTranslateY() + (y * t.getScaleY()); setToolTipText( textY + " + " + yCorrection + " = " + (textY + yCorrection) ); } + + FlatUIUtils.resetRenderingHints( g2, oldRenderingHints ); } private int scale( int value ) { diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java index 9c2b934f..ae9642b2 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingTest.java @@ -471,7 +471,7 @@ public class FlatPaintingTest @Override protected void paintComponent( Graphics g ) { Graphics2D g2 = (Graphics2D) g; - FlatUIUtils.setRenderingHints( g2 ); + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g2 ); g2.scale( scale, scale ); g2.translate( 1, 1 ); @@ -503,6 +503,8 @@ public class FlatPaintingTest g2d.setColor( Color.magenta ); g2d.drawRect( x2 - gap, y2 - gap, width2 + (gap * 2) - 1, height2 + (gap * 2) - 1 ); } ); + + FlatUIUtils.resetRenderingHints( g2, oldRenderingHints ); } } } From a3cc5a19386c4fcb198678ec703dd5f3f00d4584 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 18 Dec 2020 14:34:40 +0100 Subject: [PATCH 072/178] README.md: added descriptions to projects using FlatLaf --- README.md | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7a1ca28f..ba6c741e 100644 --- a/README.md +++ b/README.md @@ -76,36 +76,50 @@ Addons Projects using FlatLaf ---------------------- -- [NetBeans](https://netbeans.apache.org/) 11.3 +- [Apache NetBeans](https://netbeans.apache.org/) 11.3 - IDE for Java, PHP, HTML + and much more - [jclasslib bytecode viewer](https://github.com/ingokegel/jclasslib) 5.5 - [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3 -- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases) -- ![New](images/new.svg) [jAlbum](https://jalbum.net/) 21 (commercial) +- ![New](images/new.svg) [OWASP ZAP](https://www.zaproxy.org/) 2.10 - the worlds + most widely used web app scanner +- ![New](images/new.svg) [jAlbum](https://jalbum.net/) 21 (commercial) - creates + photo album websites - [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial) -- [Total Validator](https://www.totalvalidator.com/) 15 (commercial) -- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org) +- [Total Validator](https://www.totalvalidator.com/) 15 (commercial) - checks + your website +- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org) - Kanzleisoftware - [MegaMek](https://github.com/MegaMek/megamek) v0.47.4 and - [MekHQ](https://github.com/MegaMek/mekhq) v0.47.5 + [MekHQ](https://github.com/MegaMek/mekhq) v0.47.5 - a turn-based sci-fi board + game - [GUIslice Builder](https://github.com/ImpulseAdventure/GUIslice-Builder) - 0.13.b024 -- [Rest Suite](https://github.com/supanadit/restsuite) -- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy) -- [SpringRemote](https://github.com/HaleyWang/SpringRemote) + 0.13.b024 - GUI builder for + [GUIslice](https://github.com/ImpulseAdventure/GUIslice), a lightweight GUI + framework for embedded displays +- [Rest Suite](https://github.com/supanadit/restsuite) - Rest API testing +- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy) - advanced + gamepad mapping software +- [SpringRemote](https://github.com/HaleyWang/SpringRemote) - remote Linux SSH + connections manager - [mendelson AS2](https://sourceforge.net/projects/mec-as2/), [AS4](https://sourceforge.net/projects/mendelson-as4/) and [OFTP2](https://sourceforge.net/projects/mendelson-oftp2/) (open-source) and [mendelson AS2](https://mendelson-e-c.com/as2/), [AS4](https://mendelson-e-c.com/as4/) and [OFTP2](https://mendelson-e-c.com/oftp2) (commercial) -- [MeteoInfo](https://github.com/meteoinfo/MeteoInfo) 2.2 -- [lsfusion platform](https://github.com/lsfusion/platform) +- [MeteoInfo](https://github.com/meteoinfo/MeteoInfo) 2.2 - GIS and scientific + computation environment for meteorological community +- [lsfusion platform](https://github.com/lsfusion/platform) - information + systems development platform - [Jes - Die Java-EÜR](https://www.jes-eur.de) - [Mapton](https://mapton.org/) 2.0 - ([source code](https://github.com/trixon/mapton)) based on NetBeans platform -- [Pseudo Assembler IDE](https://github.com/tomasz-herman/PseudoAssemblerIDE) -- [Sound Analysis](https://github.com/tomasz-herman/SoundAnalysis) -- [RemoteLight](https://github.com/Drumber/RemoteLight) - Multifunctional LED - Control Software + ([source code](https://github.com/trixon/mapton)) based on NetBeans platform - + some kind of map application +- [Pseudo Assembler IDE](https://github.com/tomasz-herman/PseudoAssemblerIDE) - + IDE for Pseudo-Assembler +- [Sound Analysis](https://github.com/tomasz-herman/SoundAnalysis) - analyze + sound files in time or frequency domain +- [RemoteLight](https://github.com/Drumber/RemoteLight) - multifunctional LED + control software - and more... From 2d0a6f1bec3321d375d29d865f209ee3772126c0 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 18 Dec 2020 14:39:57 +0100 Subject: [PATCH 073/178] README.md: new projects using FlatLaf: - JOSM - Novel-Grabber - Android Tool --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ba6c741e..b374578f 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,10 @@ Projects using FlatLaf - [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3 - ![New](images/new.svg) [OWASP ZAP](https://www.zaproxy.org/) 2.10 - the worlds most widely used web app scanner -- ![New](images/new.svg) [jAlbum](https://jalbum.net/) 21 (commercial) - creates - photo album websites +- ![New](images/new.svg) [JOSM](https://josm.openstreetmap.de/) - an extensible + editor for [OpenStreetMap](https://www.openstreetmap.org/) (requires FlatLaf + JOSM plugin) +- [jAlbum](https://jalbum.net/) 21 (commercial) - creates photo album websites - [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial) - [Total Validator](https://www.totalvalidator.com/) 15 (commercial) - checks your website @@ -120,6 +122,12 @@ Projects using FlatLaf sound files in time or frequency domain - [RemoteLight](https://github.com/Drumber/RemoteLight) - multifunctional LED control software +- ![New](images/new.svg) + [Novel-Grabber](https://github.com/Flameish/Novel-Grabber) - download novels + from any webnovel and lightnovel site +- ![New](images/new.svg) + [Android Tool](https://github.com/fast-geek/Android-Tool) - makes popular adb + and fastboot commands easier to use - and more... From d059d6b448a6d3b44f278ec2182d0c2a2382cd0a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 18 Dec 2020 16:05:56 +0100 Subject: [PATCH 074/178] README.md: new projects using FlatLaf: - jEnTunnel - JPass - Linotte - MEKA - Shutter Encoder - ThunderFocus - lectureStudio --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index b374578f..a30dfef8 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ Projects using FlatLaf gamepad mapping software - [SpringRemote](https://github.com/HaleyWang/SpringRemote) - remote Linux SSH connections manager +- ![New](images/new.svg) [jEnTunnel](https://github.com/ggrandes/jentunnel) - + manage SSH Tunnels made easy - [mendelson AS2](https://sourceforge.net/projects/mec-as2/), [AS4](https://sourceforge.net/projects/mendelson-as4/) and [OFTP2](https://sourceforge.net/projects/mendelson-oftp2/) (open-source) and @@ -112,19 +114,35 @@ Projects using FlatLaf computation environment for meteorological community - [lsfusion platform](https://github.com/lsfusion/platform) - information systems development platform +- ![New](images/new.svg) [JPass](https://github.com/gaborbata/jpass) - password + manager with strong encryption - [Jes - Die Java-EÜR](https://www.jes-eur.de) - [Mapton](https://mapton.org/) 2.0 ([source code](https://github.com/trixon/mapton)) based on NetBeans platform - some kind of map application - [Pseudo Assembler IDE](https://github.com/tomasz-herman/PseudoAssemblerIDE) - IDE for Pseudo-Assembler +- ![New](images/new.svg) [Linotte](https://github.com/cpc6128/LangageLinotte) + 3.1 - French programming language created to learn programming +- ![New](images/new.svg) [MEKA](https://github.com/Waikato/meka) 1.9.3 - + multi-label classifiers and evaluation procedures using the Weka machine + learning framework +- ![New](images/new.svg) [Shutter Encoder](https://www.shutterencoder.com/) 14.2 + ([source code](https://github.com/paulpacifico/shutter-encoder)) - + professional video converter and compression tool (screenshots show **old** + look) - [Sound Analysis](https://github.com/tomasz-herman/SoundAnalysis) - analyze sound files in time or frequency domain - [RemoteLight](https://github.com/Drumber/RemoteLight) - multifunctional LED control software +- ![New](images/new.svg) + [ThunderFocus](https://github.com/marcocipriani01/ThunderFocus) - + Arduino-based telescope focuser - ![New](images/new.svg) [Novel-Grabber](https://github.com/Flameish/Novel-Grabber) - download novels from any webnovel and lightnovel site +- ![New](images/new.svg) [lectureStudio](https://www.lecturestudio.org/) + 4.3.1060 - digitize your lectures with ease - ![New](images/new.svg) [Android Tool](https://github.com/fast-geek/Android-Tool) - makes popular adb and fastboot commands easier to use From ef065d31a07169998e4f5ca3e10068c0fba242f3 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 19 Dec 2020 13:34:53 +0100 Subject: [PATCH 075/178] JIDE: support `TristateCheckBox` --- CHANGELOG.md | 1 + flatlaf-jide-oss/README.md | 1 + .../jideoss/FlatJideOssDefaultsAddon.java | 13 ++++++++ .../testing/jideoss/FlatJideOssTest.java | 33 +++++++++++++++++++ .../testing/jideoss/FlatJideOssTest.jfd | 32 ++++++++++++++++-- 5 files changed, 77 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5865eb4..8e2d448b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ FlatLaf Change Log to `com.formdev.flatlaf.extras.FlatSVGUtils`. - IntelliJ Themes: Added flag whether a theme is dark to `FlatAllIJThemes.INFOS`. (issue #221) +- JIDE Common Layer: Support `TristateCheckBox`. #### Fixed bugs diff --git a/flatlaf-jide-oss/README.md b/flatlaf-jide-oss/README.md index 94677a63..2e8e4a14 100644 --- a/flatlaf-jide-oss/README.md +++ b/flatlaf-jide-oss/README.md @@ -8,6 +8,7 @@ Following JIDE Common Layer components are currently supported by this addon: - `JideTabbedPane` - `RangeSlider` +- `TristateCheckBox` **Note**: We have currently no plans to support additional components. If you're diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/FlatJideOssDefaultsAddon.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/FlatJideOssDefaultsAddon.java index 096a0ded..199d1a78 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/FlatJideOssDefaultsAddon.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/FlatJideOssDefaultsAddon.java @@ -19,6 +19,7 @@ package com.formdev.flatlaf.jideoss; import java.io.InputStream; import java.util.HashMap; import java.util.Map; +import javax.swing.LookAndFeel; import javax.swing.UIDefaults; import com.formdev.flatlaf.FlatDefaultsAddon; import com.formdev.flatlaf.FlatLaf; @@ -46,6 +47,14 @@ public class FlatJideOssDefaultsAddon return super.getDefaults( lafClass ); } + @Override + public void afterDefaultsLoading( LookAndFeel laf, UIDefaults defaults ) { + // TristateCheckBox + defaults.put( "TristateCheckBox.icon", null ); + defaults.put( "TristateCheckBox.setMixed.clientProperty", new Object[] { "JButton.selectedState", "indeterminate" } ); + defaults.put( "TristateCheckBox.clearMixed.clientProperty", new Object[] { "JButton.selectedState", null } ); + } + @Override public int getPriority() { return 11; @@ -71,6 +80,7 @@ public class FlatJideOssDefaultsAddon Object key = e.getKey(); if( key instanceof String && (((String)key).startsWith( "Jide" ) || + ((String)key).startsWith( "TristateCheckBox." ) || key.equals( "RangeSliderUI" ) || key.equals( "Resizable.resizeBorder" )) ) { @@ -85,6 +95,9 @@ public class FlatJideOssDefaultsAddon defaults.putAll( jideDefaults ); jideDefaults = null; } + + // TristateCheckBox + defaults.put( "TristateCheckBox.icon", null ); } } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java index b51aa6ec..936fa1a2 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java @@ -51,6 +51,8 @@ public class FlatJideOssTest FlatJideOssTest() { initComponents(); + + tristateCheckBox1Changed(); } private void tabScrollChanged() { @@ -104,6 +106,16 @@ public class FlatJideOssTest popupMenu.showPopup(); } + private void tristateCheckBox1Changed() { + String text = null; + switch( tristateCheckBox1.getState() ) { + case TristateCheckBox.STATE_UNSELECTED: text = "UNSELECTED"; break; + case TristateCheckBox.STATE_SELECTED: text = "SELECTED"; break; + case TristateCheckBox.STATE_MIXED: text = "MIXED"; break; + } + triStateLabel1.setText( text ); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents JPanel panel9 = new JPanel(); @@ -135,6 +147,9 @@ public class FlatJideOssTest JPanel panel10 = new JPanel(); JLabel jidePopupLabel = new JLabel(); JButton showJidePopupButton = new JButton(); + JLabel label9 = new JLabel(); + tristateCheckBox1 = new TristateCheckBox(); + triStateLabel1 = new JLabel(); CellConstraints cc = new CellConstraints(); //======== this ======== @@ -303,8 +318,10 @@ public class FlatJideOssTest "insets 3 0 3 3,hidemode 3", // columns "[fill]" + + "[fill]" + "[fill]", // rows + "[]" + "[]")); //---- jidePopupLabel ---- @@ -315,6 +332,20 @@ public class FlatJideOssTest showJidePopupButton.setText("show JidePopup"); showJidePopupButton.addActionListener(e -> showJidePopupButtonActionPerformed(e)); panel10.add(showJidePopupButton, "cell 1 0"); + + //---- label9 ---- + label9.setText("TristateCheckBox:"); + panel10.add(label9, "cell 0 1"); + + //---- tristateCheckBox1 ---- + tristateCheckBox1.setText("three states"); + tristateCheckBox1.addActionListener(e -> tristateCheckBox1Changed()); + panel10.add(tristateCheckBox1, "cell 1 1"); + + //---- triStateLabel1 ---- + triStateLabel1.setText("text"); + triStateLabel1.setEnabled(false); + panel10.add(triStateLabel1, "cell 2 1"); } panel9.add(panel10, cc.xy(1, 9)); } @@ -330,5 +361,7 @@ public class FlatJideOssTest private JCheckBox moreTabsCheckBox; private JCheckBox tabScrollCheckBox; private JCheckBox hasFullBorderCheckBox; + private TristateCheckBox tristateCheckBox1; + private JLabel triStateLabel1; // JFormDesigner - End of variables declaration //GEN-END:variables } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.jfd index dd5c3d90..ff340059 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -194,8 +194,8 @@ new FormModel { } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 3 0 3 3,hidemode 3" - "$columnConstraints": "[fill][fill]" - "$rowConstraints": "[]" + "$columnConstraints": "[fill][fill][fill]" + "$rowConstraints": "[][]" } ) { name: "panel10" add( new FormComponent( "javax.swing.JLabel" ) { @@ -211,6 +211,32 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 0" } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label9" + "text": "TristateCheckBox:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "com.jidesoft.swing.TristateCheckBox" ) { + name: "tristateCheckBox1" + "text": "three states" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tristateCheckBox1Changed", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "triStateLabel1" + "text": "text" + "enabled": false + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 1" + } ) }, new FormLayoutConstraints( class com.jgoodies.forms.layout.CellConstraints ) { "gridY": 9 } ) From a7c6a881b3a11d920a1ab7497941db6ef2149b15 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 19 Dec 2020 16:00:57 +0100 Subject: [PATCH 076/178] Extras: FlatTriStateCheckBox reworked --- CHANGELOG.md | 3 +- .../components/FlatTriStateCheckBox.java | 177 ++++++++++++++---- .../flatlaf/testing/FlatContainerTest.java | 2 +- .../testing/extras/FlatExtrasTest.java | 55 ++++-- .../flatlaf/testing/extras/FlatExtrasTest.jfd | 55 ++++-- 5 files changed, 220 insertions(+), 72 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e2d448b..4ad339ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ FlatLaf Change Log `com.formdev.flatlaf.extras.components`). - Extras: Renamed tri-state check box class from `com.formdev.flatlaf.extras.TriStateCheckBox` to - `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`. + `com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`. Also + changed/improved API and added javadoc. - Extras: Renamed SVG utility class from `com.formdev.flatlaf.extras.SVGUtils` to `com.formdev.flatlaf.extras.FlatSVGUtils`. - IntelliJ Themes: Added flag whether a theme is dark to diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java index 781fac03..90964dbd 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.java @@ -28,11 +28,31 @@ import com.formdev.flatlaf.FlatLaf; /** * A tri-state check box. *

+ * The initial state is {@link State#INDETERMINATE}. + *

+ * By default the third state is allowed and clicking on the checkbox cycles thru all + * three states. If you want that the user can cycle only thru two states, disallow + * intermediate state using {@link #setAllowIndeterminate(boolean)}. Then you can still + * set the indeterminate state via API if necessary, but the user can not. + *

+ * The default state cycle order is {@link State#UNSELECTED} to {@link State#INDETERMINATE} + * to {@link State#SELECTED}. + * This is the same order as used by macOS, win32, IntelliJ IDEA and on the web as recommended by W3C in + * Tri-State Checkbox Example). + *

+ * If {@link #isAltStateCycleOrder()} returns {@code true}, + * the state cycle order is {@link State#UNSELECTED} to {@link State#SELECTED} + * to {@link State#INDETERMINATE}. This order is used by Windows 10 UWP apps. + *

+ * If you prefer the alternative state cycle order for all tri-state check boxes, enable it using: + *

+ * UIManager.put( "FlatTriStateCheckBox.altStateCycleOrder", true );
+ * 
+ *

* To display the third state, this component requires an LaF that supports painting * the indeterminate state if client property {@code "JButton.selectedState"} has the * value {@code "indeterminate"}. - *

- * FlatLaf and Mac Aqua LaF support the third state. + * FlatLaf and macOS Aqua LaF support the third state. * For other LaFs a magenta rectangle is painted around the component for the third state. * * @author Karl Tauber @@ -40,10 +60,11 @@ import com.formdev.flatlaf.FlatLaf; public class FlatTriStateCheckBox extends JCheckBox { - public enum State { INDETERMINATE, SELECTED, UNSELECTED } + public enum State { UNSELECTED, INDETERMINATE, SELECTED } private State state; - private boolean thirdStateEnabled = true; + private boolean allowIndeterminate = true; + private boolean altStateCycleOrder = UIManager.getBoolean( "FlatTriStateCheckBox.altStateCycleOrder" ); public FlatTriStateCheckBox() { this( null ); @@ -64,11 +85,7 @@ public class FlatTriStateCheckBox @Override public void setSelected( boolean b ) { - switch( state ) { - case INDETERMINATE: setState( State.SELECTED ); break; - case SELECTED: setState( State.UNSELECTED ); break; - case UNSELECTED: setState( thirdStateEnabled ? State.INDETERMINATE : State.SELECTED ); break; - } + setState( nextState( state ) ); fireStateChanged(); fireItemStateChanged( new ItemEvent( this, ItemEvent.ITEM_STATE_CHANGED, this, @@ -79,10 +96,19 @@ public class FlatTriStateCheckBox setState( initialState ); } + /** + * Returns the state as {@link State} enum. + *

+ * Alternatively you can use {@link #getChecked()} to get all three states as {@link Boolean} + * or {@link #isIndeterminate()} to check only for indeterminate state. + */ public State getState() { return state; } + /** + * Sets the state as {@link State} enum. + */ public void setState( State state ) { if( this.state == state ) return; @@ -90,34 +116,58 @@ public class FlatTriStateCheckBox State oldState = this.state; this.state = state; - putClientProperty( SELECTED_STATE, state == State.INDETERMINATE ? SELECTED_STATE_INDETERMINATE : null ); + putClientProperty( SELECTED_STATE, (state == State.INDETERMINATE) ? SELECTED_STATE_INDETERMINATE : null ); firePropertyChange( "state", oldState, state ); repaint(); } - public Boolean getValue() { - switch( state ) { - default: - case INDETERMINATE: return null; - case SELECTED: return true; - case UNSELECTED: return false; + /** + * Returns the next state that follows the given state, depending on + * {@link #isAllowIndeterminate()} and {@link #isAltStateCycleOrder()}. + */ + protected State nextState( State state ) { + if( !altStateCycleOrder ) { + // default cycle order: UNSELECTED --> INDETERMINATE --> SELECTED + switch( state ) { + default: + case UNSELECTED: return allowIndeterminate ? State.INDETERMINATE : State.SELECTED; + case INDETERMINATE: return State.SELECTED; + case SELECTED: return State.UNSELECTED; + } + } else { + // alternative cycle order: INDETERMINATE --> UNSELECTED --> SELECTED + switch( state ) { + default: + case UNSELECTED: return State.SELECTED; + case INDETERMINATE: return State.UNSELECTED; + case SELECTED: return allowIndeterminate ? State.INDETERMINATE : State.UNSELECTED; + } } } - public void setValue( Boolean value ) { - setState( value == null ? State.INDETERMINATE : (value ? State.SELECTED : State.UNSELECTED) ); + /** + * Returns the state as {@link Boolean}. + * Returns {@code null} if the state is {@link State#INDETERMINATE}. + *

+ * Alternatively you can use {@link #getState()} to get state as {@link State} enum + * or {@link #isIndeterminate()} to check only for indeterminate state. + */ + public Boolean getChecked() { + switch( state ) { + default: + case UNSELECTED: return false; + case INDETERMINATE: return null; + case SELECTED: return true; + } } - public boolean isThirdStateEnabled() { - return thirdStateEnabled; - } - - public void setThirdStateEnabled( boolean thirdStateEnabled ) { - this.thirdStateEnabled = thirdStateEnabled; - - if( state == State.INDETERMINATE ) - setState( State.UNSELECTED ); + /** + * Sets the state as {@link Boolean}. + * Passing {@code null} sets state to {@link State#INDETERMINATE}. + */ + public void setChecked( Boolean value ) { + setState( (value == null) ? State.INDETERMINATE : (value ? State.SELECTED : State.UNSELECTED) ); } @Override @@ -125,17 +175,80 @@ public class FlatTriStateCheckBox setState( b ? State.SELECTED : State.UNSELECTED ); } + /** + * Returns whether state is indeterminate. + */ + public boolean isIndeterminate() { + return state == State.INDETERMINATE; + } + + /** + * Sets indeterminate state. + */ + public void setIndeterminate( boolean indeterminate ) { + if( indeterminate ) + setState( State.INDETERMINATE ); + else if( state == State.INDETERMINATE ) + setState( State.UNSELECTED ); + } + + /** + * Returns whether indeterminate state is allowed. + *

+ * This affects only the user when clicking on the checkbox. + * Setting state to indeterminate via API is always allowed. + */ + public boolean isAllowIndeterminate() { + return allowIndeterminate; + } + + /** + * Sets whether indeterminate state is allowed. + *

+ * This affects only the user when clicking on the checkbox. + * Setting state to indeterminate via API is always allowed. + */ + public void setAllowIndeterminate( boolean allowIndeterminate ) { + this.allowIndeterminate = allowIndeterminate; + } + + /** + * Returns whether alternative state cycle order should be used. + */ + public boolean isAltStateCycleOrder() { + return altStateCycleOrder; + } + + /** + * Sets whether alternative state cycle order should be used. + */ + public void setAltStateCycleOrder( boolean altStateCycleOrder ) { + this.altStateCycleOrder = altStateCycleOrder; + } + @Override protected void paintComponent( Graphics g ) { super.paintComponent( g ); - if( state == State.INDETERMINATE && !isThirdStateSupported() ) { - g.setColor( Color.magenta ); - g.drawRect( 0, 0, getWidth() - 1, getHeight() - 1 ); - } + if( state == State.INDETERMINATE && !isIndeterminateStateSupported() ) + paintIndeterminateState( g ); } - private boolean isThirdStateSupported() { + /** + * Paints the indeterminate state if the current LaF does not support displaying + * the indeterminate state. + * The default implementation draws a magenta rectangle around the component. + */ + protected void paintIndeterminateState( Graphics g ) { + g.setColor( Color.magenta ); + g.drawRect( 0, 0, getWidth() - 1, getHeight() - 1 ); + } + + /** + * Returns whether the current LaF supports displaying the indeterminate state. + * Returns {@code true} for FlatLaf and macOS Aqua. + */ + protected boolean isIndeterminateStateSupported() { LookAndFeel laf = UIManager.getLookAndFeel(); return laf instanceof FlatLaf || laf.getClass().getName().equals( "com.apple.laf.AquaLookAndFeel" ); } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java index 5dc283ed..bf32a30b 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java @@ -359,7 +359,7 @@ public class FlatContainerTest } private void secondTabClosableChanged() { - Boolean closable = secondTabClosableCheckBox.getValue(); + Boolean closable = secondTabClosableCheckBox.getChecked(); for( FlatTabbedPane tabbedPane : allTabbedPanes ) { if( tabbedPane.getTabCount() > 1 ) { diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java index 098ae845..143cf6cb 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.java @@ -38,8 +38,8 @@ public class FlatExtrasTest public FlatExtrasTest() { initComponents(); - triStateLabel1.setText( triStateCheckBox1.getState().toString() ); - triStateLabel2.setText( triStateCheckBox2.getState().toString() ); + triStateCheckBox1Changed(); + triStateCheckBox2Changed(); addSVGIcon( "actions/copy.svg" ); addSVGIcon( "actions/colors.svg" ); @@ -90,6 +90,10 @@ public class FlatExtrasTest triStateLabel2.setText( triStateCheckBox2.getState().toString() ); } + private void triStateCheckBox3Changed() { + triStateLabel3.setText( triStateCheckBox3.getState().toString() ); + } + private void disabledChanged() { boolean enabled = !disabledCheckBox.isSelected(); @@ -120,6 +124,8 @@ public class FlatExtrasTest label1 = new JLabel(); triStateCheckBox1 = new FlatTriStateCheckBox(); triStateLabel1 = new JLabel(); + triStateCheckBox3 = new FlatTriStateCheckBox(); + triStateLabel3 = new JLabel(); triStateCheckBox2 = new FlatTriStateCheckBox(); triStateLabel2 = new JLabel(); label2 = new JLabel(); @@ -166,20 +172,31 @@ public class FlatExtrasTest triStateLabel1.setEnabled(false); add(triStateLabel1, "cell 2 0,gapx 30"); + //---- triStateCheckBox3 ---- + triStateCheckBox3.setText("alt state cycle order"); + triStateCheckBox3.setAltStateCycleOrder(true); + triStateCheckBox3.addActionListener(e -> triStateCheckBox3Changed()); + add(triStateCheckBox3, "cell 1 1"); + + //---- triStateLabel3 ---- + triStateLabel3.setText("text"); + triStateLabel3.setEnabled(false); + add(triStateLabel3, "cell 2 1,gapx 30"); + //---- triStateCheckBox2 ---- triStateCheckBox2.setText("third state disabled"); - triStateCheckBox2.setThirdStateEnabled(false); + triStateCheckBox2.setAllowIndeterminate(false); triStateCheckBox2.addActionListener(e -> triStateCheckBox2Changed()); - add(triStateCheckBox2, "cell 1 1"); + add(triStateCheckBox2, "cell 1 2"); //---- triStateLabel2 ---- triStateLabel2.setText("text"); triStateLabel2.setEnabled(false); - add(triStateLabel2, "cell 2 1,gapx 30"); + add(triStateLabel2, "cell 2 2,gapx 30"); //---- label2 ---- label2.setText("SVG Icons:"); - add(label2, "cell 0 2"); + add(label2, "cell 0 3"); //======== svgIconsPanel ======== { @@ -190,50 +207,50 @@ public class FlatExtrasTest // rows "[grow,center]")); } - add(svgIconsPanel, "cell 1 2 2 1"); + add(svgIconsPanel, "cell 1 3 2 1"); //---- label3 ---- label3.setText("The icons may change colors when switching to another theme."); - add(label3, "cell 1 3 2 1"); + add(label3, "cell 1 4 2 1"); //---- label4 ---- label4.setText("Disabled SVG Icons:"); - add(label4, "cell 0 4"); + add(label4, "cell 0 5"); //---- disabledLabel ---- disabledLabel.setText("label"); - add(disabledLabel, "cell 1 4 2 1"); + add(disabledLabel, "cell 1 5 2 1"); //---- disabledButton ---- disabledButton.setText("button"); - add(disabledButton, "cell 1 4 2 1"); - add(disabledTabbedPane, "cell 1 4 2 1"); + add(disabledButton, "cell 1 5 2 1"); + add(disabledTabbedPane, "cell 1 5 2 1"); //---- label5 ---- label5.setText("only setIcon()"); label5.setEnabled(false); - add(label5, "cell 1 4 2 1,gapx 20"); + add(label5, "cell 1 5 2 1,gapx 20"); //---- disabledCheckBox ---- disabledCheckBox.setText("disabled"); disabledCheckBox.setSelected(true); disabledCheckBox.setMnemonic('D'); disabledCheckBox.addActionListener(e -> disabledChanged()); - add(disabledCheckBox, "cell 0 5,alignx left,growx 0"); + add(disabledCheckBox, "cell 0 6,alignx left,growx 0"); //---- disabledLabel2 ---- disabledLabel2.setText("label"); - add(disabledLabel2, "cell 1 5 2 1"); + add(disabledLabel2, "cell 1 6 2 1"); //---- disabledButton2 ---- disabledButton2.setText("button"); - add(disabledButton2, "cell 1 5 2 1"); - add(disabledTabbedPane2, "cell 1 5 2 1"); + add(disabledButton2, "cell 1 6 2 1"); + add(disabledTabbedPane2, "cell 1 6 2 1"); //---- label6 ---- label6.setText("setIcon() and setDisabledIcon()"); label6.setEnabled(false); - add(label6, "cell 1 5 2 1,gapx 20"); + add(label6, "cell 1 6 2 1,gapx 20"); // JFormDesigner - End of component initialization //GEN-END:initComponents } @@ -241,6 +258,8 @@ public class FlatExtrasTest private JLabel label1; private FlatTriStateCheckBox triStateCheckBox1; private JLabel triStateLabel1; + private FlatTriStateCheckBox triStateCheckBox3; + private JLabel triStateLabel3; private FlatTriStateCheckBox triStateCheckBox2; private JLabel triStateLabel2; private JLabel label2; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd index 0f0c2222..2853a30d 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/extras/FlatExtrasTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -30,25 +30,40 @@ new FormModel { "value": "cell 2 0,gapx 30" } ) add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { - name: "triStateCheckBox2" - "text": "third state disabled" - "thirdStateEnabled": false - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox2Changed", false ) ) + name: "triStateCheckBox3" + "text": "alt state cycle order" + "altStateCycleOrder": true + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox3Changed", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1" } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "triStateLabel3" + "text": "text" + "enabled": false + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 1,gapx 30" + } ) + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { + name: "triStateCheckBox2" + "text": "third state disabled" + "allowIndeterminate": false + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox2Changed", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 2" + } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "triStateLabel2" "text": "text" "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 2 1,gapx 30" + "value": "cell 2 2,gapx 30" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label2" "text": "SVG Icons:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" + "value": "cell 0 3" } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 0,hidemode 3" @@ -57,43 +72,43 @@ new FormModel { } ) { name: "svgIconsPanel" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 2 2 1" + "value": "cell 1 3 2 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label3" "text": "The icons may change colors when switching to another theme." }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 3 2 1" + "value": "cell 1 4 2 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label4" "text": "Disabled SVG Icons:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 4" + "value": "cell 0 5" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "disabledLabel" "text": "label" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 4 2 1" + "value": "cell 1 5 2 1" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "disabledButton" "text": "button" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 4 2 1" + "value": "cell 1 5 2 1" } ) add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "disabledTabbedPane" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 4 2 1" + "value": "cell 1 5 2 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label5" "text": "only setIcon()" "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 4 2 1,gapx 20" + "value": "cell 1 5 2 1,gapx 20" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "disabledCheckBox" @@ -102,35 +117,35 @@ new FormModel { "mnemonic": 68 addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "disabledChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 5,alignx left,growx 0" + "value": "cell 0 6,alignx left,growx 0" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "disabledLabel2" "text": "label" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 5 2 1" + "value": "cell 1 6 2 1" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "disabledButton2" "text": "button" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 5 2 1" + "value": "cell 1 6 2 1" } ) add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "disabledTabbedPane2" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 5 2 1" + "value": "cell 1 6 2 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label6" "text": "setIcon() and setDisabledIcon()" "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 5 2 1,gapx 20" + "value": "cell 1 6 2 1,gapx 20" } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 595, 300 ) + "size": new java.awt.Dimension( 595, 470 ) } ) } } From 3c58879ce565bcebc0d75f0b29eb83b7fd2140aa Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 19 Dec 2020 17:01:34 +0100 Subject: [PATCH 077/178] Slider: fixed painting of colored track if JSlider.inverted is true --- CHANGELOG.md | 1 + .../src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ad339ef..880ec9b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ FlatLaf Change Log #### Fixed bugs +- Slider: Fixed painting of colored track if `JSlider.inverted` is `true`. - Table and TableHeader: Fixed missing right vertical grid line if using table as row header in scroll pane. (issues #152 and #46) - TableHeader: Fixed position of column separators in right-to-left component diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 4779ac40..b67281a9 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -279,6 +279,12 @@ debug*/ } if( coloredTrack != null ) { + if( slider.getInverted() ) { + RoundRectangle2D temp = track; + track = coloredTrack; + coloredTrack = temp; + } + g.setColor( trackValueColor ); ((Graphics2D)g).fill( coloredTrack ); } From 4fdd44858fcf4c4419ff8f16c0866e37da201472 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 20 Dec 2020 13:32:10 +0100 Subject: [PATCH 078/178] Slider: clicking on track now immediately moves the thumb to mouse location and starts dragging the thumb --- CHANGELOG.md | 2 + .../com/formdev/flatlaf/ui/FlatSliderUI.java | 44 ++++ .../flatlaf/testing/FlatComponentsTest.java | 189 ++++++++++++++++-- .../flatlaf/testing/FlatComponentsTest.jfd | 164 ++++++++++++--- 4 files changed, 351 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 880ec9b2..dfc9e4fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FlatLaf Change Log #### New features and improvements +- Slider: Clicking on track now immediately moves the thumb to mouse location + and starts dragging the thumb. - Extras: Added standard component extension classes that provides easy access to FlatLaf specific client properties (see package `com.formdev.flatlaf.extras.components`). diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index b67281a9..300f0e7c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -226,6 +226,10 @@ public class FlatSliderUI g.drawRect( trackRect.x, trackRect.y, trackRect.width - 1, trackRect.height - 1 ); g.setColor( Color.red ); g.drawRect( thumbRect.x, thumbRect.y, thumbRect.width - 1, thumbRect.height - 1 ); + g.setColor( Color.green ); + g.drawRect( tickRect.x, tickRect.y, tickRect.width - 1, tickRect.height - 1 ); + g.setColor( Color.red ); + g.drawRect( labelRect.x, labelRect.y, labelRect.width - 1, labelRect.height - 1 ); debug*/ super.paint( g, c ); @@ -502,7 +506,47 @@ debug*/ @Override public void mousePressed( MouseEvent e ) { setThumbPressed( isOverThumb( e ) ); + + if( !slider.isEnabled() ) + return; + + // use "old" behavior when clicking on track + if( UIManager.getBoolean( "Slider.scrollOnTrackClick" ) ) { + super.mousePressed( e ); + return; + } + + // "new" behavior set thumb to mouse location when clicking on track + + int x = e.getX(); + int y = e.getY(); + + // clicked on thumb --> let super class do the work + calculateGeometry(); + if( thumbRect.contains( x, y ) ) { + super.mousePressed( e ); + return; + } + + if( UIManager.getBoolean( "Slider.onlyLeftMouseButtonDrag" ) && + !SwingUtilities.isLeftMouseButton( e ) ) + return; + + // move the mouse event coordinates to the center of the thumb + int tx = thumbRect.x + (thumbRect.width / 2) - x; + int ty = thumbRect.y + (thumbRect.height / 2) - y; + e.translatePoint( tx, ty ); + + // invoke super mousePressed() to start dragging thumb super.mousePressed( e ); + + // move the mouse event coordinates back to current mouse location + e.translatePoint( -tx, -ty ); + + // invoke super mouseDragged() to update thumb location + super.mouseDragged( e ); + + setThumbPressed( true ); } @Override diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index 5cee1105..ced0367e 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -37,10 +37,18 @@ public class FlatComponentsTest } ); } + private final JSlider[] allSliders; + private final JSlider[] roundSliders; + private final JSlider[] directionalSliders; + FlatComponentsTest() { initComponents(); buttonTypeComboBox.init( ButtonType.class, true ); + + allSliders = new JSlider[] { slider1, slider2, slider3, slider4, slider5, slider6 }; + roundSliders = new JSlider[] { slider1, slider2, slider6 }; + directionalSliders = new JSlider[] { slider3, slider4, slider5 }; } private void changeProgress() { @@ -152,6 +160,64 @@ public class FlatComponentsTest textField1.requestFocusInWindow(); } + private void sliderPaintTrackChanged() { + boolean paintTrack = sliderPaintTrackCheckBox.isSelected(); + for( JSlider slider : allSliders ) + slider.setPaintTrack( paintTrack ); + } + + private void sliderPaintTicksChanged() { + Boolean paintTicks = sliderPaintTicksCheckBox.getChecked(); + if( paintTicks != null ) { + for( JSlider slider : allSliders ) + slider.setPaintTicks( paintTicks ); + } else { + for( JSlider slider : roundSliders ) + slider.setPaintTicks( false ); + for( JSlider slider : directionalSliders ) + slider.setPaintTicks( true ); + } + } + + private void sliderPaintLabelsChanged() { + Boolean paintLabels = sliderPaintLabelsCheckBox.getChecked(); + if( paintLabels != null ) { + for( JSlider slider : allSliders ) + slider.setPaintLabels( paintLabels ); + } else { + for( JSlider slider : roundSliders ) + slider.setPaintLabels( false ); + for( JSlider slider : directionalSliders ) + slider.setPaintLabels( true ); + } + } + + private void sliderInvertedChanged() { + boolean inverted = sliderInvertedCheckBox.isSelected(); + for( JSlider slider : allSliders ) + slider.setInverted( inverted ); + } + + private void sliderSnapToTicksChanged() { + boolean snapToTicks = sliderSnapToTicksCheckBox.isSelected(); + for( JSlider slider : allSliders ) + slider.setSnapToTicks( snapToTicks ); + } + + private void majorThickSpacingChanged() { + int majorTickSpacing = (Integer) majorTickSpacingSpinner.getValue(); + for( JSlider slider : directionalSliders ) { + slider.setLabelTable( null ); + slider.setMajorTickSpacing( majorTickSpacing ); + } + } + + private void minorThickSpacingChanged() { + int minorTickSpacing = (Integer) minorTickSpacingSpinner.getValue(); + for( JSlider slider : directionalSliders ) + slider.setMinorTickSpacing( minorTickSpacing ); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents JLabel labelLabel = new JLabel(); @@ -273,8 +339,8 @@ public class FlatComponentsTest FlatScrollBar scrollBar7 = new FlatScrollBar(); FlatScrollBar scrollBar8 = new FlatScrollBar(); JSeparator separator2 = new JSeparator(); - JSlider slider2 = new JSlider(); - JSlider slider4 = new JSlider(); + slider2 = new JSlider(); + slider4 = new JSlider(); JScrollPane scrollPane14 = new JScrollPane(); progressBar3 = new FlatProgressBar(); progressBar4 = new FlatProgressBar(); @@ -307,20 +373,29 @@ public class FlatComponentsTest JSeparator separator1 = new JSeparator(); JPanel panel2 = new JPanel(); JLabel sliderLabel = new JLabel(); - JSlider slider1 = new JSlider(); - JSlider slider6 = new JSlider(); + slider1 = new JSlider(); + slider6 = new JSlider(); + JPanel panel6 = new JPanel(); + sliderPaintTrackCheckBox = new JCheckBox(); + sliderPaintTicksCheckBox = new FlatTriStateCheckBox(); + sliderPaintLabelsCheckBox = new FlatTriStateCheckBox(); + sliderInvertedCheckBox = new JCheckBox(); + sliderSnapToTicksCheckBox = new JCheckBox(); + majorTickSpacingSpinner = new JSpinner(); + minorTickSpacingSpinner = new JSpinner(); JLabel sliderLabel2 = new JLabel(); slider3 = new JSlider(); - JSlider slider5 = new JSlider(); + slider5 = new JSlider(); JLabel progressBarLabel = new JLabel(); progressBar1 = new FlatProgressBar(); progressBar2 = new FlatProgressBar(); + JPanel panel7 = new JPanel(); indeterminateCheckBox = new JCheckBox(); squareCheckBox = new JCheckBox(); + largeHeightCheckBox = new JCheckBox(); JLabel toolTipLabel = new JLabel(); JToolTip toolTip1 = new JToolTip(); JToolTip toolTip2 = new JToolTip(); - largeHeightCheckBox = new JCheckBox(); JLabel toolBarLabel = new JLabel(); JToolBar toolBar1 = new JToolBar(); JButton button4 = new JButton(); @@ -1227,6 +1302,56 @@ public class FlatComponentsTest slider6.setValue(30); add(slider6, "cell 1 19 3 1"); + //======== panel6 ======== + { + panel6.setBorder(new TitledBorder("JSlider Control")); + panel6.setLayout(new MigLayout( + "ltr,insets 0,hidemode 3", + // columns + "[]", + // rows + "[]0" + + "[]0" + + "[]")); + + //---- sliderPaintTrackCheckBox ---- + sliderPaintTrackCheckBox.setText("track"); + sliderPaintTrackCheckBox.setSelected(true); + sliderPaintTrackCheckBox.addActionListener(e -> sliderPaintTrackChanged()); + panel6.add(sliderPaintTrackCheckBox, "cell 0 0"); + + //---- sliderPaintTicksCheckBox ---- + sliderPaintTicksCheckBox.setText("ticks"); + sliderPaintTicksCheckBox.addActionListener(e -> sliderPaintTicksChanged()); + panel6.add(sliderPaintTicksCheckBox, "cell 0 0"); + + //---- sliderPaintLabelsCheckBox ---- + sliderPaintLabelsCheckBox.setText("labels"); + sliderPaintLabelsCheckBox.addActionListener(e -> sliderPaintLabelsChanged()); + panel6.add(sliderPaintLabelsCheckBox, "cell 0 0"); + + //---- sliderInvertedCheckBox ---- + sliderInvertedCheckBox.setText("inverted"); + sliderInvertedCheckBox.addActionListener(e -> sliderInvertedChanged()); + panel6.add(sliderInvertedCheckBox, "cell 0 1"); + + //---- sliderSnapToTicksCheckBox ---- + sliderSnapToTicksCheckBox.setText("snap to ticks"); + sliderSnapToTicksCheckBox.addActionListener(e -> sliderSnapToTicksChanged()); + panel6.add(sliderSnapToTicksCheckBox, "cell 0 1"); + + //---- majorTickSpacingSpinner ---- + majorTickSpacingSpinner.setModel(new SpinnerNumberModel(50, 0, 100, 5)); + majorTickSpacingSpinner.addChangeListener(e -> majorThickSpacingChanged()); + panel6.add(majorTickSpacingSpinner, "cell 0 2"); + + //---- minorTickSpacingSpinner ---- + minorTickSpacingSpinner.setModel(new SpinnerNumberModel(10, 0, 100, 5)); + minorTickSpacingSpinner.addChangeListener(e -> minorThickSpacingChanged()); + panel6.add(minorTickSpacingSpinner, "cell 0 2"); + } + add(panel6, "cell 4 19 1 2,grow"); + //---- sliderLabel2 ---- sliderLabel2.setText("baseline"); add(sliderLabel2, "cell 0 20,alignx right,growx 0"); @@ -1262,15 +1387,34 @@ public class FlatComponentsTest progressBar2.setValue(60); add(progressBar2, "cell 1 21 3 1,growx"); - //---- indeterminateCheckBox ---- - indeterminateCheckBox.setText("indeterminate"); - indeterminateCheckBox.addActionListener(e -> indeterminateProgress()); - add(indeterminateCheckBox, "cell 4 21"); + //======== panel7 ======== + { + panel7.setBorder(new TitledBorder("JProgressBar Control")); + panel7.setLayout(new MigLayout( + "ltr,insets 0,hidemode 3", + // columns + "[]" + + "[fill]", + // rows + "[]0" + + "[]")); - //---- squareCheckBox ---- - squareCheckBox.setText("square"); - squareCheckBox.addActionListener(e -> squareChanged()); - add(squareCheckBox, "cell 4 21"); + //---- indeterminateCheckBox ---- + indeterminateCheckBox.setText("indeterminate"); + indeterminateCheckBox.addActionListener(e -> indeterminateProgress()); + panel7.add(indeterminateCheckBox, "cell 0 0"); + + //---- squareCheckBox ---- + squareCheckBox.setText("square"); + squareCheckBox.addActionListener(e -> squareChanged()); + panel7.add(squareCheckBox, "cell 1 0"); + + //---- largeHeightCheckBox ---- + largeHeightCheckBox.setText("large height"); + largeHeightCheckBox.addActionListener(e -> largeHeightChanged()); + panel7.add(largeHeightCheckBox, "cell 0 1,aligny top,growy 0"); + } + add(panel7, "cell 4 21 1 2,grow"); //---- toolTipLabel ---- toolTipLabel.setText("JToolTip:"); @@ -1284,11 +1428,6 @@ public class FlatComponentsTest toolTip2.setTipText("Tool tip with\nmultiple\nlines."); add(toolTip2, "cell 1 22 3 1"); - //---- largeHeightCheckBox ---- - largeHeightCheckBox.setText("large height"); - largeHeightCheckBox.addActionListener(e -> largeHeightChanged()); - add(largeHeightCheckBox, "cell 4 22,aligny top,growy 0"); - //---- toolBarLabel ---- toolBarLabel.setText("JToolBar:"); add(toolBarLabel, "cell 0 23"); @@ -1417,6 +1556,8 @@ public class FlatComponentsTest // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JTextField textField1; + private JSlider slider2; + private JSlider slider4; private FlatProgressBar progressBar3; private FlatProgressBar progressBar4; private FlatTestEnumComboBox buttonTypeComboBox; @@ -1429,7 +1570,17 @@ public class FlatComponentsTest private JRadioButton magentaOutlineRadioButton; private JRadioButton magentaCyanOutlineRadioButton; private JCheckBox focusPaintedCheckBox; + private JSlider slider1; + private JSlider slider6; + private JCheckBox sliderPaintTrackCheckBox; + private FlatTriStateCheckBox sliderPaintTicksCheckBox; + private FlatTriStateCheckBox sliderPaintLabelsCheckBox; + private JCheckBox sliderInvertedCheckBox; + private JCheckBox sliderSnapToTicksCheckBox; + private JSpinner majorTickSpacingSpinner; + private JSpinner minorTickSpacingSpinner; private JSlider slider3; + private JSlider slider5; private FlatProgressBar progressBar1; private FlatProgressBar progressBar2; private JCheckBox indeterminateCheckBox; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index a7981e66..c67cf6ba 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.3.0.337" Java: "15" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -874,6 +874,9 @@ new FormModel { name: "slider2" "orientation": 1 "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 13 1 6,growy" } ) @@ -885,6 +888,9 @@ new FormModel { "paintLabels": true "orientation": 1 "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 13 1 6,growy" } ) @@ -1134,6 +1140,9 @@ new FormModel { add( new FormComponent( "javax.swing.JSlider" ) { name: "slider1" "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 19 3 1,growx" } ) @@ -1141,9 +1150,93 @@ new FormModel { name: "slider6" "enabled": false "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 19 3 1" } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$columnConstraints": "[]" + "$rowConstraints": "[]0[]0[]" + "$layoutConstraints": "ltr,insets 0,hidemode 3" + } ) { + name: "panel6" + "border": new javax.swing.border.TitledBorder( "JSlider Control" ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderPaintTrackCheckBox" + "text": "track" + "selected": true + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintTrackChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { + name: "sliderPaintTicksCheckBox" + "text": "ticks" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintTicksChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { + name: "sliderPaintLabelsCheckBox" + "text": "labels" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintLabelsChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderInvertedCheckBox" + "text": "inverted" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderInvertedChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderSnapToTicksCheckBox" + "text": "snap to ticks" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderSnapToTicksChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "majorTickSpacingSpinner" + "model": new javax.swing.SpinnerNumberModel( 50, 0, 100, 5 ) + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "majorThickSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "minorTickSpacingSpinner" + "model": new javax.swing.SpinnerNumberModel( 10, 0, 100, 5 ) + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "minorThickSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 19 1 2,grow" + } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "sliderLabel2" "text": "baseline" @@ -1172,6 +1265,9 @@ new FormModel { "paintLabels": true "enabled": false "value": 30 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 20 3 1" } ) @@ -1200,25 +1296,45 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 21 3 1,growx" } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "indeterminateCheckBox" - "text": "indeterminate" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "indeterminateProgress", false ) ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$columnConstraints": "[][fill]" + "$rowConstraints": "[]0[]" + "$layoutConstraints": "ltr,insets 0,hidemode 3" + } ) { + name: "panel7" + "border": new javax.swing.border.TitledBorder( "JProgressBar Control" ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "indeterminateCheckBox" + "text": "indeterminate" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "indeterminateProgress", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "squareCheckBox" + "text": "square" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "squareChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "largeHeightCheckBox" + "text": "large height" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "largeHeightChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1,aligny top,growy 0" + } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 21" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "squareCheckBox" - "text": "square" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "squareChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 21" + "value": "cell 4 21 1 2,grow" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "toolTipLabel" @@ -1238,16 +1354,6 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 22 3 1" } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "largeHeightCheckBox" - "text": "large height" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "largeHeightChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 22,aligny top,growy 0" - } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "toolBarLabel" "text": "JToolBar:" From 53854a4d13d7f7ea4aa36cd44354c2dedbfcfdda Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 20 Dec 2020 17:32:01 +0100 Subject: [PATCH 079/178] Slider: snap to ticks is now done while dragging the thumb --- CHANGELOG.md | 7 +- .../com/formdev/flatlaf/ui/FlatSliderUI.java | 18 +- .../flatlaf/testing/FlatComponentsTest.java | 174 +++++++------ .../flatlaf/testing/FlatComponentsTest.jfd | 240 ++++++++++-------- 4 files changed, 254 insertions(+), 185 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfc9e4fb..178cdfa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,12 @@ FlatLaf Change Log #### New features and improvements - Slider: Clicking on track now immediately moves the thumb to mouse location - and starts dragging the thumb. + and starts dragging the thumb. Use `UIManager.put( + "Slider.scrollOnTrackClick", true )` to enable old behavior that scrolls the + thumb when clicking on track. +- Slider: Snap to ticks is now done while dragging the thumb. Use + `UIManager.put( "Slider.snapToTicksOnReleased", true )` to enable old behavior + that snaps to ticks on mouse released. - Extras: Added standard component extension classes that provides easy access to FlatLaf specific client properties (see package `com.formdev.flatlaf.extras.components`). diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index 300f0e7c..a88bcf9c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -543,8 +543,8 @@ debug*/ // move the mouse event coordinates back to current mouse location e.translatePoint( -tx, -ty ); - // invoke super mouseDragged() to update thumb location - super.mouseDragged( e ); + // invoke mouseDragged() to update thumb location + mouseDragged( e ); setThumbPressed( true ); } @@ -555,6 +555,20 @@ debug*/ super.mouseReleased( e ); } + @Override + public void mouseDragged( MouseEvent e ) { + super.mouseDragged( e ); + + if( isDragging() && + slider.getSnapToTicks() && + slider.isEnabled() && + !UIManager.getBoolean( "Slider.snapToTicksOnReleased" ) ) + { + calculateThumbLocation(); + slider.repaint(); + } + } + protected void setThumbHover( boolean hover ) { if( hover != thumbHover ) { thumbHover = hover; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index ced0367e..f677ffee 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -19,6 +19,7 @@ package com.formdev.flatlaf.testing; import java.awt.*; import javax.swing.*; import javax.swing.border.*; +import javax.swing.event.ChangeListener; import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.extras.components.*; import com.formdev.flatlaf.extras.components.FlatButton.ButtonType; @@ -49,6 +50,15 @@ public class FlatComponentsTest allSliders = new JSlider[] { slider1, slider2, slider3, slider4, slider5, slider6 }; roundSliders = new JSlider[] { slider1, slider2, slider6 }; directionalSliders = new JSlider[] { slider3, slider4, slider5 }; + + ChangeListener sliderChanged = e -> { + JSlider slider = (JSlider) e.getSource(); + String text = slider.getValue() + " " + slider.getValueIsAdjusting(); + sliderValueLabel.setText( text ); +// System.out.println( text ); + }; + for( JSlider slider : allSliders ) + slider.addChangeListener( sliderChanged ); } private void changeProgress() { @@ -375,6 +385,7 @@ public class FlatComponentsTest JLabel sliderLabel = new JLabel(); slider1 = new JSlider(); slider6 = new JSlider(); + JPanel panel8 = new JPanel(); JPanel panel6 = new JPanel(); sliderPaintTrackCheckBox = new JCheckBox(); sliderPaintTicksCheckBox = new FlatTriStateCheckBox(); @@ -383,16 +394,17 @@ public class FlatComponentsTest sliderSnapToTicksCheckBox = new JCheckBox(); majorTickSpacingSpinner = new JSpinner(); minorTickSpacingSpinner = new JSpinner(); + sliderValueLabel = new JLabel(); + JPanel panel7 = new JPanel(); + indeterminateCheckBox = new JCheckBox(); + squareCheckBox = new JCheckBox(); + largeHeightCheckBox = new JCheckBox(); JLabel sliderLabel2 = new JLabel(); slider3 = new JSlider(); slider5 = new JSlider(); JLabel progressBarLabel = new JLabel(); progressBar1 = new FlatProgressBar(); progressBar2 = new FlatProgressBar(); - JPanel panel7 = new JPanel(); - indeterminateCheckBox = new JCheckBox(); - squareCheckBox = new JCheckBox(); - largeHeightCheckBox = new JCheckBox(); JLabel toolTipLabel = new JLabel(); JToolTip toolTip1 = new JToolTip(); JToolTip toolTip2 = new JToolTip(); @@ -1302,55 +1314,103 @@ public class FlatComponentsTest slider6.setValue(30); add(slider6, "cell 1 19 3 1"); - //======== panel6 ======== + //======== panel8 ======== { - panel6.setBorder(new TitledBorder("JSlider Control")); - panel6.setLayout(new MigLayout( + panel8.setLayout(new MigLayout( "ltr,insets 0,hidemode 3", // columns "[]", // rows - "[]0" + - "[]0" + + "[]" + + "[]" + + "[]" + "[]")); - //---- sliderPaintTrackCheckBox ---- - sliderPaintTrackCheckBox.setText("track"); - sliderPaintTrackCheckBox.setSelected(true); - sliderPaintTrackCheckBox.addActionListener(e -> sliderPaintTrackChanged()); - panel6.add(sliderPaintTrackCheckBox, "cell 0 0"); + //======== panel6 ======== + { + panel6.setBorder(new TitledBorder("JSlider Control")); + panel6.setLayout(new MigLayout( + "ltr,insets 0,hidemode 3", + // columns + "[]", + // rows + "[]0" + + "[]0" + + "[]0" + + "[]")); - //---- sliderPaintTicksCheckBox ---- - sliderPaintTicksCheckBox.setText("ticks"); - sliderPaintTicksCheckBox.addActionListener(e -> sliderPaintTicksChanged()); - panel6.add(sliderPaintTicksCheckBox, "cell 0 0"); + //---- sliderPaintTrackCheckBox ---- + sliderPaintTrackCheckBox.setText("track"); + sliderPaintTrackCheckBox.setSelected(true); + sliderPaintTrackCheckBox.addActionListener(e -> sliderPaintTrackChanged()); + panel6.add(sliderPaintTrackCheckBox, "cell 0 0"); - //---- sliderPaintLabelsCheckBox ---- - sliderPaintLabelsCheckBox.setText("labels"); - sliderPaintLabelsCheckBox.addActionListener(e -> sliderPaintLabelsChanged()); - panel6.add(sliderPaintLabelsCheckBox, "cell 0 0"); + //---- sliderPaintTicksCheckBox ---- + sliderPaintTicksCheckBox.setText("ticks"); + sliderPaintTicksCheckBox.addActionListener(e -> sliderPaintTicksChanged()); + panel6.add(sliderPaintTicksCheckBox, "cell 0 0"); - //---- sliderInvertedCheckBox ---- - sliderInvertedCheckBox.setText("inverted"); - sliderInvertedCheckBox.addActionListener(e -> sliderInvertedChanged()); - panel6.add(sliderInvertedCheckBox, "cell 0 1"); + //---- sliderPaintLabelsCheckBox ---- + sliderPaintLabelsCheckBox.setText("labels"); + sliderPaintLabelsCheckBox.addActionListener(e -> sliderPaintLabelsChanged()); + panel6.add(sliderPaintLabelsCheckBox, "cell 0 0"); - //---- sliderSnapToTicksCheckBox ---- - sliderSnapToTicksCheckBox.setText("snap to ticks"); - sliderSnapToTicksCheckBox.addActionListener(e -> sliderSnapToTicksChanged()); - panel6.add(sliderSnapToTicksCheckBox, "cell 0 1"); + //---- sliderInvertedCheckBox ---- + sliderInvertedCheckBox.setText("inverted"); + sliderInvertedCheckBox.addActionListener(e -> sliderInvertedChanged()); + panel6.add(sliderInvertedCheckBox, "cell 0 1"); - //---- majorTickSpacingSpinner ---- - majorTickSpacingSpinner.setModel(new SpinnerNumberModel(50, 0, 100, 5)); - majorTickSpacingSpinner.addChangeListener(e -> majorThickSpacingChanged()); - panel6.add(majorTickSpacingSpinner, "cell 0 2"); + //---- sliderSnapToTicksCheckBox ---- + sliderSnapToTicksCheckBox.setText("snap to ticks"); + sliderSnapToTicksCheckBox.addActionListener(e -> sliderSnapToTicksChanged()); + panel6.add(sliderSnapToTicksCheckBox, "cell 0 1"); - //---- minorTickSpacingSpinner ---- - minorTickSpacingSpinner.setModel(new SpinnerNumberModel(10, 0, 100, 5)); - minorTickSpacingSpinner.addChangeListener(e -> minorThickSpacingChanged()); - panel6.add(minorTickSpacingSpinner, "cell 0 2"); + //---- majorTickSpacingSpinner ---- + majorTickSpacingSpinner.setModel(new SpinnerNumberModel(50, 0, 100, 5)); + majorTickSpacingSpinner.addChangeListener(e -> majorThickSpacingChanged()); + panel6.add(majorTickSpacingSpinner, "cell 0 2"); + + //---- minorTickSpacingSpinner ---- + minorTickSpacingSpinner.setModel(new SpinnerNumberModel(10, 0, 100, 5)); + minorTickSpacingSpinner.addChangeListener(e -> minorThickSpacingChanged()); + panel6.add(minorTickSpacingSpinner, "cell 0 2"); + + //---- sliderValueLabel ---- + sliderValueLabel.setText("slider value"); + panel6.add(sliderValueLabel, "cell 0 3"); + } + panel8.add(panel6, "cell 0 0 1 2,grow"); + + //======== panel7 ======== + { + panel7.setBorder(new TitledBorder("JProgressBar Control")); + panel7.setLayout(new MigLayout( + "ltr,insets 0,hidemode 3", + // columns + "[]" + + "[fill]", + // rows + "[]0" + + "[]")); + + //---- indeterminateCheckBox ---- + indeterminateCheckBox.setText("indeterminate"); + indeterminateCheckBox.addActionListener(e -> indeterminateProgress()); + panel7.add(indeterminateCheckBox, "cell 0 0"); + + //---- squareCheckBox ---- + squareCheckBox.setText("square"); + squareCheckBox.addActionListener(e -> squareChanged()); + panel7.add(squareCheckBox, "cell 1 0"); + + //---- largeHeightCheckBox ---- + largeHeightCheckBox.setText("large height"); + largeHeightCheckBox.addActionListener(e -> largeHeightChanged()); + panel7.add(largeHeightCheckBox, "cell 0 1,aligny top,growy 0"); + } + panel8.add(panel7, "cell 0 2 1 2,grow"); } - add(panel6, "cell 4 19 1 2,grow"); + add(panel8, "cell 4 19 1 4"); //---- sliderLabel2 ---- sliderLabel2.setText("baseline"); @@ -1387,35 +1447,6 @@ public class FlatComponentsTest progressBar2.setValue(60); add(progressBar2, "cell 1 21 3 1,growx"); - //======== panel7 ======== - { - panel7.setBorder(new TitledBorder("JProgressBar Control")); - panel7.setLayout(new MigLayout( - "ltr,insets 0,hidemode 3", - // columns - "[]" + - "[fill]", - // rows - "[]0" + - "[]")); - - //---- indeterminateCheckBox ---- - indeterminateCheckBox.setText("indeterminate"); - indeterminateCheckBox.addActionListener(e -> indeterminateProgress()); - panel7.add(indeterminateCheckBox, "cell 0 0"); - - //---- squareCheckBox ---- - squareCheckBox.setText("square"); - squareCheckBox.addActionListener(e -> squareChanged()); - panel7.add(squareCheckBox, "cell 1 0"); - - //---- largeHeightCheckBox ---- - largeHeightCheckBox.setText("large height"); - largeHeightCheckBox.addActionListener(e -> largeHeightChanged()); - panel7.add(largeHeightCheckBox, "cell 0 1,aligny top,growy 0"); - } - add(panel7, "cell 4 21 1 2,grow"); - //---- toolTipLabel ---- toolTipLabel.setText("JToolTip:"); add(toolTipLabel, "cell 0 22"); @@ -1579,13 +1610,14 @@ public class FlatComponentsTest private JCheckBox sliderSnapToTicksCheckBox; private JSpinner majorTickSpacingSpinner; private JSpinner minorTickSpacingSpinner; + private JLabel sliderValueLabel; + private JCheckBox indeterminateCheckBox; + private JCheckBox squareCheckBox; + private JCheckBox largeHeightCheckBox; private JSlider slider3; private JSlider slider5; private FlatProgressBar progressBar1; private FlatProgressBar progressBar2; - private JCheckBox indeterminateCheckBox; - private JCheckBox squareCheckBox; - private JCheckBox largeHeightCheckBox; // JFormDesigner - End of variables declaration //GEN-END:variables //---- class TestDefaultButton -------------------------------------------- diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index c67cf6ba..d709f036 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -1158,84 +1158,142 @@ new FormModel { } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$columnConstraints": "[]" - "$rowConstraints": "[]0[]0[]" + "$rowConstraints": "[][][][]" "$layoutConstraints": "ltr,insets 0,hidemode 3" } ) { - name: "panel6" - "border": new javax.swing.border.TitledBorder( "JSlider Control" ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "sliderPaintTrackCheckBox" - "text": "track" - "selected": true - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintTrackChanged", false ) ) + name: "panel8" + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$columnConstraints": "[]" + "$rowConstraints": "[]0[]0[]0[]" + "$layoutConstraints": "ltr,insets 0,hidemode 3" + } ) { + name: "panel6" + "border": new javax.swing.border.TitledBorder( "JSlider Control" ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderPaintTrackCheckBox" + "text": "track" + "selected": true + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintTrackChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { + name: "sliderPaintTicksCheckBox" + "text": "ticks" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintTicksChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { + name: "sliderPaintLabelsCheckBox" + "text": "labels" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintLabelsChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderInvertedCheckBox" + "text": "inverted" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderInvertedChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderSnapToTicksCheckBox" + "text": "snap to ticks" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderSnapToTicksChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "majorTickSpacingSpinner" + "model": new javax.swing.SpinnerNumberModel( 50, 0, 100, 5 ) + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "majorThickSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "minorTickSpacingSpinner" + "model": new javax.swing.SpinnerNumberModel( 10, 0, 100, 5 ) + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "minorThickSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "sliderValueLabel" + "text": "slider value" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" + "value": "cell 0 0 1 2,grow" } ) - add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { - name: "sliderPaintTicksCheckBox" - "text": "ticks" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintTicksChanged", false ) ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$columnConstraints": "[][fill]" + "$rowConstraints": "[]0[]" + "$layoutConstraints": "ltr,insets 0,hidemode 3" + } ) { + name: "panel7" + "border": new javax.swing.border.TitledBorder( "JProgressBar Control" ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "indeterminateCheckBox" + "text": "indeterminate" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "indeterminateProgress", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "squareCheckBox" + "text": "square" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "squareChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "largeHeightCheckBox" + "text": "large height" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "largeHeightChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1,aligny top,growy 0" + } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { - name: "sliderPaintLabelsCheckBox" - "text": "labels" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderPaintLabelsChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "sliderInvertedCheckBox" - "text": "inverted" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderInvertedChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "sliderSnapToTicksCheckBox" - "text": "snap to ticks" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderSnapToTicksChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" - } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "majorTickSpacingSpinner" - "model": new javax.swing.SpinnerNumberModel( 50, 0, 100, 5 ) - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "majorThickSpacingChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" - } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "minorTickSpacingSpinner" - "model": new javax.swing.SpinnerNumberModel( 10, 0, 100, 5 ) - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "minorThickSpacingChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" + "value": "cell 0 2 1 2,grow" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 19 1 2,grow" + "value": "cell 4 19 1 4" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "sliderLabel2" @@ -1296,46 +1354,6 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 21 3 1,growx" } ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$columnConstraints": "[][fill]" - "$rowConstraints": "[]0[]" - "$layoutConstraints": "ltr,insets 0,hidemode 3" - } ) { - name: "panel7" - "border": new javax.swing.border.TitledBorder( "JProgressBar Control" ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "indeterminateCheckBox" - "text": "indeterminate" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "indeterminateProgress", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "squareCheckBox" - "text": "square" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "squareChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 0" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "largeHeightCheckBox" - "text": "large height" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "largeHeightChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1,aligny top,growy 0" - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 21 1 2,grow" - } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "toolTipLabel" "text": "JToolTip:" From 0123a8895f47d91f00637a14b67022116803b33e Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 20 Dec 2020 17:33:42 +0100 Subject: [PATCH 080/178] JIDE: updated UI defaults dumps for commit ef065d31a07169998e4f5ca3e10068c0fba242f3 (support `TristateCheckBox`) --- .../dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt | 10 ++++++++++ .../dumps/uidefaults/FlatLightLaf_1.8.0_202.txt | 10 ++++++++++ .../dumps/uidefaults/FlatTestLaf_1.8.0_202.txt | 10 ++++++++++ .../com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt | 2 ++ 4 files changed, 32 insertions(+) diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 551fcb67..606ac5d3 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -1273,6 +1273,16 @@ Tree.wideSelection true TreeUI com.formdev.flatlaf.ui.FlatTreeUI +#---- TristateCheckBox ---- + +TristateCheckBox.clearMixed.clientProperty length=2 [Ljava.lang.Object; + [0] JButton.selectedState + [1] null +TristateCheckBox.setMixed.clientProperty length=2 [Ljava.lang.Object; + [0] JButton.selectedState + [1] indeterminate + + #---- UIColorHighlighter ---- UIColorHighlighter.stripingBackground #515657 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index d96e0e19..28a67042 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -1278,6 +1278,16 @@ Tree.wideSelection true TreeUI com.formdev.flatlaf.ui.FlatTreeUI +#---- TristateCheckBox ---- + +TristateCheckBox.clearMixed.clientProperty length=2 [Ljava.lang.Object; + [0] JButton.selectedState + [1] null +TristateCheckBox.setMixed.clientProperty length=2 [Ljava.lang.Object; + [0] JButton.selectedState + [1] indeterminate + + #---- UIColorHighlighter ---- UIColorHighlighter.stripingBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index a5819331..a5e2ed4c 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -1274,6 +1274,16 @@ Tree.wideSelection true TreeUI com.formdev.flatlaf.ui.FlatTreeUI +#---- TristateCheckBox ---- + +TristateCheckBox.clearMixed.clientProperty length=2 [Ljava.lang.Object; + [0] JButton.selectedState + [1] null +TristateCheckBox.setMixed.clientProperty length=2 [Ljava.lang.Object; + [0] JButton.selectedState + [1] indeterminate + + #---- Viewport ---- Viewport.background #ccffcc 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 8016d60d..4c0dc4f6 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 @@ -928,6 +928,8 @@ Tree.textForeground Tree.timeFactor Tree.wideSelection TreeUI +TristateCheckBox.clearMixed.clientProperty +TristateCheckBox.setMixed.clientProperty UIColorHighlighter.stripingBackground Viewport.background Viewport.font From a2af9e4c65334e3a4b7ab85a556f53a3c9d0a425 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 20 Dec 2020 18:24:40 +0100 Subject: [PATCH 081/178] JIDE: RangeSlider: clicking on track now immediately moves the thumb to mouse location and starts dragging the thumb --- CHANGELOG.md | 4 +- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 67 ++++++++++++++ .../testing/jideoss/FlatRangeSliderTest.java | 91 ++++++++++++++++++- .../testing/jideoss/FlatRangeSliderTest.jfd | 47 +++++++++- 4 files changed, 200 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 178cdfa6..c0775469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,8 @@ FlatLaf Change Log #### New features and improvements -- Slider: Clicking on track now immediately moves the thumb to mouse location - and starts dragging the thumb. Use `UIManager.put( +- Slider and JIDE RangeSlider: Clicking on track now immediately moves the thumb + to mouse location and starts dragging the thumb. Use `UIManager.put( "Slider.scrollOnTrackClick", true )` to enable old behavior that scrolls the thumb when clicking on track. - Slider: Snap to ticks is now done while dragging the thumb. Use diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index da9de82c..a8793da6 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -23,12 +23,14 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; +import java.awt.event.MouseEvent; import java.awt.geom.RoundRectangle2D; import java.util.Dictionary; import java.util.Enumeration; import javax.swing.JComponent; import javax.swing.JSlider; import javax.swing.LookAndFeel; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import com.formdev.flatlaf.ui.FlatSliderUI; @@ -144,6 +146,11 @@ public class FlatRangeSliderUI disabledThumbBorderColor = null; } + @Override + protected TrackListener createTrackListener( JSlider slider ) { + return new FlatRangeTrackListener( super.createTrackListener( slider ) ); + } + @Override public int getBaseline( JComponent c, int width, int height ) { if( c == null ) @@ -300,4 +307,64 @@ debug*/ protected boolean isRoundThumb() { return !slider.getPaintTicks() && !slider.getPaintLabels(); } + + //---- class FlatRangeTrackListener --------------------------------------- + + protected class FlatRangeTrackListener + extends RangeTrackListener + { + public FlatRangeTrackListener( TrackListener listener ) { + super( listener ); + } + + @Override + public void mousePressed( MouseEvent e ) { + if( !slider.isEnabled() ) + return; + + // use "old" behavior when clicking on track + if( UIManager.getBoolean( "Slider.scrollOnTrackClick" ) ) { + super.mousePressed( e ); + return; + } + + // "new" behavior set thumb to mouse location when clicking on track + + int x = e.getX(); + int y = e.getY(); + int handle = getMouseHandle( x, y ); + + // clicked on thumb --> let super class do the work + if( handle != MOUSE_HANDLE_LOWER && handle != MOUSE_HANDLE_UPPER ) { + super.mousePressed( e ); + return; + } + + if( UIManager.getBoolean( "Slider.onlyLeftMouseButtonDrag" ) && + !SwingUtilities.isLeftMouseButton( e ) ) + return; + + // get low or high thumb rectangle + Rectangle thumbRect = FlatRangeSliderUI.this.thumbRect; + if( handle == MOUSE_HANDLE_UPPER ) { + Point p = adjustThumbForHighValue(); + thumbRect = new Rectangle( FlatRangeSliderUI.this.thumbRect ); + restoreThumbForLowValue( p ); + } + + // move the mouse event coordinates to the center of the thumb + int tx = thumbRect.x + (thumbRect.width / 2) - x; + int ty = thumbRect.y + (thumbRect.height / 2) - y; + e.translatePoint( tx, ty ); + + // invoke super mousePressed() to start dragging thumb + super.mousePressed( e ); + + // move the mouse event coordinates back to current mouse location + e.translatePoint( -tx, -ty ); + + // invoke mouseDragged() to update thumb location + mouseDragged( e ); + } + } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java index 00eaa0a5..a84c6c88 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java @@ -16,12 +16,14 @@ package com.formdev.flatlaf.testing.jideoss; +import javax.swing.*; import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JSlider; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.UIManager; +import javax.swing.event.ChangeListener; import com.formdev.flatlaf.testing.FlatTestFrame; import com.formdev.flatlaf.testing.FlatTestPanel; import com.jidesoft.plaf.LookAndFeelFactory; @@ -46,8 +48,43 @@ public class FlatRangeSliderTest } ); } + private final JSlider[] allSliders; + private final JSlider[] directionalSliders; + FlatRangeSliderTest() { initComponents(); + + allSliders = new JSlider[] { + horizontalRangeSlider, + verticalRangeSlider, + horizontalSlider, + verticalSlider, + horizontalRangeSlider2, + verticalRangeSlider2, + horizontalSlider2, + verticalSlider2, + }; + directionalSliders = new JSlider[] { + horizontalRangeSlider, + verticalRangeSlider, + horizontalSlider, + verticalSlider, + }; + + ChangeListener sliderChanged = e -> { + JSlider slider = (JSlider) e.getSource(); + String text; + if( slider instanceof RangeSlider ) { + RangeSlider rangeSlider = (RangeSlider) slider; + text = rangeSlider.getLowValue() + " - " + rangeSlider.getHighValue() + + " " + slider.getValueIsAdjusting(); + } else + text = slider.getValue() + " " + slider.getValueIsAdjusting(); + sliderValueLabel.setText( text ); +// System.out.println( text ); + }; + for( JSlider slider : allSliders ) + slider.addChangeListener( sliderChanged ); } private void paintLabels() { @@ -66,6 +103,26 @@ public class FlatRangeSliderTest verticalSlider.setPaintTicks( selected ); } + private void sliderSnapToTicksChanged() { + boolean snapToTicks = sliderSnapToTicksCheckBox.isSelected(); + for( JSlider slider : allSliders ) + slider.setSnapToTicks( snapToTicks ); + } + + private void majorThickSpacingChanged() { + int majorTickSpacing = (Integer) majorTickSpacingSpinner.getValue(); + for( JSlider slider : directionalSliders ) { + slider.setLabelTable( null ); + slider.setMajorTickSpacing( majorTickSpacing ); + } + } + + private void minorThickSpacingChanged() { + int minorTickSpacing = (Integer) minorTickSpacingSpinner.getValue(); + for( JSlider slider : directionalSliders ) + slider.setMinorTickSpacing( minorTickSpacing ); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents JLabel tabbedPaneLabel = new JLabel(); @@ -81,13 +138,18 @@ public class FlatRangeSliderTest verticalSlider2 = new JSlider(); paintTick = new JCheckBox(); paintLabel = new JCheckBox(); + sliderSnapToTicksCheckBox = new JCheckBox(); + majorTickSpacingSpinner = new JSpinner(); + minorTickSpacingSpinner = new JSpinner(); + sliderValueLabel = new JLabel(); //======== this ======== setLayout(new MigLayout( "insets dialog,hidemode 3", // columns "[left]" + - "[240,left]", + "[240,left]" + + "[fill]", // rows "[fill]" + "[center]" + @@ -170,14 +232,33 @@ public class FlatRangeSliderTest paintTick.setMnemonic('T'); paintTick.setSelected(true); paintTick.addActionListener(e -> paintTicks()); - add(paintTick, "cell 0 6 2 1"); + add(paintTick, "cell 0 6 3 1"); //---- paintLabel ---- paintLabel.setText("PaintLabels"); paintLabel.setMnemonic('L'); paintLabel.setSelected(true); paintLabel.addActionListener(e -> paintLabels()); - add(paintLabel, "cell 0 6 2 1"); + add(paintLabel, "cell 0 6 3 1"); + + //---- sliderSnapToTicksCheckBox ---- + sliderSnapToTicksCheckBox.setText("snap to ticks"); + sliderSnapToTicksCheckBox.addActionListener(e -> sliderSnapToTicksChanged()); + add(sliderSnapToTicksCheckBox, "cell 0 6 3 1"); + + //---- majorTickSpacingSpinner ---- + majorTickSpacingSpinner.setModel(new SpinnerNumberModel(10, 0, 100, 5)); + majorTickSpacingSpinner.addChangeListener(e -> majorThickSpacingChanged()); + add(majorTickSpacingSpinner, "cell 0 6 3 1"); + + //---- minorTickSpacingSpinner ---- + minorTickSpacingSpinner.setModel(new SpinnerNumberModel(5, 0, 100, 5)); + minorTickSpacingSpinner.addChangeListener(e -> minorThickSpacingChanged()); + add(minorTickSpacingSpinner, "cell 0 6 3 1"); + + //---- sliderValueLabel ---- + sliderValueLabel.setText("slider value"); + add(sliderValueLabel, "cell 0 6 3 1"); // JFormDesigner - End of component initialization //GEN-END:initComponents } @@ -192,5 +273,9 @@ public class FlatRangeSliderTest private JSlider verticalSlider2; private JCheckBox paintTick; private JCheckBox paintLabel; + private JCheckBox sliderSnapToTicksCheckBox; + private JSpinner majorTickSpacingSpinner; + private JSpinner minorTickSpacingSpinner; + private JLabel sliderValueLabel; // JFormDesigner - End of variables declaration //GEN-END:variables } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd index 7cd55f14..c5a93466 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -8,7 +8,7 @@ new FormModel { } add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets dialog,hidemode 3" - "$columnConstraints": "[left][240,left]" + "$columnConstraints": "[left][240,left][fill]" "$rowConstraints": "[fill][center][][][][grow,fill][]" } ) { name: "this" @@ -136,7 +136,7 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "paintTicks", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 6 2 1" + "value": "cell 0 6 3 1" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "paintLabel" @@ -148,7 +148,46 @@ new FormModel { } addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "paintLabels", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 6 2 1" + "value": "cell 0 6 3 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderSnapToTicksCheckBox" + "text": "snap to ticks" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderSnapToTicksChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6 3 1" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "majorTickSpacingSpinner" + "model": new javax.swing.SpinnerNumberModel( 10, 0, 100, 5 ) + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "majorThickSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6 3 1" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "minorTickSpacingSpinner" + "model": new javax.swing.SpinnerNumberModel( 5, 0, 100, 5 ) + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "minorThickSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6 3 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "sliderValueLabel" + "text": "slider value" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 6 3 1" } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) From 40592ab876c64bd8ab37185b19b6c951956dc0be Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 20 Dec 2020 18:34:13 +0100 Subject: [PATCH 082/178] FlatUIUtils: fixed javadoc warnings --- .../src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index e2bc2484..b4cf9007 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -255,7 +255,7 @@ public class FlatUIUtils } /** - * Resets rendering hints previously set with {@link #setRenderingHints(Graphics2D)}. + * Resets rendering hints previously set with {@link #setRenderingHints}. */ public static void resetRenderingHints( Graphics g, Object[] oldRenderingHints ) { Graphics2D g2 = (Graphics2D) g; @@ -264,7 +264,7 @@ public class FlatUIUtils } /** - * Temporary resets rendering hints set with {@link #setRenderingHints(Graphics2D)} + * Temporary resets rendering hints set with {@link #setRenderingHints} * and runs the given runnable. *

* This is intended for painting text while rendering hints are set. From 073a25f3818a6ed71d5bdd85bad6d3c9a7070782 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 20 Dec 2020 18:42:23 +0100 Subject: [PATCH 083/178] release 0.46 --- CHANGELOG.md | 2 +- build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0775469..9fa30e24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ FlatLaf Change Log ================== -## 0.46-SNAPSHOT +## 0.46 #### New features and improvements diff --git a/build.gradle.kts b/build.gradle.kts index 988390ff..4e717b98 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ -val releaseVersion = "0.45" -val developmentVersion = "0.46-SNAPSHOT" +val releaseVersion = "0.46" +val developmentVersion = "0.47-SNAPSHOT" version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion From cbb11ebb03a7aed1b259d43625241d1dcca9a031 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 23 Dec 2020 00:02:58 +0100 Subject: [PATCH 084/178] ComboBox, Spinner and SplitPaneDivider: support "pressed" feedback on arrow buttons --- CHANGELOG.md | 8 +++ .../formdev/flatlaf/ui/FlatArrowButton.java | 18 ++----- .../formdev/flatlaf/ui/FlatComboBoxUI.java | 53 ++++++++++++++++--- .../formdev/flatlaf/ui/FlatScrollBarUI.java | 7 +-- .../com/formdev/flatlaf/ui/FlatSpinnerUI.java | 6 ++- .../formdev/flatlaf/ui/FlatSplitPaneUI.java | 15 +++++- .../com/formdev/flatlaf/ui/FlatUIUtils.java | 34 ------------ .../formdev/flatlaf/FlatDarkLaf.properties | 6 +-- .../com/formdev/flatlaf/FlatLaf.properties | 3 ++ .../formdev/flatlaf/FlatLightLaf.properties | 6 +-- .../flatlaf/swingx/ui/FlatDatePickerUI.java | 5 +- .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 15 +++--- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 15 +++--- .../uidefaults/FlatTestLaf_1.8.0_202.txt | 3 ++ .../flatlaf/testing/FlatTestLaf.properties | 2 + .../flatlaf/themeeditor/FlatLafUIKeys.txt | 3 ++ 16 files changed, 119 insertions(+), 80 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fa30e24..923fed3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ FlatLaf Change Log ================== +## 0.47-SNAPSHOT + +#### New features and improvements + +- ComboBox, Spinner and SplitPaneDivider: Added pressed feedback to arrow + buttons. + + ## 0.46 #### New features and improvements diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java index e5319a6d..795b220d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java @@ -57,18 +57,6 @@ public class FlatArrowButton private boolean hover; private boolean pressed; - public FlatArrowButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground ) - { - this( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, null ); - } - - public FlatArrowButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground, Color pressedBackground ) - { - this( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, null, pressedBackground ); - } - public FlatArrowButton( int direction, String type, Color foreground, Color disabledForeground, Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground ) { @@ -85,7 +73,9 @@ public class FlatArrowButton setOpaque( false ); setBorder( null ); - if( hoverForeground != null || hoverBackground != null || pressedBackground != null ) { + if( hoverForeground != null || hoverBackground != null || + pressedForeground != null || pressedBackground != null ) + { addMouseListener( new MouseAdapter() { @Override public void mouseEntered( MouseEvent e ) { @@ -151,7 +141,7 @@ public class FlatArrowButton } protected Color deriveForeground( Color foreground ) { - return foreground; + return FlatUIUtils.deriveColor( foreground, this.foreground ); } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java index 82bc86bb..273b6be9 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java @@ -34,6 +34,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Rectangle2D; import java.beans.PropertyChangeEvent; @@ -97,6 +99,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault ComboBox.buttonArrowColor Color * @uiDefault ComboBox.buttonDisabledArrowColor Color * @uiDefault ComboBox.buttonHoverArrowColor Color + * @uiDefault ComboBox.buttonPressedArrowColor Color * * @author Karl Tauber */ @@ -120,9 +123,11 @@ public class FlatComboBoxUI protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; protected Color buttonHoverArrowColor; + protected Color buttonPressedArrowColor; private MouseListener hoverListener; protected boolean hover; + protected boolean pressed; private WeakReference lastRendererComponent; @@ -134,13 +139,36 @@ public class FlatComboBoxUI protected void installListeners() { super.installListeners(); - hoverListener = new FlatUIUtils.HoverListener( null, h -> { - if( !comboBox.isEditable() ) { - hover = h; - if( arrowButton != null ) + hoverListener = new MouseAdapter() { + @Override + public void mouseEntered( MouseEvent e ) { + hover = true; + repaintArrowButton(); + } + + @Override + public void mouseExited( MouseEvent e ) { + hover = false; + repaintArrowButton(); + } + + @Override + public void mousePressed( MouseEvent e ) { + pressed = true; + repaintArrowButton(); + } + + @Override + public void mouseReleased( MouseEvent e ) { + pressed = false; + repaintArrowButton(); + } + + private void repaintArrowButton() { + if( arrowButton != null && !comboBox.isEditable() ) arrowButton.repaint(); } - } ); + }; comboBox.addMouseListener( hoverListener ); } @@ -175,6 +203,7 @@ public class FlatComboBoxUI buttonArrowColor = UIManager.getColor( "ComboBox.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "ComboBox.buttonDisabledArrowColor" ); buttonHoverArrowColor = UIManager.getColor( "ComboBox.buttonHoverArrowColor" ); + buttonPressedArrowColor = UIManager.getColor( "ComboBox.buttonPressedArrowColor" ); // set maximumRowCount int maximumRowCount = UIManager.getInt( "ComboBox.maximumRowCount" ); @@ -203,6 +232,7 @@ public class FlatComboBoxUI buttonArrowColor = null; buttonDisabledArrowColor = null; buttonHoverArrowColor = null; + buttonPressedArrowColor = null; MigLayoutVisualPadding.uninstall( comboBox ); } @@ -516,19 +546,26 @@ public class FlatComboBoxUI extends FlatArrowButton { protected FlatComboBoxButton() { - this( SwingConstants.SOUTH, arrowType, buttonArrowColor, buttonDisabledArrowColor, buttonHoverArrowColor, null, null ); + this( SwingConstants.SOUTH, arrowType, buttonArrowColor, buttonDisabledArrowColor, + buttonHoverArrowColor, null, buttonPressedArrowColor, null ); } protected FlatComboBoxButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground, Color pressedBackground ) + Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground ) { - super( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, pressedBackground ); + super( direction, type, foreground, disabledForeground, + hoverForeground, hoverBackground, pressedForeground, pressedBackground ); } @Override protected boolean isHover() { return super.isHover() || (!comboBox.isEditable() ? hover : false); } + + @Override + protected boolean isPressed() { + return super.isPressed() || (!comboBox.isEditable() ? pressed : false); + } } //---- class FlatComboPopup ----------------------------------------------- diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java index dfe86e99..a589f705 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java @@ -357,13 +357,14 @@ public class FlatScrollBarUI { protected FlatScrollBarButton( int direction ) { this( direction, arrowType, buttonArrowColor, buttonDisabledArrowColor, - null, hoverButtonBackground, pressedButtonBackground ); + null, hoverButtonBackground, null, pressedButtonBackground ); } protected FlatScrollBarButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground, Color pressedBackground ) + Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground ) { - super( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, pressedBackground ); + super( direction, type, foreground, disabledForeground, + hoverForeground, hoverBackground, pressedForeground, pressedBackground ); setArrowWidth( FlatArrowButton.DEFAULT_ARROW_WIDTH - 2 ); setFocusable( false ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java index 0e548bc5..45d30547 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java @@ -69,6 +69,7 @@ import com.formdev.flatlaf.FlatClientProperties; * @uiDefault Spinner.buttonArrowColor Color * @uiDefault Spinner.buttonDisabledArrowColor Color * @uiDefault Spinner.buttonHoverArrowColor Color + * @uiDefault Spinner.buttonPressedArrowColor Color * @uiDefault Spinner.padding Insets * * @author Karl Tauber @@ -90,6 +91,7 @@ public class FlatSpinnerUI protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; protected Color buttonHoverArrowColor; + protected Color buttonPressedArrowColor; protected Insets padding; public static ComponentUI createUI( JComponent c ) { @@ -114,6 +116,7 @@ public class FlatSpinnerUI buttonArrowColor = UIManager.getColor( "Spinner.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "Spinner.buttonDisabledArrowColor" ); buttonHoverArrowColor = UIManager.getColor( "Spinner.buttonHoverArrowColor" ); + buttonPressedArrowColor = UIManager.getColor( "Spinner.buttonPressedArrowColor" ); padding = UIManager.getInsets( "Spinner.padding" ); // scale @@ -134,6 +137,7 @@ public class FlatSpinnerUI buttonArrowColor = null; buttonDisabledArrowColor = null; buttonHoverArrowColor = null; + buttonPressedArrowColor = null; padding = null; MigLayoutVisualPadding.uninstall( spinner ); @@ -244,7 +248,7 @@ public class FlatSpinnerUI private Component createArrowButton( int direction, String name ) { FlatArrowButton button = new FlatArrowButton( direction, arrowType, buttonArrowColor, - buttonDisabledArrowColor, buttonHoverArrowColor, null ); + buttonDisabledArrowColor, buttonHoverArrowColor, null, buttonPressedArrowColor, null ); button.setName( name ); button.setYOffset( (direction == SwingConstants.NORTH) ? 1 : -1 ); if( direction == SwingConstants.NORTH ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java index 8103cda0..1bc4a5a5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java @@ -52,6 +52,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault SplitPane.continuousLayout boolean * @uiDefault SplitPaneDivider.oneTouchArrowColor Color * @uiDefault SplitPaneDivider.oneTouchHoverArrowColor Color + * @uiDefault SplitPaneDivider.oneTouchPressedArrowColor Color * @uiDefault SplitPaneDivider.style String grip (default) or plain * @uiDefault SplitPaneDivider.gripColor Color * @uiDefault SplitPaneDivider.gripDotCount int @@ -67,6 +68,7 @@ public class FlatSplitPaneUI private Boolean continuousLayout; protected Color oneTouchArrowColor; protected Color oneTouchHoverArrowColor; + protected Color oneTouchPressedArrowColor; public static ComponentUI createUI( JComponent c ) { return new FlatSplitPaneUI(); @@ -80,12 +82,22 @@ public class FlatSplitPaneUI // used in there on LaF switching oneTouchArrowColor = UIManager.getColor( "SplitPaneDivider.oneTouchArrowColor" ); oneTouchHoverArrowColor = UIManager.getColor( "SplitPaneDivider.oneTouchHoverArrowColor" ); + oneTouchPressedArrowColor = UIManager.getColor( "SplitPaneDivider.oneTouchPressedArrowColor" ); super.installDefaults(); continuousLayout = (Boolean) UIManager.get( "SplitPane.continuousLayout" ); } + @Override + protected void uninstallDefaults() { + super.uninstallDefaults(); + + oneTouchArrowColor = null; + oneTouchHoverArrowColor = null; + oneTouchPressedArrowColor = null; + } + @Override public boolean isContinuousLayout() { return super.isContinuousLayout() || (continuousLayout != null && Boolean.TRUE.equals( continuousLayout )); @@ -185,7 +197,8 @@ public class FlatSplitPaneUI protected final boolean left; protected FlatOneTouchButton( boolean left ) { - super( SwingConstants.NORTH, arrowType, oneTouchArrowColor, null, oneTouchHoverArrowColor, null ); + super( SwingConstants.NORTH, arrowType, oneTouchArrowColor, null, + oneTouchHoverArrowColor, null, oneTouchPressedArrowColor, null ); setCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) ); ToolTipManager.sharedInstance().registerComponent( this ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index b4cf9007..58693238 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -33,15 +33,12 @@ import java.awt.Shape; import java.awt.Window; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.util.IdentityHashMap; import java.util.WeakHashMap; -import java.util.function.Consumer; import java.util.function.Supplier; import javax.swing.JComponent; import javax.swing.JTable; @@ -680,37 +677,6 @@ public class FlatUIUtils .computeIfAbsent( key, k -> newInstanceSupplier.get() ); } - //---- class HoverListener ------------------------------------------------ - - public static class HoverListener - extends MouseAdapter - { - private final Component repaintComponent; - private final Consumer hoverChanged; - - public HoverListener( Component repaintComponent, Consumer hoverChanged ) { - this.repaintComponent = repaintComponent; - this.hoverChanged = hoverChanged; - } - - @Override - public void mouseEntered( MouseEvent e ) { - hoverChanged.accept( true ); - repaint(); - } - - @Override - public void mouseExited( MouseEvent e ) { - hoverChanged.accept( false ); - repaint(); - } - - private void repaint() { - if( repaintComponent != null && repaintComponent.isEnabled() ) - repaintComponent.repaint(); - } - } - //---- class RepaintFocusListener ----------------------------------------- public static class RepaintFocusListener diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 0839f741..333b4a7b 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -121,8 +121,9 @@ CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].se ComboBox.buttonEditableBackground=#404445 ComboBox.buttonArrowColor=#9A9DA1 -ComboBox.buttonDisabledArrowColor=#585858 -ComboBox.buttonHoverArrowColor=#bbb +ComboBox.buttonDisabledArrowColor=darken($ComboBox.buttonArrowColor,25%) +ComboBox.buttonHoverArrowColor=lighten($ComboBox.buttonArrowColor,10%,derived noAutoInverse) +ComboBox.buttonPressedArrowColor=lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) #---- Component ---- @@ -251,7 +252,6 @@ Slider.disabledThumbColor=$Slider.disabledTrackColor #---- SplitPane ---- SplitPaneDivider.draggingColor=#646464 -SplitPaneDivider.oneTouchHoverArrowColor=#7A7D81 #---- TabbedPane ---- 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 95015d5c..f788129a 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -519,6 +519,7 @@ Spinner.buttonBackground=$ComboBox.buttonEditableBackground Spinner.buttonArrowColor=$ComboBox.buttonArrowColor Spinner.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor Spinner.buttonHoverArrowColor=$ComboBox.buttonHoverArrowColor +Spinner.buttonPressedArrowColor=$ComboBox.buttonPressedArrowColor Spinner.padding=@textComponentMargin Spinner.editorBorderPainted=false # allowed values: button or none @@ -536,6 +537,8 @@ SplitPane.oneTouchButtonOffset={scaledInteger}2 SplitPaneDivider.border=null SplitPaneDivider.oneTouchArrowColor=$ComboBox.buttonArrowColor +SplitPaneDivider.oneTouchHoverArrowColor=$ComboBox.buttonHoverArrowColor +SplitPaneDivider.oneTouchPressedArrowColor=$ComboBox.buttonPressedArrowColor # allowed values: grip or plain SplitPaneDivider.style=grip SplitPaneDivider.gripColor=@icon diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 528ec370..24cbabcf 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -128,8 +128,9 @@ CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].se ComboBox.buttonEditableBackground=#fafafa ComboBox.buttonArrowColor=#666 -ComboBox.buttonDisabledArrowColor=#ABABAB -ComboBox.buttonHoverArrowColor=#999 +ComboBox.buttonDisabledArrowColor=lighten($ComboBox.buttonArrowColor,25%) +ComboBox.buttonHoverArrowColor=lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) +ComboBox.buttonPressedArrowColor=lighten($ComboBox.buttonArrowColor,30%,derived noAutoInverse) #---- Component ---- @@ -263,7 +264,6 @@ Slider.disabledThumbColor=$Slider.disabledTrackColor #---- SplitPane ---- SplitPaneDivider.draggingColor=#c4c4c4 -SplitPaneDivider.oneTouchHoverArrowColor=#333 #---- TabbedPane ---- diff --git a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java index 105f78f6..7c988d5b 100644 --- a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java +++ b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java @@ -70,6 +70,7 @@ public class FlatDatePickerUI protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; protected Color buttonHoverArrowColor; + protected Color buttonPressedArrowColor; private JButton popupButton; @@ -94,6 +95,7 @@ public class FlatDatePickerUI buttonArrowColor = UIManager.getColor( "ComboBox.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "ComboBox.buttonDisabledArrowColor" ); buttonHoverArrowColor = UIManager.getColor( "ComboBox.buttonHoverArrowColor" ); + buttonPressedArrowColor = UIManager.getColor( "ComboBox.buttonPressedArrowColor" ); super.installUI( c ); @@ -140,6 +142,7 @@ public class FlatDatePickerUI buttonArrowColor = null; buttonDisabledArrowColor = null; buttonHoverArrowColor = null; + buttonPressedArrowColor = null; if( datePicker.getBorder() instanceof UIResource ) datePicker.setBorder( null ); @@ -160,7 +163,7 @@ public class FlatDatePickerUI @Override protected JButton createPopupButton() { popupButton = new FlatArrowButton( SwingConstants.SOUTH, arrowType, buttonArrowColor, - buttonDisabledArrowColor, buttonHoverArrowColor, null ); + buttonDisabledArrowColor, buttonHoverArrowColor, null, buttonPressedArrowColor, null ); popupButton.setName( "popupButton" ); return popupButton; } diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 606ac5d3..96f8175b 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -189,10 +189,11 @@ ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F ComboBox.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonBackground #45494a javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonDarkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonDisabledArrowColor #5a5d61 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonEditableBackground #404445 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHighlight #242424 javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonHoverArrowColor #b4b7ba com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) +ComboBox.buttonPressedArrowColor #cfd0d2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) ComboBox.buttonShadow #646464 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonStyle auto ComboBox.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] @@ -788,7 +789,7 @@ RootPaneUI com.formdev.flatlaf.ui.FlatRootPaneUI ScrollBar.allowsAbsolutePositioning true ScrollBar.background #3c3f41 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] -ScrollBar.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] +ScrollBar.buttonDisabledArrowColor #5a5d61 javax.swing.plaf.ColorUIResource [UI] ScrollBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverButtonBackground #484c4e com.formdev.flatlaf.util.DerivedColor [UI] lighten(5%) ScrollBar.hoverThumbColor #6e767a com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) @@ -874,8 +875,9 @@ Spinner.background #45494a javax.swing.plaf.ColorUIResource [UI] Spinner.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI] Spinner.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] Spinner.buttonBackground #404445 javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonDisabledArrowColor #5a5d61 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonHoverArrowColor #b4b7ba com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) +Spinner.buttonPressedArrowColor #cfd0d2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) Spinner.buttonStyle button Spinner.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] Spinner.disabledForeground #888888 javax.swing.plaf.ColorUIResource [UI] @@ -908,7 +910,8 @@ SplitPaneDivider.gripDotCount 3 SplitPaneDivider.gripDotSize 3 SplitPaneDivider.gripGap 2 SplitPaneDivider.oneTouchArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] -SplitPaneDivider.oneTouchHoverArrowColor #7a7d81 javax.swing.plaf.ColorUIResource [UI] +SplitPaneDivider.oneTouchHoverArrowColor #b4b7ba com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) +SplitPaneDivider.oneTouchPressedArrowColor #cfd0d2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) SplitPaneDivider.style grip diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 28a67042..e9f23f51 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -193,10 +193,11 @@ ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F ComboBox.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonBackground #ffffff javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonDarkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonDisabledArrowColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonEditableBackground #fafafa javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHighlight #ffffff javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonHoverArrowColor #999999 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) +ComboBox.buttonPressedArrowColor #b3b3b3 com.formdev.flatlaf.util.DerivedColor [UI] lighten(30%) ComboBox.buttonShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonStyle auto ComboBox.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] @@ -793,7 +794,7 @@ RootPaneUI com.formdev.flatlaf.ui.FlatRootPaneUI ScrollBar.allowsAbsolutePositioning true ScrollBar.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] -ScrollBar.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] +ScrollBar.buttonDisabledArrowColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] ScrollBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverButtonBackground #e5e5e5 com.formdev.flatlaf.util.DerivedColor [UI] darken(5%) ScrollBar.hoverThumbColor #c3c3c3 com.formdev.flatlaf.util.DerivedColor [UI] darken(10%) @@ -879,8 +880,9 @@ Spinner.background #ffffff javax.swing.plaf.ColorUIResource [UI] Spinner.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI] Spinner.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] Spinner.buttonBackground #fafafa javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonDisabledArrowColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonHoverArrowColor #999999 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) +Spinner.buttonPressedArrowColor #b3b3b3 com.formdev.flatlaf.util.DerivedColor [UI] lighten(30%) Spinner.buttonStyle button Spinner.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] Spinner.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI] @@ -913,7 +915,8 @@ SplitPaneDivider.gripDotCount 3 SplitPaneDivider.gripDotSize 3 SplitPaneDivider.gripGap 2 SplitPaneDivider.oneTouchArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] -SplitPaneDivider.oneTouchHoverArrowColor #333333 javax.swing.plaf.ColorUIResource [UI] +SplitPaneDivider.oneTouchHoverArrowColor #999999 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) +SplitPaneDivider.oneTouchPressedArrowColor #b3b3b3 com.formdev.flatlaf.util.DerivedColor [UI] lighten(30%) SplitPaneDivider.style grip diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index a5e2ed4c..616bd940 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -191,6 +191,7 @@ ComboBox.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [U ComboBox.buttonEditableBackground #cccccc javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHighlight #ffffff javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHoverArrowColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonPressedArrowColor #0000ff javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonShadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonStyle auto ComboBox.disabledBackground #e0e0e0 javax.swing.plaf.ColorUIResource [UI] @@ -873,6 +874,7 @@ Spinner.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] Spinner.buttonBackground #cccccc javax.swing.plaf.ColorUIResource [UI] Spinner.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] Spinner.buttonHoverArrowColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonPressedArrowColor #0000ff javax.swing.plaf.ColorUIResource [UI] Spinner.buttonStyle button Spinner.disabledBackground #e0e0e0 javax.swing.plaf.ColorUIResource [UI] Spinner.disabledForeground #000088 javax.swing.plaf.ColorUIResource [UI] @@ -906,6 +908,7 @@ SplitPaneDivider.gripDotSize 3 SplitPaneDivider.gripGap 2 SplitPaneDivider.oneTouchArrowColor #00ff00 javax.swing.plaf.ColorUIResource [UI] SplitPaneDivider.oneTouchHoverArrowColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +SplitPaneDivider.oneTouchPressedArrowColor #0000ff javax.swing.plaf.ColorUIResource [UI] SplitPaneDivider.style grip diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index 13b5145f..60e04c10 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -121,6 +121,7 @@ ComboBox.buttonEditableBackground=#ccc ComboBox.buttonArrowColor=#666 ComboBox.buttonDisabledArrowColor=#ABABAB ComboBox.buttonHoverArrowColor=#f00 +ComboBox.buttonPressedArrowColor=#00f #---- Component ---- @@ -276,6 +277,7 @@ Slider.disabledThumbColor=#880 SplitPaneDivider.draggingColor=#800 SplitPaneDivider.oneTouchArrowColor=#0f0 SplitPaneDivider.oneTouchHoverArrowColor=#f00 +SplitPaneDivider.oneTouchPressedArrowColor=#00f #---- TabbedPane ---- 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 4c0dc4f6..0649af44 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 @@ -126,6 +126,7 @@ ComboBox.buttonDisabledArrowColor ComboBox.buttonEditableBackground ComboBox.buttonHighlight ComboBox.buttonHoverArrowColor +ComboBox.buttonPressedArrowColor ComboBox.buttonShadow ComboBox.buttonStyle ComboBox.disabledBackground @@ -615,6 +616,7 @@ Spinner.buttonArrowColor Spinner.buttonBackground Spinner.buttonDisabledArrowColor Spinner.buttonHoverArrowColor +Spinner.buttonPressedArrowColor Spinner.buttonStyle Spinner.disabledBackground Spinner.disabledForeground @@ -641,6 +643,7 @@ SplitPaneDivider.gripDotSize SplitPaneDivider.gripGap SplitPaneDivider.oneTouchArrowColor SplitPaneDivider.oneTouchHoverArrowColor +SplitPaneDivider.oneTouchPressedArrowColor SplitPaneDivider.style SplitPaneUI TabbedPane.ancestorInputMap From 9e4940228d4e785a0fd6f5cebca1f3833e53bc1b Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 23 Dec 2020 09:26:30 +0100 Subject: [PATCH 085/178] TextField now honours right component inset If the placeholder can't be drawn fully, we clip it by adding an ellipse. --- .../main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java index ae66cd30..572a0298 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java @@ -39,6 +39,7 @@ import javax.swing.text.Caret; import javax.swing.text.JTextComponent; import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.util.HiDPIUtils; +import com.formdev.flatlaf.util.JavaCompatibility; /** * Provides the Flat LaF UI delegate for {@link javax.swing.JTextField}. @@ -213,7 +214,9 @@ public class FlatTextFieldUI // paint placeholder g.setColor( placeholderForeground ); - FlatUIUtils.drawString( c, g, (String) placeholder, x, y ); + String clippedPlaceholder = JavaCompatibility.getClippedString( jc, fm, + (String) placeholder, c.getWidth() - insets.left - insets.right ); + FlatUIUtils.drawString( c, g, clippedPlaceholder, x, y ); } @Override From 66dab415393e178acecaab0853ca3ba9bfadf676 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 23 Dec 2020 10:52:42 +0100 Subject: [PATCH 086/178] properties: added spaces around '=' for easier reading --- .../formdev/flatlaf/FlatDarculaLaf.properties | 16 +- .../formdev/flatlaf/FlatDarkLaf.properties | 310 ++--- .../flatlaf/FlatIntelliJLaf.properties | 30 +- .../com/formdev/flatlaf/FlatLaf.properties | 1008 ++++++++--------- .../formdev/flatlaf/FlatLightLaf.properties | 322 +++--- .../flatlaf/IntelliJTheme$ThemeLaf.properties | 164 +-- .../flatlaf/resources/Bundle.properties | 68 +- .../flatlaf/resources/Bundle_de.properties | 52 +- .../flatlaf/resources/Bundle_fr.properties | 50 +- flatlaf-demo/DemoLaf.properties | 4 +- .../flatlaf/demo/FlatDarkLaf.properties | 2 +- .../flatlaf/demo/FlatLightLaf.properties | 2 +- .../flatlaf/jideoss/FlatLaf.properties | 22 +- .../flatlaf/swingx/FlatDarkLaf.properties | 62 +- .../formdev/flatlaf/swingx/FlatLaf.properties | 28 +- .../flatlaf/swingx/FlatLightLaf.properties | 62 +- .../flatlaf/testing/FlatTestLaf.properties | 400 +++---- .../customdefaults/FlatDarkLaf.properties | 2 +- .../testing/customdefaults/FlatLaf.properties | 4 +- .../customdefaults/FlatLightLaf.properties | 2 +- .../testing/jideoss/FlatTestLaf.properties | 4 +- .../testing/swingx/FlatTestLaf.properties | 66 +- .../theme-editor-test.properties | 78 +- 23 files changed, 1379 insertions(+), 1379 deletions(-) diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties index 210bb6c3..7c99659b 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties @@ -20,23 +20,23 @@ #---- Button ---- -Button.default.boldText=true +Button.default.boldText = true #---- Component ---- -Component.focusWidth=2 -Component.innerFocusWidth=0 -Component.innerOutlineWidth=0 -Component.arrowType=triangle +Component.focusWidth = 2 +Component.innerFocusWidth = 0 +Component.innerOutlineWidth = 0 +Component.arrowType = triangle #---- ProgressBar ---- -ProgressBar.foreground=#a0a0a0 -ProgressBar.selectionForeground=@background +ProgressBar.foreground = #a0a0a0 +ProgressBar.selectionForeground = @background #---- RadioButton ---- -RadioButton.icon.centerDiameter=5 +RadioButton.icon.centerDiameter = 5 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 333b4a7b..bdd60937 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -20,291 +20,291 @@ #---- variables ---- -@background=#3c3f41 -@foreground=#bbb -@selectionBackground=#4B6EAF -@selectionForeground=@foreground -@selectionInactiveBackground=#0D293E -@selectionInactiveForeground=@foreground -@disabledText=#888 -@textComponentBackground=#45494A -@menuBackground=darken(@background,5%) -@menuHoverBackground=lighten(@menuBackground,10%,derived) -@menuCheckBackground=darken(@selectionBackground,10%) -@menuAcceleratorForeground=darken(@foreground,15%) -@menuAcceleratorSelectionForeground=@selectionForeground -@cellFocusColor=#000 -@icon=#adadad +@background = #3c3f41 +@foreground = #bbb +@selectionBackground = #4B6EAF +@selectionForeground = @foreground +@selectionInactiveBackground = #0D293E +@selectionInactiveForeground = @foreground +@disabledText = #888 +@textComponentBackground = #45494A +@menuBackground = darken(@background,5%) +@menuHoverBackground = lighten(@menuBackground,10%,derived) +@menuCheckBackground = darken(@selectionBackground,10%) +@menuAcceleratorForeground = darken(@foreground,15%) +@menuAcceleratorSelectionForeground = @selectionForeground +@cellFocusColor = #000 +@icon = #adadad # Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors) -@dropCellBackground=darken(List.selectionBackground,10%,lazy) -@dropCellForeground=lazy(List.selectionForeground) -@dropLineColor=lighten(List.selectionBackground,10%,lazy) -@dropLineShortColor=lighten(List.selectionBackground,30%,lazy) +@dropCellBackground = darken(List.selectionBackground,10%,lazy) +@dropCellForeground = lazy(List.selectionForeground) +@dropLineColor = lighten(List.selectionBackground,10%,lazy) +@dropLineShortColor = lighten(List.selectionBackground,30%,lazy) #---- system colors ---- -activeCaption=#434E60 -inactiveCaption=#393C3D -controlHighlight=darken($controlShadow,20%) -controlLtHighlight=darken($controlShadow,25%) -controlDkShadow=lighten($controlShadow,10%) +activeCaption = #434E60 +inactiveCaption = #393C3D +controlHighlight = darken($controlShadow,20%) +controlLtHighlight = darken($controlShadow,25%) +controlDkShadow = lighten($controlShadow,10%) #---- Button ---- -Button.background=#4c5052 -Button.hoverBackground=lighten($Button.background,3%,derived) -Button.pressedBackground=lighten($Button.background,6%,derived) -Button.selectedBackground=lighten($Button.background,10%,derived) -Button.selectedForeground=@foreground -Button.disabledSelectedBackground=lighten($Button.background,3%,derived) +Button.background = #4c5052 +Button.hoverBackground = lighten($Button.background,3%,derived) +Button.pressedBackground = lighten($Button.background,6%,derived) +Button.selectedBackground = lighten($Button.background,10%,derived) +Button.selectedForeground = @foreground +Button.disabledSelectedBackground = lighten($Button.background,3%,derived) -Button.borderColor=#5e6060 -Button.disabledBorderColor=#5e6060 -Button.focusedBorderColor=#466d94 -Button.hoverBorderColor=$Button.focusedBorderColor +Button.borderColor = #5e6060 +Button.disabledBorderColor = #5e6060 +Button.focusedBorderColor = #466d94 +Button.hoverBorderColor = $Button.focusedBorderColor -Button.default.background=#365880 -Button.default.foreground=#bbb -Button.default.hoverBackground=lighten($Button.default.background,3%,derived) -Button.default.pressedBackground=lighten($Button.default.background,6%,derived) -Button.default.borderColor=#4c708c -Button.default.hoverBorderColor=#537699 -Button.default.focusedBorderColor=#537699 -Button.default.focusColor=#43688c -Button.default.boldText=true +Button.default.background = #365880 +Button.default.foreground = #bbb +Button.default.hoverBackground = lighten($Button.default.background,3%,derived) +Button.default.pressedBackground = lighten($Button.default.background,6%,derived) +Button.default.borderColor = #4c708c +Button.default.hoverBorderColor = #537699 +Button.default.focusedBorderColor = #537699 +Button.default.focusColor = #43688c +Button.default.boldText = true -Button.toolbar.hoverBackground=lighten($Button.background,1%,derived) -Button.toolbar.pressedBackground=lighten($Button.background,4%,derived) -Button.toolbar.selectedBackground=lighten($Button.background,7%,derived) +Button.toolbar.hoverBackground = lighten($Button.background,1%,derived) +Button.toolbar.pressedBackground = lighten($Button.background,4%,derived) +Button.toolbar.selectedBackground = lighten($Button.background,7%,derived) #---- CheckBox ---- # enabled -CheckBox.icon.borderColor=#6B6B6B -CheckBox.icon.background=#43494A -CheckBox.icon.selectedBorderColor=$CheckBox.icon.borderColor -CheckBox.icon.selectedBackground=$CheckBox.icon.background -CheckBox.icon.checkmarkColor=#A7A7A7 +CheckBox.icon.borderColor = #6B6B6B +CheckBox.icon.background = #43494A +CheckBox.icon.selectedBorderColor = $CheckBox.icon.borderColor +CheckBox.icon.selectedBackground = $CheckBox.icon.background +CheckBox.icon.checkmarkColor = #A7A7A7 # disabled -CheckBox.icon.disabledBorderColor=#545556 -CheckBox.icon.disabledBackground=@background -CheckBox.icon.disabledCheckmarkColor=#606060 +CheckBox.icon.disabledBorderColor = #545556 +CheckBox.icon.disabledBackground = @background +CheckBox.icon.disabledCheckmarkColor = #606060 # focused -CheckBox.icon.focusedBorderColor=#466D94 -CheckBox.icon.selectedFocusedBorderColor=#466D94 +CheckBox.icon.focusedBorderColor = #466D94 +CheckBox.icon.selectedFocusedBorderColor = #466D94 # hover -CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor -CheckBox.icon.hoverBackground=lighten($CheckBox.icon.background,3%,derived) +CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor +CheckBox.icon.hoverBackground = lighten($CheckBox.icon.background,3%,derived) # pressed -CheckBox.icon.pressedBackground=lighten($CheckBox.icon.background,6%,derived) +CheckBox.icon.pressedBackground = lighten($CheckBox.icon.background,6%,derived) -# used if CheckBox.icon.style=filled +# used if CheckBox.icon.style = filled # enabled -CheckBox.icon[filled].selectedBorderColor=$CheckBox.icon.checkmarkColor -CheckBox.icon[filled].selectedBackground=$CheckBox.icon.checkmarkColor -CheckBox.icon[filled].checkmarkColor=$CheckBox.icon.background +CheckBox.icon[filled].selectedBorderColor = $CheckBox.icon.checkmarkColor +CheckBox.icon[filled].selectedBackground = $CheckBox.icon.checkmarkColor +CheckBox.icon[filled].checkmarkColor = $CheckBox.icon.background # hover -CheckBox.icon[filled].selectedHoverBackground=darken($CheckBox.icon[filled].selectedBackground,3%) +CheckBox.icon[filled].selectedHoverBackground = darken($CheckBox.icon[filled].selectedBackground,3%) # pressed -CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].selectedBackground,6%) +CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,6%) #---- ComboBox ---- -ComboBox.buttonEditableBackground=#404445 -ComboBox.buttonArrowColor=#9A9DA1 -ComboBox.buttonDisabledArrowColor=darken($ComboBox.buttonArrowColor,25%) -ComboBox.buttonHoverArrowColor=lighten($ComboBox.buttonArrowColor,10%,derived noAutoInverse) -ComboBox.buttonPressedArrowColor=lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) +ComboBox.buttonEditableBackground = #404445 +ComboBox.buttonArrowColor = #9A9DA1 +ComboBox.buttonDisabledArrowColor = darken($ComboBox.buttonArrowColor,25%) +ComboBox.buttonHoverArrowColor = lighten($ComboBox.buttonArrowColor,10%,derived noAutoInverse) +ComboBox.buttonPressedArrowColor = lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) #---- Component ---- -Component.borderColor=#646464 -Component.disabledBorderColor=#646464 -Component.focusedBorderColor=#466d94 -Component.focusColor=#3d6185 -Component.linkColor=#589df6 -Component.grayFilter=-20,-70,100 +Component.borderColor = #646464 +Component.disabledBorderColor = #646464 +Component.focusedBorderColor = #466d94 +Component.focusColor = #3d6185 +Component.linkColor = #589df6 +Component.grayFilter = -20,-70,100 -Component.error.borderColor=desaturate($Component.error.focusedBorderColor,25%) -Component.error.focusedBorderColor=#8b3c3c -Component.warning.borderColor=darken(desaturate($Component.warning.focusedBorderColor,20%),10%) -Component.warning.focusedBorderColor=#ac7920 -Component.custom.borderColor=desaturate(#f00,50%,relative derived noAutoInverse) +Component.error.borderColor = desaturate($Component.error.focusedBorderColor,25%) +Component.error.focusedBorderColor = #8b3c3c +Component.warning.borderColor = darken(desaturate($Component.warning.focusedBorderColor,20%),10%) +Component.warning.focusedBorderColor = #ac7920 +Component.custom.borderColor = desaturate(#f00,50%,relative derived noAutoInverse) #---- Desktop ---- -Desktop.background=#3E434C +Desktop.background = #3E434C #---- DesktopIcon ---- -DesktopIcon.background=lighten($Desktop.background,10%) +DesktopIcon.background = lighten($Desktop.background,10%) #---- InternalFrame ---- -InternalFrame.activeTitleBackground=darken(@background,10%) -InternalFrame.activeTitleForeground=@foreground -InternalFrame.inactiveTitleBackground=darken(@background,5%) -InternalFrame.inactiveTitleForeground=@disabledText +InternalFrame.activeTitleBackground = darken(@background,10%) +InternalFrame.activeTitleForeground = @foreground +InternalFrame.inactiveTitleBackground = darken(@background,5%) +InternalFrame.inactiveTitleForeground = @disabledText -InternalFrame.activeBorderColor=darken(@background,7%) -InternalFrame.inactiveBorderColor=darken(@background,3%) +InternalFrame.activeBorderColor = darken(@background,7%) +InternalFrame.inactiveBorderColor = darken(@background,3%) -InternalFrame.buttonHoverBackground=lighten($InternalFrame.activeTitleBackground,10%,derived) -InternalFrame.buttonPressedBackground=lighten($InternalFrame.activeTitleBackground,20%,derived) -InternalFrame.closeHoverBackground=lazy(Actions.Red) -InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy) -InternalFrame.closeHoverForeground=#fff -InternalFrame.closePressedForeground=#fff +InternalFrame.buttonHoverBackground = lighten($InternalFrame.activeTitleBackground,10%,derived) +InternalFrame.buttonPressedBackground = lighten($InternalFrame.activeTitleBackground,20%,derived) +InternalFrame.closeHoverBackground = lazy(Actions.Red) +InternalFrame.closePressedBackground = darken(Actions.Red,10%,lazy) +InternalFrame.closeHoverForeground = #fff +InternalFrame.closePressedForeground = #fff -InternalFrame.activeDropShadowOpacity=0.5 -InternalFrame.inactiveDropShadowOpacity=0.75 +InternalFrame.activeDropShadowOpacity = 0.5 +InternalFrame.inactiveDropShadowOpacity = 0.75 #---- Menu ---- -Menu.icon.arrowColor=#A7A7A7 -Menu.icon.disabledArrowColor=#606060 +Menu.icon.arrowColor = #A7A7A7 +Menu.icon.disabledArrowColor = #606060 #---- MenuBar ---- -MenuBar.borderColor=#515151 +MenuBar.borderColor = #515151 #---- MenuItemCheckBox ---- -MenuItemCheckBox.icon.checkmarkColor=#A7A7A7 -MenuItemCheckBox.icon.disabledCheckmarkColor=#606060 +MenuItemCheckBox.icon.checkmarkColor = #A7A7A7 +MenuItemCheckBox.icon.disabledCheckmarkColor = #606060 #---- PasswordField ---- -PasswordField.capsLockIconColor=#ffffff64 +PasswordField.capsLockIconColor = #ffffff64 #---- Popup ---- -Popup.dropShadowColor=#000 -Popup.dropShadowOpacity=0.25 +Popup.dropShadowColor = #000 +Popup.dropShadowOpacity = 0.25 #---- PopupMenu ---- -PopupMenu.borderColor=#5e5e5e +PopupMenu.borderColor = #5e5e5e #---- ProgressBar ---- -ProgressBar.background=#555 -ProgressBar.foreground=#4A88C7 -ProgressBar.selectionForeground=@foreground -ProgressBar.selectionBackground=@foreground +ProgressBar.background = #555 +ProgressBar.foreground = #4A88C7 +ProgressBar.selectionForeground = @foreground +ProgressBar.selectionBackground = @foreground #---- RootPane ---- -RootPane.activeBorderColor=darken(@background,7%,derived) -RootPane.inactiveBorderColor=darken(@background,5%,derived) +RootPane.activeBorderColor = darken(@background,7%,derived) +RootPane.inactiveBorderColor = darken(@background,5%,derived) #---- ScrollBar ---- -ScrollBar.track=lighten(@background,1%,derived noAutoInverse) -ScrollBar.thumb=lighten($ScrollBar.track,10%,derived noAutoInverse) -ScrollBar.hoverTrackColor=lighten($ScrollBar.track,4%,derived noAutoInverse) -ScrollBar.hoverThumbColor=lighten($ScrollBar.thumb,10%,derived noAutoInverse) -ScrollBar.pressedThumbColor=lighten($ScrollBar.thumb,15%,derived noAutoInverse) -ScrollBar.hoverButtonBackground=lighten(@background,5%,derived noAutoInverse) -ScrollBar.pressedButtonBackground=lighten(@background,10%,derived noAutoInverse) +ScrollBar.track = lighten(@background,1%,derived noAutoInverse) +ScrollBar.thumb = lighten($ScrollBar.track,10%,derived noAutoInverse) +ScrollBar.hoverTrackColor = lighten($ScrollBar.track,4%,derived noAutoInverse) +ScrollBar.hoverThumbColor = lighten($ScrollBar.thumb,10%,derived noAutoInverse) +ScrollBar.pressedThumbColor = lighten($ScrollBar.thumb,15%,derived noAutoInverse) +ScrollBar.hoverButtonBackground = lighten(@background,5%,derived noAutoInverse) +ScrollBar.pressedButtonBackground = lighten(@background,10%,derived noAutoInverse) #---- Separator ---- -Separator.foreground=#515151 +Separator.foreground = #515151 #---- Slider ---- -Slider.trackValueColor=#4A88C7 -Slider.trackColor=#646464 -Slider.thumbColor=$Slider.trackValueColor -Slider.tickColor=#888 -Slider.focusedColor=fade($Component.focusColor,70%,derived) -Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived) -Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived) -Slider.disabledTrackColor=#4c5052 -Slider.disabledThumbColor=$Slider.disabledTrackColor +Slider.trackValueColor = #4A88C7 +Slider.trackColor = #646464 +Slider.thumbColor = $Slider.trackValueColor +Slider.tickColor = #888 +Slider.focusedColor = fade($Component.focusColor,70%,derived) +Slider.hoverThumbColor = darken($Slider.thumbColor,10%,derived) +Slider.pressedThumbColor = darken($Slider.thumbColor,15%,derived) +Slider.disabledTrackColor = #4c5052 +Slider.disabledThumbColor = $Slider.disabledTrackColor #---- SplitPane ---- -SplitPaneDivider.draggingColor=#646464 +SplitPaneDivider.draggingColor = #646464 #---- TabbedPane ---- -TabbedPane.underlineColor=#4A88C7 -TabbedPane.disabledUnderlineColor=#7a7a7a -TabbedPane.hoverColor=darken($TabbedPane.background,5%,derived noAutoInverse) -TabbedPane.focusColor=#3d4b5c -TabbedPane.contentAreaColor=#646464 +TabbedPane.underlineColor = #4A88C7 +TabbedPane.disabledUnderlineColor = #7a7a7a +TabbedPane.hoverColor = darken($TabbedPane.background,5%,derived noAutoInverse) +TabbedPane.focusColor = #3d4b5c +TabbedPane.contentAreaColor = #646464 -TabbedPane.buttonHoverBackground=darken($TabbedPane.background,5%,derived noAutoInverse) -TabbedPane.buttonPressedBackground=darken($TabbedPane.background,8%,derived noAutoInverse) +TabbedPane.buttonHoverBackground = darken($TabbedPane.background,5%,derived noAutoInverse) +TabbedPane.buttonPressedBackground = darken($TabbedPane.background,8%,derived noAutoInverse) -TabbedPane.closeBackground=null -TabbedPane.closeForeground=@disabledText -TabbedPane.closeHoverBackground=lighten($TabbedPane.background,5%,derived) -TabbedPane.closeHoverForeground=@foreground -TabbedPane.closePressedBackground=lighten($TabbedPane.background,10%,derived) -TabbedPane.closePressedForeground=$TabbedPane.closeHoverForeground +TabbedPane.closeBackground = null +TabbedPane.closeForeground = @disabledText +TabbedPane.closeHoverBackground = lighten($TabbedPane.background,5%,derived) +TabbedPane.closeHoverForeground = @foreground +TabbedPane.closePressedBackground = lighten($TabbedPane.background,10%,derived) +TabbedPane.closePressedForeground = $TabbedPane.closeHoverForeground #---- Table ---- -Table.gridColor=lighten($Table.background,5%) +Table.gridColor = lighten($Table.background,5%) #---- TableHeader ---- -TableHeader.separatorColor=lighten($TableHeader.background,10%) -TableHeader.bottomSeparatorColor=$TableHeader.separatorColor +TableHeader.separatorColor = lighten($TableHeader.background,10%) +TableHeader.bottomSeparatorColor = $TableHeader.separatorColor #---- TitlePane ---- -TitlePane.embeddedForeground=darken($TitlePane.foreground,15%) -TitlePane.buttonHoverBackground=lighten($TitlePane.background,10%,derived) -TitlePane.buttonPressedBackground=lighten($TitlePane.background,20%,derived) +TitlePane.embeddedForeground = darken($TitlePane.foreground,15%) +TitlePane.buttonHoverBackground = lighten($TitlePane.background,10%,derived) +TitlePane.buttonPressedBackground = lighten($TitlePane.background,20%,derived) #---- ToggleButton ---- -ToggleButton.selectedBackground=lighten($ToggleButton.background,10%,derived) -ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,3%,derived) +ToggleButton.selectedBackground = lighten($ToggleButton.background,10%,derived) +ToggleButton.disabledSelectedBackground = lighten($ToggleButton.background,3%,derived) -ToggleButton.toolbar.selectedBackground=lighten($ToggleButton.background,7%,derived) +ToggleButton.toolbar.selectedBackground = lighten($ToggleButton.background,7%,derived) #---- ToolTip ---- -ToolTip.border=4,6,4,6 -ToolTip.background=#1e2123 +ToolTip.border = 4,6,4,6 +ToolTip.background = #1e2123 #---- Tree ---- -Tree.hash=#505355 +Tree.hash = #505355 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties index ccbb305b..cafd75bf 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties @@ -20,27 +20,27 @@ #---- Button ---- -Button.focusedBackground=null +Button.focusedBackground = null -Button.default.background=#4D8AC9 -Button.default.foreground=#fff -Button.default.focusedBackground=null -Button.default.borderColor=#3D75B2 -Button.default.hoverBorderColor=#A9C9F5 -Button.default.focusedBorderColor=#A9C9F5 -Button.default.focusColor=#97c3f3 -Button.default.boldText=true -Button.default.borderWidth=1 +Button.default.background = #4D8AC9 +Button.default.foreground = #fff +Button.default.focusedBackground = null +Button.default.borderColor = #3D75B2 +Button.default.hoverBorderColor = #A9C9F5 +Button.default.focusedBorderColor = #A9C9F5 +Button.default.focusColor = #97c3f3 +Button.default.boldText = true +Button.default.borderWidth = 1 #---- CheckBox ---- -CheckBox.icon.style=filled +CheckBox.icon.style = filled #---- Component ---- -Component.focusWidth=2 -Component.innerFocusWidth=0 -Component.innerOutlineWidth=0 -Component.arrowType=triangle +Component.focusWidth = 2 +Component.innerFocusWidth = 0 +Component.innerOutlineWidth = 0 +Component.arrowType = triangle 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 f788129a..e052def2 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -16,96 +16,96 @@ #---- UI delegates ---- -ButtonUI=com.formdev.flatlaf.ui.FlatButtonUI -CheckBoxUI=com.formdev.flatlaf.ui.FlatCheckBoxUI -CheckBoxMenuItemUI=com.formdev.flatlaf.ui.FlatCheckBoxMenuItemUI -ColorChooserUI=com.formdev.flatlaf.ui.FlatColorChooserUI -ComboBoxUI=com.formdev.flatlaf.ui.FlatComboBoxUI -DesktopIconUI=com.formdev.flatlaf.ui.FlatDesktopIconUI -DesktopPaneUI=com.formdev.flatlaf.ui.FlatDesktopPaneUI -EditorPaneUI=com.formdev.flatlaf.ui.FlatEditorPaneUI -FileChooserUI=com.formdev.flatlaf.ui.FlatFileChooserUI -FormattedTextFieldUI=com.formdev.flatlaf.ui.FlatFormattedTextFieldUI -InternalFrameUI=com.formdev.flatlaf.ui.FlatInternalFrameUI -LabelUI=com.formdev.flatlaf.ui.FlatLabelUI -ListUI=com.formdev.flatlaf.ui.FlatListUI -MenuUI=com.formdev.flatlaf.ui.FlatMenuUI -MenuBarUI=com.formdev.flatlaf.ui.FlatMenuBarUI -MenuItemUI=com.formdev.flatlaf.ui.FlatMenuItemUI -OptionPaneUI=com.formdev.flatlaf.ui.FlatOptionPaneUI -PanelUI=com.formdev.flatlaf.ui.FlatPanelUI -PasswordFieldUI=com.formdev.flatlaf.ui.FlatPasswordFieldUI -PopupMenuUI=com.formdev.flatlaf.ui.FlatPopupMenuUI -PopupMenuSeparatorUI=com.formdev.flatlaf.ui.FlatPopupMenuSeparatorUI -ProgressBarUI=com.formdev.flatlaf.ui.FlatProgressBarUI -RadioButtonUI=com.formdev.flatlaf.ui.FlatRadioButtonUI -RadioButtonMenuItemUI=com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI -RootPaneUI=com.formdev.flatlaf.ui.FlatRootPaneUI -ScrollBarUI=com.formdev.flatlaf.ui.FlatScrollBarUI -ScrollPaneUI=com.formdev.flatlaf.ui.FlatScrollPaneUI -SeparatorUI=com.formdev.flatlaf.ui.FlatSeparatorUI -SliderUI=com.formdev.flatlaf.ui.FlatSliderUI -SpinnerUI=com.formdev.flatlaf.ui.FlatSpinnerUI -SplitPaneUI=com.formdev.flatlaf.ui.FlatSplitPaneUI -TabbedPaneUI=com.formdev.flatlaf.ui.FlatTabbedPaneUI -TableUI=com.formdev.flatlaf.ui.FlatTableUI -TableHeaderUI=com.formdev.flatlaf.ui.FlatTableHeaderUI -TextAreaUI=com.formdev.flatlaf.ui.FlatTextAreaUI -TextFieldUI=com.formdev.flatlaf.ui.FlatTextFieldUI -TextPaneUI=com.formdev.flatlaf.ui.FlatTextPaneUI -ToggleButtonUI=com.formdev.flatlaf.ui.FlatToggleButtonUI -ToolBarUI=com.formdev.flatlaf.ui.FlatToolBarUI -ToolBarSeparatorUI=com.formdev.flatlaf.ui.FlatToolBarSeparatorUI -ToolTipUI=com.formdev.flatlaf.ui.FlatToolTipUI -TreeUI=com.formdev.flatlaf.ui.FlatTreeUI -ViewportUI=com.formdev.flatlaf.ui.FlatViewportUI +ButtonUI = com.formdev.flatlaf.ui.FlatButtonUI +CheckBoxUI = com.formdev.flatlaf.ui.FlatCheckBoxUI +CheckBoxMenuItemUI = com.formdev.flatlaf.ui.FlatCheckBoxMenuItemUI +ColorChooserUI = com.formdev.flatlaf.ui.FlatColorChooserUI +ComboBoxUI = com.formdev.flatlaf.ui.FlatComboBoxUI +DesktopIconUI = com.formdev.flatlaf.ui.FlatDesktopIconUI +DesktopPaneUI = com.formdev.flatlaf.ui.FlatDesktopPaneUI +EditorPaneUI = com.formdev.flatlaf.ui.FlatEditorPaneUI +FileChooserUI = com.formdev.flatlaf.ui.FlatFileChooserUI +FormattedTextFieldUI = com.formdev.flatlaf.ui.FlatFormattedTextFieldUI +InternalFrameUI = com.formdev.flatlaf.ui.FlatInternalFrameUI +LabelUI = com.formdev.flatlaf.ui.FlatLabelUI +ListUI = com.formdev.flatlaf.ui.FlatListUI +MenuUI = com.formdev.flatlaf.ui.FlatMenuUI +MenuBarUI = com.formdev.flatlaf.ui.FlatMenuBarUI +MenuItemUI = com.formdev.flatlaf.ui.FlatMenuItemUI +OptionPaneUI = com.formdev.flatlaf.ui.FlatOptionPaneUI +PanelUI = com.formdev.flatlaf.ui.FlatPanelUI +PasswordFieldUI = com.formdev.flatlaf.ui.FlatPasswordFieldUI +PopupMenuUI = com.formdev.flatlaf.ui.FlatPopupMenuUI +PopupMenuSeparatorUI = com.formdev.flatlaf.ui.FlatPopupMenuSeparatorUI +ProgressBarUI = com.formdev.flatlaf.ui.FlatProgressBarUI +RadioButtonUI = com.formdev.flatlaf.ui.FlatRadioButtonUI +RadioButtonMenuItemUI = com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI +RootPaneUI = com.formdev.flatlaf.ui.FlatRootPaneUI +ScrollBarUI = com.formdev.flatlaf.ui.FlatScrollBarUI +ScrollPaneUI = com.formdev.flatlaf.ui.FlatScrollPaneUI +SeparatorUI = com.formdev.flatlaf.ui.FlatSeparatorUI +SliderUI = com.formdev.flatlaf.ui.FlatSliderUI +SpinnerUI = com.formdev.flatlaf.ui.FlatSpinnerUI +SplitPaneUI = com.formdev.flatlaf.ui.FlatSplitPaneUI +TabbedPaneUI = com.formdev.flatlaf.ui.FlatTabbedPaneUI +TableUI = com.formdev.flatlaf.ui.FlatTableUI +TableHeaderUI = com.formdev.flatlaf.ui.FlatTableHeaderUI +TextAreaUI = com.formdev.flatlaf.ui.FlatTextAreaUI +TextFieldUI = com.formdev.flatlaf.ui.FlatTextFieldUI +TextPaneUI = com.formdev.flatlaf.ui.FlatTextPaneUI +ToggleButtonUI = com.formdev.flatlaf.ui.FlatToggleButtonUI +ToolBarUI = com.formdev.flatlaf.ui.FlatToolBarUI +ToolBarSeparatorUI = com.formdev.flatlaf.ui.FlatToolBarSeparatorUI +ToolTipUI = com.formdev.flatlaf.ui.FlatToolTipUI +TreeUI = com.formdev.flatlaf.ui.FlatTreeUI +ViewportUI = com.formdev.flatlaf.ui.FlatViewportUI #---- variables ---- -@textComponentMargin=2,6,2,6 -@menuItemMargin=3,6,3,6 +@textComponentMargin = 2,6,2,6 +@menuItemMargin = 3,6,3,6 #---- globals ---- -*.background=@background -*.foreground=@foreground -*.caretForeground=@foreground -*.inactiveBackground=@background -*.inactiveForeground=@disabledText -*.selectionBackground=@selectionBackground -*.selectionForeground=@selectionForeground -*.disabledBackground=@background -*.disabledForeground=@disabledText -*.disabledText=@disabledText -*.acceleratorForeground=@menuAcceleratorForeground -*.acceleratorSelectionForeground=@menuAcceleratorSelectionForeground +*.background = @background +*.foreground = @foreground +*.caretForeground = @foreground +*.inactiveBackground = @background +*.inactiveForeground = @disabledText +*.selectionBackground = @selectionBackground +*.selectionForeground = @selectionForeground +*.disabledBackground = @background +*.disabledForeground = @disabledText +*.disabledText = @disabledText +*.acceleratorForeground = @menuAcceleratorForeground +*.acceleratorSelectionForeground = @menuAcceleratorSelectionForeground #---- system colors ---- -desktop=@textComponentBackground -activeCaptionText=@foreground -activeCaptionBorder=$activeCaption -inactiveCaptionText=@foreground -inactiveCaptionBorder=$inactiveCaption -window=@background -windowBorder=@foreground -windowText=@foreground -menu=@background -menuText=@foreground -text=@textComponentBackground -textText=@foreground -textHighlight=@selectionBackground -textHighlightText=@selectionForeground -textInactiveText=@disabledText -control=@background -controlText=@foreground -controlShadow=$Component.borderColor -scrollbar=$ScrollBar.track -info=$ToolTip.background -infoText=@foreground +desktop = @textComponentBackground +activeCaptionText = @foreground +activeCaptionBorder = $activeCaption +inactiveCaptionText = @foreground +inactiveCaptionBorder = $inactiveCaption +window = @background +windowBorder = @foreground +windowText = @foreground +menu = @background +menuText = @foreground +text = @textComponentBackground +textText = @foreground +textHighlight = @selectionBackground +textHighlightText = @selectionForeground +textInactiveText = @disabledText +control = @background +controlText = @foreground +controlShadow = $Component.borderColor +scrollbar = $ScrollBar.track +info = $ToolTip.background +infoText = @foreground #---- unused colors ---- @@ -113,660 +113,660 @@ infoText=@foreground # Colors that are defined in BasicLookAndFeel but are not used in FlatLaf. # Keep them for compatibility (if used in 3rd party app) and give them useful values. -*.shadow=$controlShadow -*.darkShadow=$controlDkShadow -*.light=$controlHighlight -*.highlight=$controlLtHighlight +*.shadow = $controlShadow +*.darkShadow = $controlDkShadow +*.light = $controlHighlight +*.highlight = $controlLtHighlight -ComboBox.buttonShadow=$controlShadow -ComboBox.buttonDarkShadow=$controlDkShadow -ComboBox.buttonHighlight=$controlLtHighlight +ComboBox.buttonShadow = $controlShadow +ComboBox.buttonDarkShadow = $controlDkShadow +ComboBox.buttonHighlight = $controlLtHighlight -InternalFrame.borderColor=$control -InternalFrame.borderShadow=$controlShadow -InternalFrame.borderDarkShadow=$controlDkShadow -InternalFrame.borderHighlight=$controlLtHighlight -InternalFrame.borderLight=$controlHighlight +InternalFrame.borderColor = $control +InternalFrame.borderShadow = $controlShadow +InternalFrame.borderDarkShadow = $controlDkShadow +InternalFrame.borderHighlight = $controlLtHighlight +InternalFrame.borderLight = $controlHighlight -Label.disabledShadow=$controlShadow +Label.disabledShadow = $controlShadow -ScrollBar.trackHighlight=$controlDkShadow -ScrollBar.thumbHighlight=$controlLtHighlight -ScrollBar.thumbDarkShadow=$controlDkShadow -ScrollBar.thumbShadow=$controlShadow +ScrollBar.trackHighlight = $controlDkShadow +ScrollBar.thumbHighlight = $controlLtHighlight +ScrollBar.thumbDarkShadow = $controlDkShadow +ScrollBar.thumbShadow = $controlShadow -Slider.focus=$controlDkShadow +Slider.focus = $controlDkShadow -TabbedPane.focus=$controlText +TabbedPane.focus = $controlText #---- Button ---- -Button.border=com.formdev.flatlaf.ui.FlatButtonBorder -Button.arc=6 -Button.minimumWidth=72 -Button.margin=2,14,2,14 -Button.iconTextGap=4 -Button.rollover=true -Button.defaultButtonFollowsFocus=false -[win]Button.defaultButtonFollowsFocus=true +Button.border = com.formdev.flatlaf.ui.FlatButtonBorder +Button.arc = 6 +Button.minimumWidth = 72 +Button.margin = 2,14,2,14 +Button.iconTextGap = 4 +Button.rollover = true +Button.defaultButtonFollowsFocus = false +[win]Button.defaultButtonFollowsFocus = true -Button.borderWidth=1 -Button.default.borderWidth=1 +Button.borderWidth = 1 +Button.default.borderWidth = 1 -Button.toolbar.margin=3,3,3,3 -Button.toolbar.spacingInsets=1,2,1,2 +Button.toolbar.margin = 3,3,3,3 +Button.toolbar.spacingInsets = 1,2,1,2 #---- Caret ---- -Caret.width={scaledInteger}1 +Caret.width = {scaledInteger}1 #---- CheckBox ---- -CheckBox.border=com.formdev.flatlaf.ui.FlatMarginBorder -CheckBox.icon=com.formdev.flatlaf.icons.FlatCheckBoxIcon -CheckBox.arc=4 -CheckBox.margin=2,2,2,2 -CheckBox.iconTextGap=4 -CheckBox.rollover=true +CheckBox.border = com.formdev.flatlaf.ui.FlatMarginBorder +CheckBox.icon = com.formdev.flatlaf.icons.FlatCheckBoxIcon +CheckBox.arc = 4 +CheckBox.margin = 2,2,2,2 +CheckBox.iconTextGap = 4 +CheckBox.rollover = true #---- CheckBoxMenuItem ---- -CheckBoxMenuItem.border=com.formdev.flatlaf.ui.FlatMenuItemBorder -CheckBoxMenuItem.checkIcon=com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon -CheckBoxMenuItem.arrowIcon=com.formdev.flatlaf.icons.FlatMenuItemArrowIcon -CheckBoxMenuItem.margin=@menuItemMargin -CheckBoxMenuItem.opaque=false -CheckBoxMenuItem.borderPainted=true -CheckBoxMenuItem.background=@menuBackground +CheckBoxMenuItem.border = com.formdev.flatlaf.ui.FlatMenuItemBorder +CheckBoxMenuItem.checkIcon = com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon +CheckBoxMenuItem.arrowIcon = com.formdev.flatlaf.icons.FlatMenuItemArrowIcon +CheckBoxMenuItem.margin = @menuItemMargin +CheckBoxMenuItem.opaque = false +CheckBoxMenuItem.borderPainted = true +CheckBoxMenuItem.background = @menuBackground #---- ColorChooser ---- -ColorChooser.swatchesSwatchSize={scaledDimension}16,16 -ColorChooser.swatchesRecentSwatchSize={scaledDimension}16,16 -ColorChooser.swatchesDefaultRecentColor=$control +ColorChooser.swatchesSwatchSize = {scaledDimension}16,16 +ColorChooser.swatchesRecentSwatchSize = {scaledDimension}16,16 +ColorChooser.swatchesDefaultRecentColor = $control #---- ComboBox ---- -ComboBox.border=com.formdev.flatlaf.ui.FlatRoundBorder -ComboBox.padding=2,6,2,6 -ComboBox.minimumWidth=72 -ComboBox.editorColumns=0 -ComboBox.maximumRowCount=15 -[mac]ComboBox.showPopupOnNavigation=true +ComboBox.border = com.formdev.flatlaf.ui.FlatRoundBorder +ComboBox.padding = 2,6,2,6 +ComboBox.minimumWidth = 72 +ComboBox.editorColumns = 0 +ComboBox.maximumRowCount = 15 +[mac]ComboBox.showPopupOnNavigation = true # allowed values: auto, button or none -ComboBox.buttonStyle=auto -ComboBox.background=@textComponentBackground -ComboBox.buttonBackground=@textComponentBackground +ComboBox.buttonStyle = auto +ComboBox.background = @textComponentBackground +ComboBox.buttonBackground = @textComponentBackground #---- Component ---- -Component.focusWidth=0 -Component.innerFocusWidth={float}0.5 -Component.innerOutlineWidth={float}1 -Component.arc=5 -Component.minimumWidth=64 +Component.focusWidth = 0 +Component.innerFocusWidth = {float}0.5 +Component.innerOutlineWidth = {float}1 +Component.arc = 5 +Component.minimumWidth = 64 # allowed values: chevron or triangle -Component.arrowType=chevron -Component.hideMnemonics=true +Component.arrowType = chevron +Component.hideMnemonics = true #---- DesktopIcon ---- -DesktopIcon.border=4,4,4,4 -DesktopIcon.iconSize=64,64 -DesktopIcon.closeSize=20,20 -DesktopIcon.closeIcon=com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon +DesktopIcon.border = 4,4,4,4 +DesktopIcon.iconSize = 64,64 +DesktopIcon.closeSize = 20,20 +DesktopIcon.closeIcon = com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon #---- EditorPane ---- -EditorPane.border=com.formdev.flatlaf.ui.FlatMarginBorder -EditorPane.margin=@textComponentMargin -EditorPane.background=@textComponentBackground +EditorPane.border = com.formdev.flatlaf.ui.FlatMarginBorder +EditorPane.margin = @textComponentMargin +EditorPane.background = @textComponentBackground #---- FileChooser ---- -FileChooser.newFolderIcon=com.formdev.flatlaf.icons.FlatFileChooserNewFolderIcon -FileChooser.upFolderIcon=com.formdev.flatlaf.icons.FlatFileChooserUpFolderIcon -FileChooser.homeFolderIcon=com.formdev.flatlaf.icons.FlatFileChooserHomeFolderIcon -FileChooser.detailsViewIcon=com.formdev.flatlaf.icons.FlatFileChooserDetailsViewIcon -FileChooser.listViewIcon=com.formdev.flatlaf.icons.FlatFileChooserListViewIcon -FileChooser.usesSingleFilePane=true -[win]FileChooser.useSystemExtensionHiding=true +FileChooser.newFolderIcon = com.formdev.flatlaf.icons.FlatFileChooserNewFolderIcon +FileChooser.upFolderIcon = com.formdev.flatlaf.icons.FlatFileChooserUpFolderIcon +FileChooser.homeFolderIcon = com.formdev.flatlaf.icons.FlatFileChooserHomeFolderIcon +FileChooser.detailsViewIcon = com.formdev.flatlaf.icons.FlatFileChooserDetailsViewIcon +FileChooser.listViewIcon = com.formdev.flatlaf.icons.FlatFileChooserListViewIcon +FileChooser.usesSingleFilePane = true +[win]FileChooser.useSystemExtensionHiding = true #---- FileView ---- -FileView.directoryIcon=com.formdev.flatlaf.icons.FlatFileViewDirectoryIcon -FileView.fileIcon=com.formdev.flatlaf.icons.FlatFileViewFileIcon -FileView.computerIcon=com.formdev.flatlaf.icons.FlatFileViewComputerIcon -FileView.hardDriveIcon=com.formdev.flatlaf.icons.FlatFileViewHardDriveIcon -FileView.floppyDriveIcon=com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon +FileView.directoryIcon = com.formdev.flatlaf.icons.FlatFileViewDirectoryIcon +FileView.fileIcon = com.formdev.flatlaf.icons.FlatFileViewFileIcon +FileView.computerIcon = com.formdev.flatlaf.icons.FlatFileViewComputerIcon +FileView.hardDriveIcon = com.formdev.flatlaf.icons.FlatFileViewHardDriveIcon +FileView.floppyDriveIcon = com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon #---- FormattedTextField ---- -FormattedTextField.border=com.formdev.flatlaf.ui.FlatTextBorder -FormattedTextField.margin=@textComponentMargin -FormattedTextField.background=@textComponentBackground -FormattedTextField.placeholderForeground=@disabledText +FormattedTextField.border = com.formdev.flatlaf.ui.FlatTextBorder +FormattedTextField.margin = @textComponentMargin +FormattedTextField.background = @textComponentBackground +FormattedTextField.placeholderForeground = @disabledText #---- HelpButton ---- -HelpButton.icon=com.formdev.flatlaf.icons.FlatHelpButtonIcon -HelpButton.borderColor=$CheckBox.icon.borderColor -HelpButton.disabledBorderColor=$CheckBox.icon.disabledBorderColor -HelpButton.focusedBorderColor=$CheckBox.icon.focusedBorderColor -HelpButton.hoverBorderColor=$?CheckBox.icon.hoverBorderColor -HelpButton.background=$CheckBox.icon.background -HelpButton.disabledBackground=$CheckBox.icon.disabledBackground -HelpButton.focusedBackground=$?CheckBox.icon.focusedBackground -HelpButton.hoverBackground=$?CheckBox.icon.hoverBackground -HelpButton.pressedBackground=$?CheckBox.icon.pressedBackground -HelpButton.questionMarkColor=$CheckBox.icon.checkmarkColor -HelpButton.disabledQuestionMarkColor=$CheckBox.icon.disabledCheckmarkColor +HelpButton.icon = com.formdev.flatlaf.icons.FlatHelpButtonIcon +HelpButton.borderColor = $CheckBox.icon.borderColor +HelpButton.disabledBorderColor = $CheckBox.icon.disabledBorderColor +HelpButton.focusedBorderColor = $CheckBox.icon.focusedBorderColor +HelpButton.hoverBorderColor = $?CheckBox.icon.hoverBorderColor +HelpButton.background = $CheckBox.icon.background +HelpButton.disabledBackground = $CheckBox.icon.disabledBackground +HelpButton.focusedBackground = $?CheckBox.icon.focusedBackground +HelpButton.hoverBackground = $?CheckBox.icon.hoverBackground +HelpButton.pressedBackground = $?CheckBox.icon.pressedBackground +HelpButton.questionMarkColor = $CheckBox.icon.checkmarkColor +HelpButton.disabledQuestionMarkColor = $CheckBox.icon.disabledCheckmarkColor #---- InternalFrame ---- -InternalFrame.border=com.formdev.flatlaf.ui.FlatInternalFrameUI$FlatInternalFrameBorder -InternalFrame.borderLineWidth=1 -InternalFrame.borderMargins=6,6,6,6 -InternalFrame.buttonSize=24,24 -InternalFrame.closeIcon=com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon -InternalFrame.iconifyIcon=com.formdev.flatlaf.icons.FlatInternalFrameIconifyIcon -InternalFrame.maximizeIcon=com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon -InternalFrame.minimizeIcon=com.formdev.flatlaf.icons.FlatInternalFrameRestoreIcon -InternalFrame.windowBindings=null +InternalFrame.border = com.formdev.flatlaf.ui.FlatInternalFrameUI$FlatInternalFrameBorder +InternalFrame.borderLineWidth = 1 +InternalFrame.borderMargins = 6,6,6,6 +InternalFrame.buttonSize = 24,24 +InternalFrame.closeIcon = com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon +InternalFrame.iconifyIcon = com.formdev.flatlaf.icons.FlatInternalFrameIconifyIcon +InternalFrame.maximizeIcon = com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon +InternalFrame.minimizeIcon = com.formdev.flatlaf.icons.FlatInternalFrameRestoreIcon +InternalFrame.windowBindings = null # drop shadow -InternalFrame.dropShadowPainted=true -InternalFrame.activeDropShadowColor=null -InternalFrame.activeDropShadowInsets=5,5,6,6 -InternalFrame.inactiveDropShadowColor=null -InternalFrame.inactiveDropShadowInsets=3,3,4,4 +InternalFrame.dropShadowPainted = true +InternalFrame.activeDropShadowColor = null +InternalFrame.activeDropShadowInsets = 5,5,6,6 +InternalFrame.inactiveDropShadowColor = null +InternalFrame.inactiveDropShadowInsets = 3,3,4,4 #---- InternalFrameTitlePane ---- -InternalFrameTitlePane.border=0,8,0,0 +InternalFrameTitlePane.border = 0,8,0,0 #---- List ---- -List.border=0,0,0,0 -List.cellMargins=1,6,1,6 -List.cellFocusColor=@cellFocusColor -List.cellNoFocusBorder=com.formdev.flatlaf.ui.FlatListCellBorder$Default -List.focusCellHighlightBorder=com.formdev.flatlaf.ui.FlatListCellBorder$Focused -List.focusSelectedCellHighlightBorder=com.formdev.flatlaf.ui.FlatListCellBorder$Selected -List.background=@textComponentBackground -List.selectionInactiveBackground=@selectionInactiveBackground -List.selectionInactiveForeground=@selectionInactiveForeground -List.dropCellBackground=@dropCellBackground -List.dropCellForeground=@dropCellForeground -List.dropLineColor=@dropLineColor -List.showCellFocusIndicator=false +List.border = 0,0,0,0 +List.cellMargins = 1,6,1,6 +List.cellFocusColor = @cellFocusColor +List.cellNoFocusBorder = com.formdev.flatlaf.ui.FlatListCellBorder$Default +List.focusCellHighlightBorder = com.formdev.flatlaf.ui.FlatListCellBorder$Focused +List.focusSelectedCellHighlightBorder = com.formdev.flatlaf.ui.FlatListCellBorder$Selected +List.background = @textComponentBackground +List.selectionInactiveBackground = @selectionInactiveBackground +List.selectionInactiveForeground = @selectionInactiveForeground +List.dropCellBackground = @dropCellBackground +List.dropCellForeground = @dropCellForeground +List.dropLineColor = @dropLineColor +List.showCellFocusIndicator = false #---- Menu ---- -Menu.border=com.formdev.flatlaf.ui.FlatMenuItemBorder -Menu.arrowIcon=com.formdev.flatlaf.icons.FlatMenuArrowIcon -Menu.checkIcon=null -Menu.margin=@menuItemMargin -Menu.submenuPopupOffsetX={scaledInteger}-4 -Menu.submenuPopupOffsetY={scaledInteger}-4 -Menu.opaque=false -Menu.borderPainted=true -Menu.background=@menuBackground +Menu.border = com.formdev.flatlaf.ui.FlatMenuItemBorder +Menu.arrowIcon = com.formdev.flatlaf.icons.FlatMenuArrowIcon +Menu.checkIcon = null +Menu.margin = @menuItemMargin +Menu.submenuPopupOffsetX = {scaledInteger}-4 +Menu.submenuPopupOffsetY = {scaledInteger}-4 +Menu.opaque = false +Menu.borderPainted = true +Menu.background = @menuBackground #---- MenuBar ---- -MenuBar.border=com.formdev.flatlaf.ui.FlatMenuBarBorder -MenuBar.background=@menuBackground -MenuBar.hoverBackground=@menuHoverBackground -MenuBar.itemMargins=3,8,3,8 +MenuBar.border = com.formdev.flatlaf.ui.FlatMenuBarBorder +MenuBar.background = @menuBackground +MenuBar.hoverBackground = @menuHoverBackground +MenuBar.itemMargins = 3,8,3,8 #---- MenuItem ---- -MenuItem.border=com.formdev.flatlaf.ui.FlatMenuItemBorder -MenuItem.arrowIcon=com.formdev.flatlaf.icons.FlatMenuItemArrowIcon -MenuItem.checkIcon=null -MenuItem.margin=@menuItemMargin -MenuItem.opaque=false -MenuItem.borderPainted=true -MenuItem.background=@menuBackground -MenuItem.checkBackground=@menuCheckBackground -MenuItem.checkMargins=2,2,2,2 -MenuItem.minimumWidth=72 -MenuItem.minimumIconSize=16,16 -MenuItem.iconTextGap=6 -MenuItem.textAcceleratorGap=24 -MenuItem.textNoAcceleratorGap=6 -MenuItem.acceleratorArrowGap=2 -MenuItem.acceleratorDelimiter=- -[mac]MenuItem.acceleratorDelimiter= +MenuItem.border = com.formdev.flatlaf.ui.FlatMenuItemBorder +MenuItem.arrowIcon = com.formdev.flatlaf.icons.FlatMenuItemArrowIcon +MenuItem.checkIcon = null +MenuItem.margin = @menuItemMargin +MenuItem.opaque = false +MenuItem.borderPainted = true +MenuItem.background = @menuBackground +MenuItem.checkBackground = @menuCheckBackground +MenuItem.checkMargins = 2,2,2,2 +MenuItem.minimumWidth = 72 +MenuItem.minimumIconSize = 16,16 +MenuItem.iconTextGap = 6 +MenuItem.textAcceleratorGap = 24 +MenuItem.textNoAcceleratorGap = 6 +MenuItem.acceleratorArrowGap = 2 +MenuItem.acceleratorDelimiter = - +[mac]MenuItem.acceleratorDelimiter = -# for MenuItem.selectionType=underline -MenuItem.underlineSelectionBackground=@menuHoverBackground -MenuItem.underlineSelectionCheckBackground=@menuCheckBackground -MenuItem.underlineSelectionColor=$TabbedPane.underlineColor -MenuItem.underlineSelectionHeight=3 +# for MenuItem.selectionType = underline +MenuItem.underlineSelectionBackground = @menuHoverBackground +MenuItem.underlineSelectionCheckBackground = @menuCheckBackground +MenuItem.underlineSelectionColor = $TabbedPane.underlineColor +MenuItem.underlineSelectionHeight = 3 #---- OptionPane ---- -OptionPane.border=12,12,12,12 -OptionPane.messageAreaBorder=0,0,0,0 -OptionPane.buttonAreaBorder=12,0,0,0 -OptionPane.messageForeground=null +OptionPane.border = 12,12,12,12 +OptionPane.messageAreaBorder = 0,0,0,0 +OptionPane.buttonAreaBorder = 12,0,0,0 +OptionPane.messageForeground = null -OptionPane.maxCharactersPerLine=80 -OptionPane.iconMessageGap=16 -OptionPane.messagePadding=3 -OptionPane.buttonPadding=8 -OptionPane.buttonMinimumWidth={scaledInteger}72 -OptionPane.sameSizeButtons=true -OptionPane.setButtonMargin=false -OptionPane.buttonOrientation=4 -[mac]OptionPane.isYesLast=true +OptionPane.maxCharactersPerLine = 80 +OptionPane.iconMessageGap = 16 +OptionPane.messagePadding = 3 +OptionPane.buttonPadding = 8 +OptionPane.buttonMinimumWidth = {scaledInteger}72 +OptionPane.sameSizeButtons = true +OptionPane.setButtonMargin = false +OptionPane.buttonOrientation = 4 +[mac]OptionPane.isYesLast = true -OptionPane.errorIcon=com.formdev.flatlaf.icons.FlatOptionPaneErrorIcon -OptionPane.informationIcon=com.formdev.flatlaf.icons.FlatOptionPaneInformationIcon -OptionPane.questionIcon=com.formdev.flatlaf.icons.FlatOptionPaneQuestionIcon -OptionPane.warningIcon=com.formdev.flatlaf.icons.FlatOptionPaneWarningIcon +OptionPane.errorIcon = com.formdev.flatlaf.icons.FlatOptionPaneErrorIcon +OptionPane.informationIcon = com.formdev.flatlaf.icons.FlatOptionPaneInformationIcon +OptionPane.questionIcon = com.formdev.flatlaf.icons.FlatOptionPaneQuestionIcon +OptionPane.warningIcon = com.formdev.flatlaf.icons.FlatOptionPaneWarningIcon #---- PasswordField ---- -PasswordField.border=com.formdev.flatlaf.ui.FlatTextBorder -PasswordField.margin=@textComponentMargin -PasswordField.background=@textComponentBackground -PasswordField.placeholderForeground=@disabledText -PasswordField.echoChar=\u2022 -PasswordField.showCapsLock=true -PasswordField.capsLockIcon=com.formdev.flatlaf.icons.FlatCapsLockIcon +PasswordField.border = com.formdev.flatlaf.ui.FlatTextBorder +PasswordField.margin = @textComponentMargin +PasswordField.background = @textComponentBackground +PasswordField.placeholderForeground = @disabledText +PasswordField.echoChar = \u2022 +PasswordField.showCapsLock = true +PasswordField.capsLockIcon = com.formdev.flatlaf.icons.FlatCapsLockIcon #---- Popup ---- -Popup.dropShadowPainted=true -Popup.dropShadowInsets=-4,-4,4,4 +Popup.dropShadowPainted = true +Popup.dropShadowInsets = -4,-4,4,4 #---- PopupMenu ---- -PopupMenu.border=com.formdev.flatlaf.ui.FlatPopupMenuBorder -PopupMenu.borderInsets=4,1,4,1 -PopupMenu.background=@menuBackground +PopupMenu.border = com.formdev.flatlaf.ui.FlatPopupMenuBorder +PopupMenu.borderInsets = 4,1,4,1 +PopupMenu.background = @menuBackground #---- PopupMenuSeparator ---- -PopupMenuSeparator.height=9 -PopupMenuSeparator.stripeWidth=1 -PopupMenuSeparator.stripeIndent=4 +PopupMenuSeparator.height = 9 +PopupMenuSeparator.stripeWidth = 1 +PopupMenuSeparator.stripeIndent = 4 #---- ProgressBar ---- -ProgressBar.border=com.formdev.flatlaf.ui.FlatEmptyBorder -ProgressBar.arc=4 -ProgressBar.horizontalSize=146,4 -ProgressBar.verticalSize=4,146 -ProgressBar.cycleTime=4000 -ProgressBar.repaintInterval=15 +ProgressBar.border = com.formdev.flatlaf.ui.FlatEmptyBorder +ProgressBar.arc = 4 +ProgressBar.horizontalSize = 146,4 +ProgressBar.verticalSize = 4,146 +ProgressBar.cycleTime = 4000 +ProgressBar.repaintInterval = 15 #---- RadioButton ---- -RadioButton.border=com.formdev.flatlaf.ui.FlatMarginBorder -RadioButton.icon=com.formdev.flatlaf.icons.FlatRadioButtonIcon -RadioButton.icon.centerDiameter=8 -RadioButton.icon[filled].centerDiameter=5 -RadioButton.margin=2,2,2,2 -RadioButton.iconTextGap=4 -RadioButton.rollover=true +RadioButton.border = com.formdev.flatlaf.ui.FlatMarginBorder +RadioButton.icon = com.formdev.flatlaf.icons.FlatRadioButtonIcon +RadioButton.icon.centerDiameter = 8 +RadioButton.icon[filled].centerDiameter = 5 +RadioButton.margin = 2,2,2,2 +RadioButton.iconTextGap = 4 +RadioButton.rollover = true #---- RadioButtonMenuItem ---- -RadioButtonMenuItem.border=com.formdev.flatlaf.ui.FlatMenuItemBorder -RadioButtonMenuItem.checkIcon=com.formdev.flatlaf.icons.FlatRadioButtonMenuItemIcon -RadioButtonMenuItem.arrowIcon=com.formdev.flatlaf.icons.FlatMenuItemArrowIcon -RadioButtonMenuItem.margin=@menuItemMargin -RadioButtonMenuItem.opaque=false -RadioButtonMenuItem.borderPainted=true -RadioButtonMenuItem.background=@menuBackground +RadioButtonMenuItem.border = com.formdev.flatlaf.ui.FlatMenuItemBorder +RadioButtonMenuItem.checkIcon = com.formdev.flatlaf.icons.FlatRadioButtonMenuItemIcon +RadioButtonMenuItem.arrowIcon = com.formdev.flatlaf.icons.FlatMenuItemArrowIcon +RadioButtonMenuItem.margin = @menuItemMargin +RadioButtonMenuItem.opaque = false +RadioButtonMenuItem.borderPainted = true +RadioButtonMenuItem.background = @menuBackground #---- RootPane ---- -RootPane.border=com.formdev.flatlaf.ui.FlatRootPaneUI$FlatWindowBorder -RootPane.borderDragThickness=5 -RootPane.cornerDragWidth=16 -RootPane.honorFrameMinimumSizeOnResize=false -RootPane.honorDialogMinimumSizeOnResize=true +RootPane.border = com.formdev.flatlaf.ui.FlatRootPaneUI$FlatWindowBorder +RootPane.borderDragThickness = 5 +RootPane.cornerDragWidth = 16 +RootPane.honorFrameMinimumSizeOnResize = false +RootPane.honorDialogMinimumSizeOnResize = true #---- ScrollBar ---- -ScrollBar.width=10 -ScrollBar.minimumThumbSize=10,10 -ScrollBar.maximumThumbSize=100000,100000 -ScrollBar.trackInsets=0,0,0,0 -ScrollBar.thumbInsets=0,0,0,0 -ScrollBar.trackArc=0 -ScrollBar.thumbArc=0 -ScrollBar.hoverThumbWithTrack=false -ScrollBar.pressedThumbWithTrack=false -ScrollBar.showButtons=false -ScrollBar.squareButtons=false -ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor -ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor -ScrollBar.allowsAbsolutePositioning=true +ScrollBar.width = 10 +ScrollBar.minimumThumbSize = 10,10 +ScrollBar.maximumThumbSize = 100000,100000 +ScrollBar.trackInsets = 0,0,0,0 +ScrollBar.thumbInsets = 0,0,0,0 +ScrollBar.trackArc = 0 +ScrollBar.thumbArc = 0 +ScrollBar.hoverThumbWithTrack = false +ScrollBar.pressedThumbWithTrack = false +ScrollBar.showButtons = false +ScrollBar.squareButtons = false +ScrollBar.buttonArrowColor = $ComboBox.buttonArrowColor +ScrollBar.buttonDisabledArrowColor = $ComboBox.buttonDisabledArrowColor +ScrollBar.allowsAbsolutePositioning = true -[mac]ScrollBar.minimumThumbSize=18,18 -[mac]ScrollBar.thumbInsets=2,2,2,2 -[mac]ScrollBar.thumbArc=999 -[mac]ScrollBar.hoverThumbWithTrack=true +[mac]ScrollBar.minimumThumbSize = 18,18 +[mac]ScrollBar.thumbInsets = 2,2,2,2 +[mac]ScrollBar.thumbArc = 999 +[mac]ScrollBar.hoverThumbWithTrack = true -[linux]ScrollBar.minimumThumbSize=18,18 -[linux]ScrollBar.thumbInsets=2,2,2,2 -[linux]ScrollBar.thumbArc=999 +[linux]ScrollBar.minimumThumbSize = 18,18 +[linux]ScrollBar.thumbInsets = 2,2,2,2 +[linux]ScrollBar.thumbArc = 999 #---- ScrollPane ---- -ScrollPane.border=com.formdev.flatlaf.ui.FlatBorder -ScrollPane.background=$ScrollBar.track -ScrollPane.fillUpperCorner=true -ScrollPane.smoothScrolling=true +ScrollPane.border = com.formdev.flatlaf.ui.FlatBorder +ScrollPane.background = $ScrollBar.track +ScrollPane.fillUpperCorner = true +ScrollPane.smoothScrolling = true #---- Separator ---- -Separator.height=3 -Separator.stripeWidth=1 -Separator.stripeIndent=1 +Separator.height = 3 +Separator.stripeWidth = 1 +Separator.stripeIndent = 1 #---- Slider ---- -Slider.focusInsets=0,0,0,0 -Slider.trackWidth=2 -Slider.thumbSize=12,12 -Slider.focusWidth=4 +Slider.focusInsets = 0,0,0,0 +Slider.trackWidth = 2 +Slider.thumbSize = 12,12 +Slider.focusWidth = 4 #---- Spinner ---- -Spinner.border=com.formdev.flatlaf.ui.FlatRoundBorder -Spinner.background=@textComponentBackground -Spinner.buttonBackground=$ComboBox.buttonEditableBackground -Spinner.buttonArrowColor=$ComboBox.buttonArrowColor -Spinner.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor -Spinner.buttonHoverArrowColor=$ComboBox.buttonHoverArrowColor -Spinner.buttonPressedArrowColor=$ComboBox.buttonPressedArrowColor -Spinner.padding=@textComponentMargin -Spinner.editorBorderPainted=false +Spinner.border = com.formdev.flatlaf.ui.FlatRoundBorder +Spinner.background = @textComponentBackground +Spinner.buttonBackground = $ComboBox.buttonEditableBackground +Spinner.buttonArrowColor = $ComboBox.buttonArrowColor +Spinner.buttonDisabledArrowColor = $ComboBox.buttonDisabledArrowColor +Spinner.buttonHoverArrowColor = $ComboBox.buttonHoverArrowColor +Spinner.buttonPressedArrowColor = $ComboBox.buttonPressedArrowColor +Spinner.padding = @textComponentMargin +Spinner.editorBorderPainted = false # allowed values: button or none -Spinner.buttonStyle=button +Spinner.buttonStyle = button #---- SplitPane ---- -SplitPane.dividerSize={integer}5 -SplitPane.continuousLayout=true -SplitPane.border=null -SplitPane.centerOneTouchButtons=true -SplitPane.oneTouchButtonSize={scaledInteger}6 -SplitPane.oneTouchButtonOffset={scaledInteger}2 +SplitPane.dividerSize = {integer}5 +SplitPane.continuousLayout = true +SplitPane.border = null +SplitPane.centerOneTouchButtons = true +SplitPane.oneTouchButtonSize = {scaledInteger}6 +SplitPane.oneTouchButtonOffset = {scaledInteger}2 -SplitPaneDivider.border=null -SplitPaneDivider.oneTouchArrowColor=$ComboBox.buttonArrowColor -SplitPaneDivider.oneTouchHoverArrowColor=$ComboBox.buttonHoverArrowColor -SplitPaneDivider.oneTouchPressedArrowColor=$ComboBox.buttonPressedArrowColor +SplitPaneDivider.border = null +SplitPaneDivider.oneTouchArrowColor = $ComboBox.buttonArrowColor +SplitPaneDivider.oneTouchHoverArrowColor = $ComboBox.buttonHoverArrowColor +SplitPaneDivider.oneTouchPressedArrowColor = $ComboBox.buttonPressedArrowColor # allowed values: grip or plain -SplitPaneDivider.style=grip -SplitPaneDivider.gripColor=@icon -SplitPaneDivider.gripDotCount=3 -SplitPaneDivider.gripDotSize={integer}3 -SplitPaneDivider.gripGap=2 +SplitPaneDivider.style = grip +SplitPaneDivider.gripColor = @icon +SplitPaneDivider.gripDotCount = 3 +SplitPaneDivider.gripDotSize = {integer}3 +SplitPaneDivider.gripGap = 2 #---- TabbedPane ---- -TabbedPane.tabHeight=32 -TabbedPane.tabSelectionHeight=3 -TabbedPane.contentSeparatorHeight=1 -TabbedPane.showTabSeparators=false -TabbedPane.tabSeparatorsFullHeight=false -TabbedPane.hasFullBorder=false -TabbedPane.tabInsets=4,12,4,12 -TabbedPane.tabAreaInsets=0,0,0,0 -TabbedPane.selectedTabPadInsets=0,0,0,0 -TabbedPane.tabRunOverlay=0 -TabbedPane.tabsOverlapBorder=false -TabbedPane.disabledForeground=@disabledText -TabbedPane.shadow=@background -TabbedPane.contentBorderInsets=null +TabbedPane.tabHeight = 32 +TabbedPane.tabSelectionHeight = 3 +TabbedPane.contentSeparatorHeight = 1 +TabbedPane.showTabSeparators = false +TabbedPane.tabSeparatorsFullHeight = false +TabbedPane.hasFullBorder = false +TabbedPane.tabInsets = 4,12,4,12 +TabbedPane.tabAreaInsets = 0,0,0,0 +TabbedPane.selectedTabPadInsets = 0,0,0,0 +TabbedPane.tabRunOverlay = 0 +TabbedPane.tabsOverlapBorder = false +TabbedPane.disabledForeground = @disabledText +TabbedPane.shadow = @background +TabbedPane.contentBorderInsets = null # allowed values: moreTabsButton or arrowButtons -TabbedPane.hiddenTabsNavigation=moreTabsButton +TabbedPane.hiddenTabsNavigation = moreTabsButton # allowed values: leading, trailing, center or fill -TabbedPane.tabAreaAlignment=leading +TabbedPane.tabAreaAlignment = leading # allowed values: leading, trailing or center -TabbedPane.tabAlignment=center +TabbedPane.tabAlignment = center # allowed values: preferred, equal or compact -TabbedPane.tabWidthMode=preferred +TabbedPane.tabWidthMode = preferred # allowed values: chevron or triangle -TabbedPane.arrowType=chevron -TabbedPane.buttonInsets=2,1,2,1 -TabbedPane.buttonArc=$Button.arc +TabbedPane.arrowType = chevron +TabbedPane.buttonInsets = 2,1,2,1 +TabbedPane.buttonArc = $Button.arc # allowed values: wrap or scroll -#TabbedPane.tabLayoutPolicy=scroll +#TabbedPane.tabLayoutPolicy = scroll # allowed values: never or asNeeded -TabbedPane.tabsPopupPolicy=asNeeded +TabbedPane.tabsPopupPolicy = asNeeded # allowed values: never, asNeeded or asNeededSingle -TabbedPane.scrollButtonsPolicy=asNeededSingle +TabbedPane.scrollButtonsPolicy = asNeededSingle # allowed values: both or trailing -TabbedPane.scrollButtonsPlacement=both +TabbedPane.scrollButtonsPlacement = both -TabbedPane.closeIcon=com.formdev.flatlaf.icons.FlatTabbedPaneCloseIcon -TabbedPane.closeSize=16,16 -TabbedPane.closeArc=4 -TabbedPane.closeCrossPlainSize={float}7.5 -TabbedPane.closeCrossFilledSize=$TabbedPane.closeCrossPlainSize -TabbedPane.closeCrossLineWidth={float}1 +TabbedPane.closeIcon = com.formdev.flatlaf.icons.FlatTabbedPaneCloseIcon +TabbedPane.closeSize = 16,16 +TabbedPane.closeArc = 4 +TabbedPane.closeCrossPlainSize = {float}7.5 +TabbedPane.closeCrossFilledSize = $TabbedPane.closeCrossPlainSize +TabbedPane.closeCrossLineWidth = {float}1 #---- Table ---- -Table.rowHeight=20 -Table.showHorizontalLines=false -Table.showVerticalLines=false -Table.consistentHomeEndKeyBehavior=true -Table.intercellSpacing={dimension}0,0 -Table.scrollPaneBorder=com.formdev.flatlaf.ui.FlatBorder -Table.ascendingSortIcon=com.formdev.flatlaf.icons.FlatAscendingSortIcon -Table.descendingSortIcon=com.formdev.flatlaf.icons.FlatDescendingSortIcon -Table.sortIconColor=@icon -Table.cellMargins=2,3,2,3 -Table.cellFocusColor=@cellFocusColor -Table.cellNoFocusBorder=com.formdev.flatlaf.ui.FlatTableCellBorder$Default -Table.focusCellHighlightBorder=com.formdev.flatlaf.ui.FlatTableCellBorder$Focused -Table.focusSelectedCellHighlightBorder=com.formdev.flatlaf.ui.FlatTableCellBorder$Selected -Table.focusCellBackground=@textComponentBackground -Table.focusCellForeground=@foreground -Table.background=@textComponentBackground -Table.selectionInactiveBackground=@selectionInactiveBackground -Table.selectionInactiveForeground=@selectionInactiveForeground -Table.dropCellBackground=@dropCellBackground -Table.dropCellForeground=@dropCellForeground -Table.dropLineColor=@dropLineColor -Table.dropLineShortColor=@dropLineShortColor +Table.rowHeight = 20 +Table.showHorizontalLines = false +Table.showVerticalLines = false +Table.consistentHomeEndKeyBehavior = true +Table.intercellSpacing = {dimension}0,0 +Table.scrollPaneBorder = com.formdev.flatlaf.ui.FlatBorder +Table.ascendingSortIcon = com.formdev.flatlaf.icons.FlatAscendingSortIcon +Table.descendingSortIcon = com.formdev.flatlaf.icons.FlatDescendingSortIcon +Table.sortIconColor = @icon +Table.cellMargins = 2,3,2,3 +Table.cellFocusColor = @cellFocusColor +Table.cellNoFocusBorder = com.formdev.flatlaf.ui.FlatTableCellBorder$Default +Table.focusCellHighlightBorder = com.formdev.flatlaf.ui.FlatTableCellBorder$Focused +Table.focusSelectedCellHighlightBorder = com.formdev.flatlaf.ui.FlatTableCellBorder$Selected +Table.focusCellBackground = @textComponentBackground +Table.focusCellForeground = @foreground +Table.background = @textComponentBackground +Table.selectionInactiveBackground = @selectionInactiveBackground +Table.selectionInactiveForeground = @selectionInactiveForeground +Table.dropCellBackground = @dropCellBackground +Table.dropCellForeground = @dropCellForeground +Table.dropLineColor = @dropLineColor +Table.dropLineShortColor = @dropLineShortColor #---- TableHeader ---- -TableHeader.height=25 -TableHeader.cellBorder=2,3,2,3 -TableHeader.focusCellBackground=$TableHeader.background -TableHeader.background=@textComponentBackground +TableHeader.height = 25 +TableHeader.cellBorder = 2,3,2,3 +TableHeader.focusCellBackground = $TableHeader.background +TableHeader.background = @textComponentBackground #---- TextArea ---- -TextArea.border=com.formdev.flatlaf.ui.FlatMarginBorder -TextArea.margin=@textComponentMargin -TextArea.background=@textComponentBackground +TextArea.border = com.formdev.flatlaf.ui.FlatMarginBorder +TextArea.margin = @textComponentMargin +TextArea.background = @textComponentBackground #---- TextComponent ---- # allowed values: never, once or always -TextComponent.selectAllOnFocusPolicy=once -TextComponent.selectAllOnMouseClick=false -TextComponent.arc=0 +TextComponent.selectAllOnFocusPolicy = once +TextComponent.selectAllOnMouseClick = false +TextComponent.arc = 0 #---- TextField ---- -TextField.border=com.formdev.flatlaf.ui.FlatTextBorder -TextField.margin=@textComponentMargin -TextField.background=@textComponentBackground -TextField.placeholderForeground=@disabledText +TextField.border = com.formdev.flatlaf.ui.FlatTextBorder +TextField.margin = @textComponentMargin +TextField.background = @textComponentBackground +TextField.placeholderForeground = @disabledText #---- TextPane ---- -TextPane.border=com.formdev.flatlaf.ui.FlatMarginBorder -TextPane.margin=@textComponentMargin -TextPane.background=@textComponentBackground +TextPane.border = com.formdev.flatlaf.ui.FlatMarginBorder +TextPane.margin = @textComponentMargin +TextPane.background = @textComponentBackground #---- TitledBorder ---- -TitledBorder.titleColor=@foreground -TitledBorder.border=1,1,1,1,$Separator.foreground +TitledBorder.titleColor = @foreground +TitledBorder.border = 1,1,1,1,$Separator.foreground #---- TitlePane ---- -TitlePane.menuBarEmbedded=true -TitlePane.iconSize=16,16 -TitlePane.iconMargins=3,8,3,0 -TitlePane.menuBarMargins=0,8,0,22 -TitlePane.titleMargins=3,8,3,8 -TitlePane.buttonSize=44,30 -TitlePane.buttonMaximizedHeight=22 -TitlePane.closeIcon=com.formdev.flatlaf.icons.FlatWindowCloseIcon -TitlePane.iconifyIcon=com.formdev.flatlaf.icons.FlatWindowIconifyIcon -TitlePane.maximizeIcon=com.formdev.flatlaf.icons.FlatWindowMaximizeIcon -TitlePane.restoreIcon=com.formdev.flatlaf.icons.FlatWindowRestoreIcon +TitlePane.menuBarEmbedded = true +TitlePane.iconSize = 16,16 +TitlePane.iconMargins = 3,8,3,0 +TitlePane.menuBarMargins = 0,8,0,22 +TitlePane.titleMargins = 3,8,3,8 +TitlePane.buttonSize = 44,30 +TitlePane.buttonMaximizedHeight = 22 +TitlePane.closeIcon = com.formdev.flatlaf.icons.FlatWindowCloseIcon +TitlePane.iconifyIcon = com.formdev.flatlaf.icons.FlatWindowIconifyIcon +TitlePane.maximizeIcon = com.formdev.flatlaf.icons.FlatWindowMaximizeIcon +TitlePane.restoreIcon = com.formdev.flatlaf.icons.FlatWindowRestoreIcon -TitlePane.background=$MenuBar.background -TitlePane.inactiveBackground=$TitlePane.background -TitlePane.foreground=@foreground -TitlePane.inactiveForeground=@disabledText +TitlePane.background = $MenuBar.background +TitlePane.inactiveBackground = $TitlePane.background +TitlePane.foreground = @foreground +TitlePane.inactiveForeground = @disabledText -TitlePane.closeHoverBackground=#e81123 -TitlePane.closePressedBackground=fade($TitlePane.closeHoverBackground,60%) -TitlePane.closeHoverForeground=#fff -TitlePane.closePressedForeground=#fff +TitlePane.closeHoverBackground = #e81123 +TitlePane.closePressedBackground = fade($TitlePane.closeHoverBackground,60%) +TitlePane.closeHoverForeground = #fff +TitlePane.closePressedForeground = #fff #---- ToggleButton ---- -ToggleButton.border=com.formdev.flatlaf.ui.FlatButtonBorder -ToggleButton.margin=2,14,2,14 -ToggleButton.iconTextGap=4 -ToggleButton.rollover=true +ToggleButton.border = com.formdev.flatlaf.ui.FlatButtonBorder +ToggleButton.margin = 2,14,2,14 +ToggleButton.iconTextGap = 4 +ToggleButton.rollover = true -ToggleButton.background=$Button.background -ToggleButton.pressedBackground=$Button.pressedBackground -ToggleButton.selectedForeground=@foreground +ToggleButton.background = $Button.background +ToggleButton.pressedBackground = $Button.pressedBackground +ToggleButton.selectedForeground = @foreground -ToggleButton.toolbar.hoverBackground=$Button.toolbar.hoverBackground -ToggleButton.toolbar.pressedBackground=$Button.toolbar.pressedBackground +ToggleButton.toolbar.hoverBackground = $Button.toolbar.hoverBackground +ToggleButton.toolbar.pressedBackground = $Button.toolbar.pressedBackground # button type "tab" -ToggleButton.tab.underlineHeight=2 -ToggleButton.tab.underlineColor=$TabbedPane.underlineColor -ToggleButton.tab.disabledUnderlineColor=$TabbedPane.disabledUnderlineColor -ToggleButton.tab.selectedBackground=$?TabbedPane.selectedBackground -ToggleButton.tab.hoverBackground=$TabbedPane.hoverColor -ToggleButton.tab.focusBackground=$TabbedPane.focusColor +ToggleButton.tab.underlineHeight = 2 +ToggleButton.tab.underlineColor = $TabbedPane.underlineColor +ToggleButton.tab.disabledUnderlineColor = $TabbedPane.disabledUnderlineColor +ToggleButton.tab.selectedBackground = $?TabbedPane.selectedBackground +ToggleButton.tab.hoverBackground = $TabbedPane.hoverColor +ToggleButton.tab.focusBackground = $TabbedPane.focusColor #---- ToolBar ---- -ToolBar.border=com.formdev.flatlaf.ui.FlatToolBarBorder -ToolBar.borderMargins=2,2,2,2 -ToolBar.isRollover=true -ToolBar.gripColor=@icon -ToolBar.dockingBackground=@background -ToolBar.dockingForeground=@foreground -ToolBar.floatingBackground=@background -ToolBar.floatingForeground=@disabledText +ToolBar.border = com.formdev.flatlaf.ui.FlatToolBarBorder +ToolBar.borderMargins = 2,2,2,2 +ToolBar.isRollover = true +ToolBar.gripColor = @icon +ToolBar.dockingBackground = @background +ToolBar.dockingForeground = @foreground +ToolBar.floatingBackground = @background +ToolBar.floatingForeground = @disabledText -ToolBar.separatorSize=null -ToolBar.separatorWidth=7 -ToolBar.separatorColor=$Separator.foreground +ToolBar.separatorSize = null +ToolBar.separatorWidth = 7 +ToolBar.separatorColor = $Separator.foreground -ToolBar.spacingBorder=$Button.toolbar.spacingInsets +ToolBar.spacingBorder = $Button.toolbar.spacingInsets #---- ToolTipManager ---- -ToolTipManager.enableToolTipMode=activeApplication +ToolTipManager.enableToolTipMode = activeApplication #---- Tree ---- -Tree.border=1,1,1,1 -Tree.editorBorder=1,1,1,1,@cellFocusColor -Tree.background=@textComponentBackground -Tree.selectionInactiveBackground=@selectionInactiveBackground -Tree.selectionInactiveForeground=@selectionInactiveForeground -Tree.textBackground=$Tree.background -Tree.textForeground=$Tree.foreground -Tree.selectionBorderColor=@cellFocusColor -Tree.dropCellBackground=@dropCellBackground -Tree.dropCellForeground=@dropCellForeground -Tree.dropLineColor=@dropLineColor -Tree.rendererFillBackground=false -Tree.rendererMargins=1,2,1,2 -Tree.wideSelection=true -Tree.repaintWholeRow=true -Tree.paintLines=false -Tree.showCellFocusIndicator=false -Tree.leftChildIndent=7 -Tree.rightChildIndent=11 -Tree.rowHeight=0 +Tree.border = 1,1,1,1 +Tree.editorBorder = 1,1,1,1,@cellFocusColor +Tree.background = @textComponentBackground +Tree.selectionInactiveBackground = @selectionInactiveBackground +Tree.selectionInactiveForeground = @selectionInactiveForeground +Tree.textBackground = $Tree.background +Tree.textForeground = $Tree.foreground +Tree.selectionBorderColor = @cellFocusColor +Tree.dropCellBackground = @dropCellBackground +Tree.dropCellForeground = @dropCellForeground +Tree.dropLineColor = @dropLineColor +Tree.rendererFillBackground = false +Tree.rendererMargins = 1,2,1,2 +Tree.wideSelection = true +Tree.repaintWholeRow = true +Tree.paintLines = false +Tree.showCellFocusIndicator = false +Tree.leftChildIndent = 7 +Tree.rightChildIndent = 11 +Tree.rowHeight = 0 -Tree.expandedIcon=com.formdev.flatlaf.icons.FlatTreeExpandedIcon -Tree.collapsedIcon=com.formdev.flatlaf.icons.FlatTreeCollapsedIcon -Tree.leafIcon=com.formdev.flatlaf.icons.FlatTreeLeafIcon -Tree.closedIcon=com.formdev.flatlaf.icons.FlatTreeClosedIcon -Tree.openIcon=com.formdev.flatlaf.icons.FlatTreeOpenIcon +Tree.expandedIcon = com.formdev.flatlaf.icons.FlatTreeExpandedIcon +Tree.collapsedIcon = com.formdev.flatlaf.icons.FlatTreeCollapsedIcon +Tree.leafIcon = com.formdev.flatlaf.icons.FlatTreeLeafIcon +Tree.closedIcon = com.formdev.flatlaf.icons.FlatTreeClosedIcon +Tree.openIcon = com.formdev.flatlaf.icons.FlatTreeOpenIcon -Tree.icon.expandedColor=@icon -Tree.icon.collapsedColor=@icon -Tree.icon.leafColor=@icon -Tree.icon.closedColor=@icon -Tree.icon.openColor=@icon +Tree.icon.expandedColor = @icon +Tree.icon.collapsedColor = @icon +Tree.icon.leafColor = @icon +Tree.icon.closedColor = @icon +Tree.icon.openColor = @icon diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 24cbabcf..a3892348 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -20,303 +20,303 @@ #---- variables ---- -@background=#f2f2f2 -@foreground=#000 -@selectionBackground=#2675BF -@selectionForeground=#fff -@selectionInactiveBackground=#d4d4d4 -@selectionInactiveForeground=@foreground -@disabledText=#8C8C8C -@textComponentBackground=#fff -@menuBackground=#fff -@menuHoverBackground=darken(@menuBackground,10%,derived) -@menuCheckBackground=lighten(@selectionBackground,40%) -@menuAcceleratorForeground=lighten(@foreground,30%) -@menuAcceleratorSelectionForeground=@selectionForeground -@cellFocusColor=#000 -@icon=#afafaf +@background = #f2f2f2 +@foreground = #000 +@selectionBackground = #2675BF +@selectionForeground = #fff +@selectionInactiveBackground = #d4d4d4 +@selectionInactiveForeground = @foreground +@disabledText = #8C8C8C +@textComponentBackground = #fff +@menuBackground = #fff +@menuHoverBackground = darken(@menuBackground,10%,derived) +@menuCheckBackground = lighten(@selectionBackground,40%) +@menuAcceleratorForeground = lighten(@foreground,30%) +@menuAcceleratorSelectionForeground = @selectionForeground +@cellFocusColor = #000 +@icon = #afafaf # Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors) -@dropCellBackground=lighten(List.selectionBackground,10%,lazy) -@dropCellForeground=lazy(List.selectionForeground) -@dropLineColor=lighten(List.selectionBackground,20%,lazy) -@dropLineShortColor=darken(List.selectionBackground,20%,lazy) +@dropCellBackground = lighten(List.selectionBackground,10%,lazy) +@dropCellForeground = lazy(List.selectionForeground) +@dropLineColor = lighten(List.selectionBackground,20%,lazy) +@dropLineShortColor = darken(List.selectionBackground,20%,lazy) #---- system colors ---- -activeCaption=#99b4d1 -inactiveCaption=#bfcddb -controlHighlight=#e3e3e3 -controlLtHighlight=#fff -controlDkShadow=darken($controlShadow,15%) +activeCaption = #99b4d1 +inactiveCaption = #bfcddb +controlHighlight = #e3e3e3 +controlLtHighlight = #fff +controlDkShadow = darken($controlShadow,15%) #---- Button ---- -Button.background=#fff -Button.focusedBackground=#e3f1fa -Button.hoverBackground=darken($Button.background,3%,derived) -Button.pressedBackground=darken($Button.background,10%,derived) -Button.selectedBackground=darken($Button.background,20%,derived) -Button.selectedForeground=@foreground -Button.disabledSelectedBackground=darken($Button.background,13%,derived) +Button.background = #fff +Button.focusedBackground = #e3f1fa +Button.hoverBackground = darken($Button.background,3%,derived) +Button.pressedBackground = darken($Button.background,10%,derived) +Button.selectedBackground = darken($Button.background,20%,derived) +Button.selectedForeground = @foreground +Button.disabledSelectedBackground = darken($Button.background,13%,derived) -Button.borderColor=$Component.borderColor -Button.disabledBorderColor=$Component.disabledBorderColor -Button.focusedBorderColor=$Component.focusedBorderColor -Button.hoverBorderColor=$Button.focusedBorderColor +Button.borderColor = $Component.borderColor +Button.disabledBorderColor = $Component.disabledBorderColor +Button.focusedBorderColor = $Component.focusedBorderColor +Button.hoverBorderColor = $Button.focusedBorderColor -Button.default.background=$Button.background -Button.default.foreground=@foreground -Button.default.focusedBackground=$Button.focusedBackground -Button.default.hoverBackground=$Button.hoverBackground -Button.default.pressedBackground=$Button.pressedBackground -Button.default.borderColor=#4F9EE3 -Button.default.hoverBorderColor=$Button.hoverBorderColor -Button.default.focusedBorderColor=$Button.focusedBorderColor -Button.default.focusColor=$Component.focusColor -Button.default.borderWidth=2 +Button.default.background = $Button.background +Button.default.foreground = @foreground +Button.default.focusedBackground = $Button.focusedBackground +Button.default.hoverBackground = $Button.hoverBackground +Button.default.pressedBackground = $Button.pressedBackground +Button.default.borderColor = #4F9EE3 +Button.default.hoverBorderColor = $Button.hoverBorderColor +Button.default.focusedBorderColor = $Button.focusedBorderColor +Button.default.focusColor = $Component.focusColor +Button.default.borderWidth = 2 -Button.toolbar.hoverBackground=darken($Button.background,12%,derived) -Button.toolbar.pressedBackground=darken($Button.background,15%,derived) -Button.toolbar.selectedBackground=$Button.selectedBackground +Button.toolbar.hoverBackground = darken($Button.background,12%,derived) +Button.toolbar.pressedBackground = darken($Button.background,15%,derived) +Button.toolbar.selectedBackground = $Button.selectedBackground #---- CheckBox ---- # enabled -CheckBox.icon.borderColor=#b0b0b0 -CheckBox.icon.background=#fff -CheckBox.icon.selectedBorderColor=$CheckBox.icon.borderColor -CheckBox.icon.selectedBackground=$CheckBox.icon.background -CheckBox.icon.checkmarkColor=#4F9EE3 +CheckBox.icon.borderColor = #b0b0b0 +CheckBox.icon.background = #fff +CheckBox.icon.selectedBorderColor = $CheckBox.icon.borderColor +CheckBox.icon.selectedBackground = $CheckBox.icon.background +CheckBox.icon.checkmarkColor = #4F9EE3 # disabled -CheckBox.icon.disabledBorderColor=#BDBDBD -CheckBox.icon.disabledBackground=@background -CheckBox.icon.disabledCheckmarkColor=#ABABAB +CheckBox.icon.disabledBorderColor = #BDBDBD +CheckBox.icon.disabledBackground = @background +CheckBox.icon.disabledCheckmarkColor = #ABABAB # focused -CheckBox.icon.focusedBorderColor=#7B9FC7 -CheckBox.icon.focusedBackground=$Button.focusedBackground +CheckBox.icon.focusedBorderColor = #7B9FC7 +CheckBox.icon.focusedBackground = $Button.focusedBackground # hover -CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor -CheckBox.icon.hoverBackground=$Button.hoverBackground +CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor +CheckBox.icon.hoverBackground = $Button.hoverBackground # pressed -CheckBox.icon.pressedBackground=$Button.pressedBackground +CheckBox.icon.pressedBackground = $Button.pressedBackground -# used if CheckBox.icon.style=filled +# used if CheckBox.icon.style = filled # enabled -CheckBox.icon[filled].selectedBorderColor=#4B97D9 -CheckBox.icon[filled].selectedBackground=#4F9EE3 -CheckBox.icon[filled].checkmarkColor=#fff +CheckBox.icon[filled].selectedBorderColor = #4B97D9 +CheckBox.icon[filled].selectedBackground = #4F9EE3 +CheckBox.icon[filled].checkmarkColor = #fff # focused -CheckBox.icon[filled].selectedFocusedBorderColor=#ACCFF7 -CheckBox.icon[filled].selectedFocusedBackground=$CheckBox.icon[filled].selectedBackground -CheckBox.icon[filled].selectedFocusedCheckmarkColor=$CheckBox.icon.focusedBackground +CheckBox.icon[filled].selectedFocusedBorderColor = #ACCFF7 +CheckBox.icon[filled].selectedFocusedBackground = $CheckBox.icon[filled].selectedBackground +CheckBox.icon[filled].selectedFocusedCheckmarkColor = $CheckBox.icon.focusedBackground # hover -CheckBox.icon[filled].selectedHoverBackground=darken($CheckBox.icon[filled].selectedBackground,5%) +CheckBox.icon[filled].selectedHoverBackground = darken($CheckBox.icon[filled].selectedBackground,5%) # pressed -CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].selectedBackground,10%) +CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,10%) #---- ComboBox ---- -ComboBox.buttonEditableBackground=#fafafa -ComboBox.buttonArrowColor=#666 -ComboBox.buttonDisabledArrowColor=lighten($ComboBox.buttonArrowColor,25%) -ComboBox.buttonHoverArrowColor=lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) -ComboBox.buttonPressedArrowColor=lighten($ComboBox.buttonArrowColor,30%,derived noAutoInverse) +ComboBox.buttonEditableBackground = #fafafa +ComboBox.buttonArrowColor = #666 +ComboBox.buttonDisabledArrowColor = lighten($ComboBox.buttonArrowColor,25%) +ComboBox.buttonHoverArrowColor = lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) +ComboBox.buttonPressedArrowColor = lighten($ComboBox.buttonArrowColor,30%,derived noAutoInverse) #---- Component ---- -Component.borderColor=#c4c4c4 -Component.disabledBorderColor=#cfcfcf -Component.focusedBorderColor=#87afda -Component.focusColor=#97c3f3 -Component.linkColor=#2470B3 -Component.grayFilter=25,-25,100 +Component.borderColor = #c4c4c4 +Component.disabledBorderColor = #cfcfcf +Component.focusedBorderColor = #87afda +Component.focusColor = #97c3f3 +Component.linkColor = #2470B3 +Component.grayFilter = 25,-25,100 -Component.error.borderColor=lighten(desaturate($Component.error.focusedBorderColor,20%),25%) -Component.error.focusedBorderColor=#e53e4d -Component.warning.borderColor=lighten(saturate($Component.warning.focusedBorderColor,25%),20%) -Component.warning.focusedBorderColor=#e2a53a -Component.custom.borderColor=lighten(desaturate(#f00,20%,derived noAutoInverse),25%,derived noAutoInverse) +Component.error.borderColor = lighten(desaturate($Component.error.focusedBorderColor,20%),25%) +Component.error.focusedBorderColor = #e53e4d +Component.warning.borderColor = lighten(saturate($Component.warning.focusedBorderColor,25%),20%) +Component.warning.focusedBorderColor = #e2a53a +Component.custom.borderColor = lighten(desaturate(#f00,20%,derived noAutoInverse),25%,derived noAutoInverse) #---- Desktop ---- -Desktop.background=#E6EBF0 +Desktop.background = #E6EBF0 #---- DesktopIcon ---- -DesktopIcon.background=darken($Desktop.background,10%) +DesktopIcon.background = darken($Desktop.background,10%) #---- HelpButton ---- -HelpButton.questionMarkColor=#4F9EE3 +HelpButton.questionMarkColor = #4F9EE3 #---- InternalFrame ---- -InternalFrame.activeTitleBackground=#fff -InternalFrame.activeTitleForeground=@foreground -InternalFrame.inactiveTitleBackground=#fafafa -InternalFrame.inactiveTitleForeground=@disabledText +InternalFrame.activeTitleBackground = #fff +InternalFrame.activeTitleForeground = @foreground +InternalFrame.inactiveTitleBackground = #fafafa +InternalFrame.inactiveTitleForeground = @disabledText -InternalFrame.activeBorderColor=darken($Component.borderColor,20%) -InternalFrame.inactiveBorderColor=$Component.borderColor +InternalFrame.activeBorderColor = darken($Component.borderColor,20%) +InternalFrame.inactiveBorderColor = $Component.borderColor -InternalFrame.buttonHoverBackground=darken($InternalFrame.activeTitleBackground,10%,derived) -InternalFrame.buttonPressedBackground=darken($InternalFrame.activeTitleBackground,20%,derived) -InternalFrame.closeHoverBackground=lazy(Actions.Red) -InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy) -InternalFrame.closeHoverForeground=#fff -InternalFrame.closePressedForeground=#fff +InternalFrame.buttonHoverBackground = darken($InternalFrame.activeTitleBackground,10%,derived) +InternalFrame.buttonPressedBackground = darken($InternalFrame.activeTitleBackground,20%,derived) +InternalFrame.closeHoverBackground = lazy(Actions.Red) +InternalFrame.closePressedBackground = darken(Actions.Red,10%,lazy) +InternalFrame.closeHoverForeground = #fff +InternalFrame.closePressedForeground = #fff -InternalFrame.activeDropShadowOpacity=0.25 -InternalFrame.inactiveDropShadowOpacity=0.5 +InternalFrame.activeDropShadowOpacity = 0.25 +InternalFrame.inactiveDropShadowOpacity = 0.5 #---- Menu ---- -Menu.icon.arrowColor=#666 -Menu.icon.disabledArrowColor=#ABABAB +Menu.icon.arrowColor = #666 +Menu.icon.disabledArrowColor = #ABABAB #---- MenuBar ---- -MenuBar.borderColor=#cdcdcd +MenuBar.borderColor = #cdcdcd #---- MenuItemCheckBox ---- -MenuItemCheckBox.icon.checkmarkColor=#4F9EE3 -MenuItemCheckBox.icon.disabledCheckmarkColor=#ABABAB +MenuItemCheckBox.icon.checkmarkColor = #4F9EE3 +MenuItemCheckBox.icon.disabledCheckmarkColor = #ABABAB #---- PasswordField ---- -PasswordField.capsLockIconColor=#00000064 +PasswordField.capsLockIconColor = #00000064 #---- Popup ---- -Popup.dropShadowColor=#000 -Popup.dropShadowOpacity=0.15 +Popup.dropShadowColor = #000 +Popup.dropShadowOpacity = 0.15 #---- PopupMenu ---- -PopupMenu.borderColor=#adadad +PopupMenu.borderColor = #adadad #---- ProgressBar ---- -ProgressBar.background=#D1D1D1 -ProgressBar.foreground=#1E82E6 -ProgressBar.selectionForeground=@textComponentBackground -ProgressBar.selectionBackground=@foreground +ProgressBar.background = #D1D1D1 +ProgressBar.foreground = #1E82E6 +ProgressBar.selectionForeground = @textComponentBackground +ProgressBar.selectionBackground = @foreground #---- RootPane ---- -RootPane.activeBorderColor=#707070 -RootPane.inactiveBorderColor=lighten($RootPane.activeBorderColor,20%,derived) +RootPane.activeBorderColor = #707070 +RootPane.inactiveBorderColor = lighten($RootPane.activeBorderColor,20%,derived) #---- ScrollBar ---- -ScrollBar.track=lighten(@background,1%,derived noAutoInverse) -ScrollBar.thumb=darken($ScrollBar.track,10%,derived noAutoInverse) -ScrollBar.hoverTrackColor=darken($ScrollBar.track,3%,derived noAutoInverse) -ScrollBar.hoverThumbColor=darken($ScrollBar.thumb,10%,derived noAutoInverse) -ScrollBar.pressedThumbColor=darken($ScrollBar.thumb,20%,derived noAutoInverse) -ScrollBar.hoverButtonBackground=darken(@background,5%,derived noAutoInverse) -ScrollBar.pressedButtonBackground=darken(@background,10%,derived noAutoInverse) +ScrollBar.track = lighten(@background,1%,derived noAutoInverse) +ScrollBar.thumb = darken($ScrollBar.track,10%,derived noAutoInverse) +ScrollBar.hoverTrackColor = darken($ScrollBar.track,3%,derived noAutoInverse) +ScrollBar.hoverThumbColor = darken($ScrollBar.thumb,10%,derived noAutoInverse) +ScrollBar.pressedThumbColor = darken($ScrollBar.thumb,20%,derived noAutoInverse) +ScrollBar.hoverButtonBackground = darken(@background,5%,derived noAutoInverse) +ScrollBar.pressedButtonBackground = darken(@background,10%,derived noAutoInverse) #---- Separator ---- -Separator.foreground=#d1d1d1 +Separator.foreground = #d1d1d1 #---- Slider ---- -Slider.trackValueColor=#1E82E6 -Slider.trackColor=#c4c4c4 -Slider.thumbColor=$Slider.trackValueColor -Slider.tickColor=#888 -Slider.focusedColor=fade($Component.focusColor,50%,derived) -Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived) -Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived) -Slider.disabledTrackColor=#c0c0c0 -Slider.disabledThumbColor=$Slider.disabledTrackColor +Slider.trackValueColor = #1E82E6 +Slider.trackColor = #c4c4c4 +Slider.thumbColor = $Slider.trackValueColor +Slider.tickColor = #888 +Slider.focusedColor = fade($Component.focusColor,50%,derived) +Slider.hoverThumbColor = lighten($Slider.thumbColor,10%,derived) +Slider.pressedThumbColor = lighten($Slider.thumbColor,15%,derived) +Slider.disabledTrackColor = #c0c0c0 +Slider.disabledThumbColor = $Slider.disabledTrackColor #---- SplitPane ---- -SplitPaneDivider.draggingColor=#c4c4c4 +SplitPaneDivider.draggingColor = #c4c4c4 #---- TabbedPane ---- -TabbedPane.underlineColor=#4083C9 -TabbedPane.disabledUnderlineColor=#ababab -TabbedPane.hoverColor=darken($TabbedPane.background,7%,derived) -TabbedPane.focusColor=#dae4ed -TabbedPane.contentAreaColor=#bfbfbf +TabbedPane.underlineColor = #4083C9 +TabbedPane.disabledUnderlineColor = #ababab +TabbedPane.hoverColor = darken($TabbedPane.background,7%,derived) +TabbedPane.focusColor = #dae4ed +TabbedPane.contentAreaColor = #bfbfbf -TabbedPane.buttonHoverBackground=darken($TabbedPane.background,7%,derived) -TabbedPane.buttonPressedBackground=darken($TabbedPane.background,10%,derived) +TabbedPane.buttonHoverBackground = darken($TabbedPane.background,7%,derived) +TabbedPane.buttonPressedBackground = darken($TabbedPane.background,10%,derived) -TabbedPane.closeBackground=null -TabbedPane.closeForeground=@disabledText -TabbedPane.closeHoverBackground=darken($TabbedPane.background,20%,derived) -TabbedPane.closeHoverForeground=@foreground -TabbedPane.closePressedBackground=darken($TabbedPane.background,25%,derived) -TabbedPane.closePressedForeground=$TabbedPane.closeHoverForeground +TabbedPane.closeBackground = null +TabbedPane.closeForeground = @disabledText +TabbedPane.closeHoverBackground = darken($TabbedPane.background,20%,derived) +TabbedPane.closeHoverForeground = @foreground +TabbedPane.closePressedBackground = darken($TabbedPane.background,25%,derived) +TabbedPane.closePressedForeground = $TabbedPane.closeHoverForeground #---- Table ---- -Table.gridColor=darken($Table.background,5%) +Table.gridColor = darken($Table.background,5%) #---- TableHeader ---- -TableHeader.separatorColor=darken($TableHeader.background,10%) -TableHeader.bottomSeparatorColor=$TableHeader.separatorColor +TableHeader.separatorColor = darken($TableHeader.background,10%) +TableHeader.bottomSeparatorColor = $TableHeader.separatorColor #---- TitlePane ---- -TitlePane.embeddedForeground=lighten($TitlePane.foreground,35%) -TitlePane.buttonHoverBackground=darken($TitlePane.background,10%,derived) -TitlePane.buttonPressedBackground=darken($TitlePane.background,20%,derived) +TitlePane.embeddedForeground = lighten($TitlePane.foreground,35%) +TitlePane.buttonHoverBackground = darken($TitlePane.background,10%,derived) +TitlePane.buttonPressedBackground = darken($TitlePane.background,20%,derived) #---- ToggleButton ---- -ToggleButton.selectedBackground=darken($ToggleButton.background,20%,derived) -ToggleButton.disabledSelectedBackground=darken($ToggleButton.background,13%,derived) +ToggleButton.selectedBackground = darken($ToggleButton.background,20%,derived) +ToggleButton.disabledSelectedBackground = darken($ToggleButton.background,13%,derived) -ToggleButton.toolbar.selectedBackground=$ToggleButton.selectedBackground +ToggleButton.toolbar.selectedBackground = $ToggleButton.selectedBackground #---- ToolTip ---- -ToolTip.border=4,6,4,6,$InternalFrame.activeBorderColor -ToolTip.background=#fafafa +ToolTip.border = 4,6,4,6,$InternalFrame.activeBorderColor +ToolTip.background = #fafafa #---- Tree ---- -Tree.hash=#E6E6E6 +Tree.hash = #E6E6E6 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties index 2edf5de3..1226c705 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties @@ -16,137 +16,137 @@ #---- Button ---- -Button.startBackground=$Button.background -Button.endBackground=$Button.background -Button.startBorderColor=$Button.borderColor -Button.endBorderColor=$Button.borderColor +Button.startBackground = $Button.background +Button.endBackground = $Button.background +Button.startBorderColor = $Button.borderColor +Button.endBorderColor = $Button.borderColor -Button.default.startBackground=$Button.default.background -Button.default.endBackground=$Button.default.background -Button.default.startBorderColor=$Button.default.borderColor -Button.default.endBorderColor=$Button.default.borderColor +Button.default.startBackground = $Button.default.background +Button.default.endBackground = $Button.default.background +Button.default.startBorderColor = $Button.default.borderColor +Button.default.endBorderColor = $Button.default.borderColor -Button.hoverBorderColor=null -Button.default.hoverBorderColor=null +Button.hoverBorderColor = null +Button.default.hoverBorderColor = null #---- HelpButton ---- -HelpButton.hoverBorderColor=null +HelpButton.hoverBorderColor = null #---- Slider ---- -Slider.focusedColor=fade($Component.focusColor,40%,derived) +Slider.focusedColor = fade($Component.focusColor,40%,derived) #---- ToggleButton ---- -ToggleButton.startBackground=$ToggleButton.background -ToggleButton.endBackground=$ToggleButton.background -[dark]ToggleButton.selectedBackground=lighten($ToggleButton.background,15%,derived) -[dark]ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,5%,derived) +ToggleButton.startBackground = $ToggleButton.background +ToggleButton.endBackground = $ToggleButton.background +[dark]ToggleButton.selectedBackground = lighten($ToggleButton.background,15%,derived) +[dark]ToggleButton.disabledSelectedBackground = lighten($ToggleButton.background,5%,derived) #---- theme specific ---- -[Arc_Theme]ProgressBar.selectionBackground=#000 -[Arc_Theme]ProgressBar.selectionForeground=#fff +[Arc_Theme]ProgressBar.selectionBackground = #000 +[Arc_Theme]ProgressBar.selectionForeground = #fff -[Arc_Theme_-_Orange]ProgressBar.selectionBackground=#000 -[Arc_Theme_-_Orange]ProgressBar.selectionForeground=#fff +[Arc_Theme_-_Orange]ProgressBar.selectionBackground = #000 +[Arc_Theme_-_Orange]ProgressBar.selectionForeground = #fff -[Arc_Theme_Dark]ProgressBar.selectionBackground=#ddd -[Arc_Theme_Dark]ProgressBar.selectionForeground=#ddd +[Arc_Theme_Dark]ProgressBar.selectionBackground = #ddd +[Arc_Theme_Dark]ProgressBar.selectionForeground = #ddd -[Arc_Theme_Dark_-_Orange]ProgressBar.selectionBackground=#ddd -[Arc_Theme_Dark_-_Orange]ProgressBar.selectionForeground=#fff +[Arc_Theme_Dark_-_Orange]ProgressBar.selectionBackground = #ddd +[Arc_Theme_Dark_-_Orange]ProgressBar.selectionForeground = #fff -[Cobalt_2]CheckBox.icon.background=#002946 -[Cobalt_2]CheckBox.icon.checkmarkColor=#002946 +[Cobalt_2]CheckBox.icon.background = #002946 +[Cobalt_2]CheckBox.icon.checkmarkColor = #002946 -[Dark_purple]Slider.focusedColor=fade($Component.focusColor,70%,derived) +[Dark_purple]Slider.focusedColor = fade($Component.focusColor,70%,derived) -[Dracula]ProgressBar.selectionBackground=#fff -[Dracula]ProgressBar.selectionForeground=#fff +[Dracula]ProgressBar.selectionBackground = #fff +[Dracula]ProgressBar.selectionForeground = #fff -[Gruvbox_Dark_Hard]ToggleButton.selectedBackground=$ToggleButton.selectedBackground -[Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground +[Gruvbox_Dark_Hard]ToggleButton.selectedBackground = $ToggleButton.selectedBackground +[Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground -[Gruvbox_Dark_Medium]ToggleButton.selectedBackground=$ToggleButton.selectedBackground -[Gruvbox_Dark_Medium]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground +[Gruvbox_Dark_Medium]ToggleButton.selectedBackground = $ToggleButton.selectedBackground +[Gruvbox_Dark_Medium]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground -[Gruvbox_Dark_Soft]ToggleButton.selectedBackground=$ToggleButton.selectedBackground -[Gruvbox_Dark_Soft]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground +[Gruvbox_Dark_Soft]ToggleButton.selectedBackground = $ToggleButton.selectedBackground +[Gruvbox_Dark_Soft]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground -[Hiberbee_Dark]ToggleButton.selectedBackground=$ToggleButton.selectedBackground -[Hiberbee_Dark]ToggleButton.selectedBackground=$ToggleButton.selectedBackground -[Hiberbee_Dark]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground +[Hiberbee_Dark]ToggleButton.selectedBackground = $ToggleButton.selectedBackground +[Hiberbee_Dark]ToggleButton.selectedBackground = $ToggleButton.selectedBackground +[Hiberbee_Dark]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground -[High_contrast]ToggleButton.selectedBackground=#fff -[High_contrast]ToggleButton.selectedForeground=#000 -[High_contrast]ToggleButton.disabledSelectedBackground=#444 -[High_contrast]ToggleButton.toolbar.selectedBackground=#fff +[High_contrast]ToggleButton.selectedBackground = #fff +[High_contrast]ToggleButton.selectedForeground = #000 +[High_contrast]ToggleButton.disabledSelectedBackground = #444 +[High_contrast]ToggleButton.toolbar.selectedBackground = #fff -[One_Dark]Slider.focusedColor=fade(#568af2,40%) +[One_Dark]Slider.focusedColor = fade(#568af2,40%) -[Solarized_Dark]Slider.focusedColor=fade($Component.focusColor,80%,derived) +[Solarized_Dark]Slider.focusedColor = fade($Component.focusColor,80%,derived) -[vuesion-theme]Slider.trackValueColor=#ececee -[vuesion-theme]Slider.trackColor=#303a45 -[vuesion-theme]Slider.thumbColor=#ececee -[vuesion-theme]Slider.focusedColor=fade(#ececee,20%) +[vuesion-theme]Slider.trackValueColor = #ececee +[vuesion-theme]Slider.trackColor = #303a45 +[vuesion-theme]Slider.thumbColor = #ececee +[vuesion-theme]Slider.focusedColor = fade(#ececee,20%) # Material Theme UI Lite -[Dracula_Contrast]ProgressBar.selectionBackground=#fff -[Dracula_Contrast]ProgressBar.selectionForeground=#fff +[Dracula_Contrast]ProgressBar.selectionBackground = #fff +[Dracula_Contrast]ProgressBar.selectionForeground = #fff -[GitHub]ProgressBar.selectionBackground=#222 -[GitHub]ProgressBar.selectionForeground=#222 +[GitHub]ProgressBar.selectionBackground = #222 +[GitHub]ProgressBar.selectionForeground = #222 -[GitHub_Contrast]ProgressBar.selectionBackground=#222 -[GitHub_Contrast]ProgressBar.selectionForeground=#222 +[GitHub_Contrast]ProgressBar.selectionBackground = #222 +[GitHub_Contrast]ProgressBar.selectionForeground = #222 -[Light_Owl]ProgressBar.selectionBackground=#111 -[Light_Owl]ProgressBar.selectionForeground=#fff +[Light_Owl]ProgressBar.selectionBackground = #111 +[Light_Owl]ProgressBar.selectionForeground = #fff -[Light_Owl_Contrast]ProgressBar.selectionBackground=#111 -[Light_Owl_Contrast]ProgressBar.selectionForeground=#fff +[Light_Owl_Contrast]ProgressBar.selectionBackground = #111 +[Light_Owl_Contrast]ProgressBar.selectionForeground = #fff -[Material_Lighter]ProgressBar.selectionBackground=#222 -[Material_Lighter]ProgressBar.selectionForeground=#fff +[Material_Lighter]ProgressBar.selectionBackground = #222 +[Material_Lighter]ProgressBar.selectionForeground = #fff -[Material_Lighter_Contrast]ProgressBar.selectionBackground=#222 -[Material_Lighter_Contrast]ProgressBar.selectionForeground=#fff +[Material_Lighter_Contrast]ProgressBar.selectionBackground = #222 +[Material_Lighter_Contrast]ProgressBar.selectionForeground = #fff -[Material_Oceanic]ProgressBar.selectionBackground=#ddd -[Material_Oceanic]ProgressBar.selectionForeground=#ddd +[Material_Oceanic]ProgressBar.selectionBackground = #ddd +[Material_Oceanic]ProgressBar.selectionForeground = #ddd -[Material_Oceanic_Contrast]ProgressBar.selectionBackground=#ddd -[Material_Oceanic_Contrast]ProgressBar.selectionForeground=#ddd +[Material_Oceanic_Contrast]ProgressBar.selectionBackground = #ddd +[Material_Oceanic_Contrast]ProgressBar.selectionForeground = #ddd -[Material_Palenight]ProgressBar.selectionBackground=#ddd -[Material_Palenight]ProgressBar.selectionForeground=#ddd +[Material_Palenight]ProgressBar.selectionBackground = #ddd +[Material_Palenight]ProgressBar.selectionForeground = #ddd -[Material_Palenight_Contrast]ProgressBar.selectionBackground=#ddd -[Material_Palenight_Contrast]ProgressBar.selectionForeground=#ddd +[Material_Palenight_Contrast]ProgressBar.selectionBackground = #ddd +[Material_Palenight_Contrast]ProgressBar.selectionForeground = #ddd -[Night_Owl]ProgressBar.selectionBackground=#ddd -[Night_Owl]ProgressBar.selectionForeground=#ddd +[Night_Owl]ProgressBar.selectionBackground = #ddd +[Night_Owl]ProgressBar.selectionForeground = #ddd -[Night_Owl_Contrast]ProgressBar.selectionBackground=#ddd -[Night_Owl_Contrast]ProgressBar.selectionForeground=#ddd +[Night_Owl_Contrast]ProgressBar.selectionBackground = #ddd +[Night_Owl_Contrast]ProgressBar.selectionForeground = #ddd -[Solarized_Dark]ProgressBar.selectionBackground=#ccc -[Solarized_Dark]ProgressBar.selectionForeground=#ccc +[Solarized_Dark]ProgressBar.selectionBackground = #ccc +[Solarized_Dark]ProgressBar.selectionForeground = #ccc -[Material_Solarized_Dark_Contrast]ProgressBar.selectionBackground=#ccc -[Material_Solarized_Dark_Contrast]ProgressBar.selectionForeground=#ccc +[Material_Solarized_Dark_Contrast]ProgressBar.selectionBackground = #ccc +[Material_Solarized_Dark_Contrast]ProgressBar.selectionForeground = #ccc -[Solarized_Light]ProgressBar.selectionBackground=#222 -[Solarized_Light]ProgressBar.selectionForeground=#fff +[Solarized_Light]ProgressBar.selectionBackground = #222 +[Solarized_Light]ProgressBar.selectionForeground = #fff -[Material_Solarized_Light_Contrast]ProgressBar.selectionBackground=#222 -[Material_Solarized_Light_Contrast]ProgressBar.selectionForeground=#fff +[Material_Solarized_Light_Contrast]ProgressBar.selectionBackground = #222 +[Material_Solarized_Light_Contrast]ProgressBar.selectionForeground = #fff diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle.properties index 06caf173..9a671122 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle.properties @@ -15,51 +15,51 @@ #---- FileChooser ---- #fields -FileChooser.lookInLabel.textAndMnemonic=Look &In: -FileChooser.saveInLabelText=Save In: -FileChooser.fileNameLabel.textAndMnemonic=File &Name: -FileChooser.folderNameLabel.textAndMnemonic=Folder &name: -FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type: +FileChooser.lookInLabel.textAndMnemonic = Look &In: +FileChooser.saveInLabelText = Save In: +FileChooser.fileNameLabel.textAndMnemonic = File &Name: +FileChooser.folderNameLabel.textAndMnemonic = Folder &name: +FileChooser.filesOfTypeLabel.textAndMnemonic = Files of &Type: # toolbar -FileChooser.upFolderToolTipText=Up One Level -FileChooser.upFolderAccessibleName=Up -FileChooser.homeFolderToolTipText=Home -FileChooser.homeFolderAccessibleName=Home -FileChooser.newFolderToolTipText=Create New Folder -FileChooser.newFolderAccessibleName=New Folder -FileChooser.listViewButtonToolTipText=List -FileChooser.listViewButtonAccessibleName=List -FileChooser.detailsViewButtonToolTipText=Details -FileChooser.detailsViewButtonAccessibleName=Details +FileChooser.upFolderToolTipText = Up One Level +FileChooser.upFolderAccessibleName = Up +FileChooser.homeFolderToolTipText = Home +FileChooser.homeFolderAccessibleName = Home +FileChooser.newFolderToolTipText = Create New Folder +FileChooser.newFolderAccessibleName = New Folder +FileChooser.listViewButtonToolTipText = List +FileChooser.listViewButtonAccessibleName = List +FileChooser.detailsViewButtonToolTipText = Details +FileChooser.detailsViewButtonAccessibleName = Details # details table header -FileChooser.fileNameHeaderText=Name -FileChooser.fileSizeHeaderText=Size -FileChooser.fileTypeHeaderText=Type -FileChooser.fileDateHeaderText=Modified -FileChooser.fileAttrHeaderText=Attributes +FileChooser.fileNameHeaderText = Name +FileChooser.fileSizeHeaderText = Size +FileChooser.fileTypeHeaderText = Type +FileChooser.fileDateHeaderText = Modified +FileChooser.fileAttrHeaderText = Attributes # popup menu -FileChooser.viewMenuLabelText=View -FileChooser.refreshActionLabelText=Refresh -FileChooser.newFolderActionLabelText=New Folder -FileChooser.listViewActionLabelText=List -FileChooser.detailsViewActionLabelText=Details +FileChooser.viewMenuLabelText = View +FileChooser.refreshActionLabelText = Refresh +FileChooser.newFolderActionLabelText = New Folder +FileChooser.listViewActionLabelText = List +FileChooser.detailsViewActionLabelText = Details #---- SplitPaneDivider ---- -SplitPaneDivider.collapseLeftToolTipText=Collapse Left Pane -SplitPaneDivider.collapseRightToolTipText=Collapse Right Pane -SplitPaneDivider.collapseTopToolTipText=Collapse Top Pane -SplitPaneDivider.collapseBottomToolTipText=Collapse Bottom Pane -SplitPaneDivider.expandLeftToolTipText=Expand Left Pane -SplitPaneDivider.expandRightToolTipText=Expand Right Pane -SplitPaneDivider.expandTopToolTipText=Expand Top Pane -SplitPaneDivider.expandBottomToolTipText=Expand Bottom Pane +SplitPaneDivider.collapseLeftToolTipText = Collapse Left Pane +SplitPaneDivider.collapseRightToolTipText = Collapse Right Pane +SplitPaneDivider.collapseTopToolTipText = Collapse Top Pane +SplitPaneDivider.collapseBottomToolTipText = Collapse Bottom Pane +SplitPaneDivider.expandLeftToolTipText = Expand Left Pane +SplitPaneDivider.expandRightToolTipText = Expand Right Pane +SplitPaneDivider.expandTopToolTipText = Expand Top Pane +SplitPaneDivider.expandBottomToolTipText = Expand Bottom Pane #---- TabbedPane ---- -TabbedPane.moreTabsButtonToolTipText=Show Hidden Tabs +TabbedPane.moreTabsButtonToolTipText = Show Hidden Tabs diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_de.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_de.properties index 5f30c8dd..cd34243d 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_de.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_de.properties @@ -15,39 +15,39 @@ #---- FileChooser ---- #fields -FileChooser.lookInLabel.textAndMnemonic=Suchen &in: -FileChooser.saveInLabelText=Speichern in: -FileChooser.fileNameLabel.textAndMnemonic=&Dateiname: -FileChooser.folderNameLabel.textAndMnemonic=Ordner&name: -FileChooser.filesOfTypeLabel.textAndMnemonic=Datei&typ: +FileChooser.lookInLabel.textAndMnemonic = Suchen &in: +FileChooser.saveInLabelText = Speichern in: +FileChooser.fileNameLabel.textAndMnemonic = &Dateiname: +FileChooser.folderNameLabel.textAndMnemonic = Ordner&name: +FileChooser.filesOfTypeLabel.textAndMnemonic = Datei&typ: # toolbar -FileChooser.upFolderToolTipText=Eine Ebene h\u00F6her -FileChooser.upFolderAccessibleName=Nach oben -FileChooser.homeFolderToolTipText=Home -FileChooser.homeFolderAccessibleName=Home -FileChooser.newFolderToolTipText=Neuen Ordner erstellen -FileChooser.newFolderAccessibleName=Neuer Ordner -FileChooser.listViewButtonToolTipText=Liste -FileChooser.listViewButtonAccessibleName=Liste -FileChooser.detailsViewButtonToolTipText=Details -FileChooser.detailsViewButtonAccessibleName=Details +FileChooser.upFolderToolTipText = Eine Ebene h\u00F6her +FileChooser.upFolderAccessibleName = Nach oben +FileChooser.homeFolderToolTipText = Home +FileChooser.homeFolderAccessibleName = Home +FileChooser.newFolderToolTipText = Neuen Ordner erstellen +FileChooser.newFolderAccessibleName = Neuer Ordner +FileChooser.listViewButtonToolTipText = Liste +FileChooser.listViewButtonAccessibleName = Liste +FileChooser.detailsViewButtonToolTipText = Details +FileChooser.detailsViewButtonAccessibleName = Details # details table header -FileChooser.fileNameHeaderText=Name -FileChooser.fileSizeHeaderText=Gr\u00F6\u00DFe -FileChooser.fileTypeHeaderText=Typ -FileChooser.fileDateHeaderText=\u00C4nderungsdatum -FileChooser.fileAttrHeaderText=Attribute +FileChooser.fileNameHeaderText = Name +FileChooser.fileSizeHeaderText = Gr\u00F6\u00DFe +FileChooser.fileTypeHeaderText = Typ +FileChooser.fileDateHeaderText = \u00C4nderungsdatum +FileChooser.fileAttrHeaderText = Attribute # popup menu -FileChooser.viewMenuLabelText=Ansicht -FileChooser.refreshActionLabelText=Aktualisieren -FileChooser.newFolderActionLabelText=Neuer Ordner -FileChooser.listViewActionLabelText=Liste -FileChooser.detailsViewActionLabelText=Details +FileChooser.viewMenuLabelText = Ansicht +FileChooser.refreshActionLabelText = Aktualisieren +FileChooser.newFolderActionLabelText = Neuer Ordner +FileChooser.listViewActionLabelText = Liste +FileChooser.detailsViewActionLabelText = Details #---- TabbedPane ---- -TabbedPane.moreTabsButtonToolTipText=Verdeckte Tabs anzeigen +TabbedPane.moreTabsButtonToolTipText = Verdeckte Tabs anzeigen diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_fr.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_fr.properties index 4e6477ba..087bddd5 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_fr.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/resources/Bundle_fr.properties @@ -15,34 +15,34 @@ #---- FileChooser ---- #fields -FileChooser.lookInLabel.textAndMnemonic=Rechercher &dans: -FileChooser.saveInLabelText=Enregistrer dans: -FileChooser.fileNameLabel.textAndMnemonic=&Nom du fichier: -FileChooser.folderNameLabel.textAndMnemonic=&Nom du dossier: -FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier: +FileChooser.lookInLabel.textAndMnemonic = Rechercher &dans: +FileChooser.saveInLabelText = Enregistrer dans: +FileChooser.fileNameLabel.textAndMnemonic = &Nom du fichier: +FileChooser.folderNameLabel.textAndMnemonic = &Nom du dossier: +FileChooser.filesOfTypeLabel.textAndMnemonic = &Type de fichier: # toolbar -FileChooser.upFolderToolTipText=Remonte d'un niveau -FileChooser.upFolderAccessibleName=Monter -FileChooser.homeFolderToolTipText=R\u00E9pertoire de base -FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base -FileChooser.newFolderToolTipText=Cr\u00E9e un dossier -FileChooser.newFolderAccessibleName=Nouveau dossier -FileChooser.listViewButtonToolTipText=Liste -FileChooser.listViewButtonAccessibleName=Liste -FileChooser.detailsViewButtonToolTipText=D\u00E9tails -FileChooser.detailsViewButtonAccessibleName=D\u00E9tails +FileChooser.upFolderToolTipText = Remonte d'un niveau +FileChooser.upFolderAccessibleName = Monter +FileChooser.homeFolderToolTipText = R\u00E9pertoire de base +FileChooser.homeFolderAccessibleName = R\u00E9pertoire de base +FileChooser.newFolderToolTipText = Cr\u00E9e un dossier +FileChooser.newFolderAccessibleName = Nouveau dossier +FileChooser.listViewButtonToolTipText = Liste +FileChooser.listViewButtonAccessibleName = Liste +FileChooser.detailsViewButtonToolTipText = D\u00E9tails +FileChooser.detailsViewButtonAccessibleName = D\u00E9tails # details table header -FileChooser.fileNameHeaderText=Nom -FileChooser.fileSizeHeaderText=Taille -FileChooser.fileTypeHeaderText=Type -FileChooser.fileDateHeaderText=Modifi\u00E9 -FileChooser.fileAttrHeaderText=Attributs +FileChooser.fileNameHeaderText = Nom +FileChooser.fileSizeHeaderText = Taille +FileChooser.fileTypeHeaderText = Type +FileChooser.fileDateHeaderText = Modifi\u00E9 +FileChooser.fileAttrHeaderText = Attributs # popup menu -FileChooser.viewMenuLabelText=Affichage -FileChooser.refreshActionLabelText=Actualiser -FileChooser.newFolderActionLabelText=Nouveau dossier -FileChooser.listViewActionLabelText=Liste -FileChooser.detailsViewActionLabelText=D\u00E9tails +FileChooser.viewMenuLabelText = Affichage +FileChooser.refreshActionLabelText = Actualiser +FileChooser.newFolderActionLabelText = Nouveau dossier +FileChooser.listViewActionLabelText = Liste +FileChooser.detailsViewActionLabelText = D\u00E9tails diff --git a/flatlaf-demo/DemoLaf.properties b/flatlaf-demo/DemoLaf.properties index 6a76fcd6..0a4930b0 100644 --- a/flatlaf-demo/DemoLaf.properties +++ b/flatlaf-demo/DemoLaf.properties @@ -7,7 +7,7 @@ # base theme (light, dark, intellij or darcula) -@baseTheme=light +@baseTheme = light # add you theme defaults here -@background=#ccc +@background = #ccc diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatDarkLaf.properties b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatDarkLaf.properties index cb56e9fa..803f03b8 100644 --- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatDarkLaf.properties +++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatDarkLaf.properties @@ -14,4 +14,4 @@ # limitations under the License. # -HintPanel.backgroundColor=darken(#ffffe1,80%) +HintPanel.backgroundColor = darken(#ffffe1,80%) diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatLightLaf.properties b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatLightLaf.properties index 07b41420..1b848c29 100644 --- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatLightLaf.properties +++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/FlatLightLaf.properties @@ -14,4 +14,4 @@ # limitations under the License. # -HintPanel.backgroundColor=#ffffe1 +HintPanel.backgroundColor = #ffffe1 diff --git a/flatlaf-jide-oss/src/main/resources/com/formdev/flatlaf/jideoss/FlatLaf.properties b/flatlaf-jide-oss/src/main/resources/com/formdev/flatlaf/jideoss/FlatLaf.properties index af28ab79..b7be0abb 100644 --- a/flatlaf-jide-oss/src/main/resources/com/formdev/flatlaf/jideoss/FlatLaf.properties +++ b/flatlaf-jide-oss/src/main/resources/com/formdev/flatlaf/jideoss/FlatLaf.properties @@ -16,23 +16,23 @@ #---- UI delegates ---- -JideTabbedPaneUI=com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPaneUI -RangeSliderUI=com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI +JideTabbedPaneUI = com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPaneUI +RangeSliderUI = com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI #---- JidePopup ---- -Resizable.resizeBorder=4,4,4,4,$PopupMenu.borderColor +Resizable.resizeBorder = 4,4,4,4,$PopupMenu.borderColor #---- JideTabbedPane ---- -JideTabbedPane.background=@background -JideTabbedPane.foreground=@foreground -JideTabbedPane.tabAreaBackground=@background +JideTabbedPane.background = @background +JideTabbedPane.foreground = @foreground +JideTabbedPane.tabAreaBackground = @background -JideTabbedPane.tabInsets=$TabbedPane.tabInsets -JideTabbedPane.tabAreaInsets=$TabbedPane.tabAreaInsets -JideTabbedPane.contentBorderInsets=0,0,0,0 -JideTabbedPane.tabRunOverlay=$TabbedPane.tabRunOverlay -JideTabbedPane.shadow=$TabbedPane.shadow +JideTabbedPane.tabInsets = $TabbedPane.tabInsets +JideTabbedPane.tabAreaInsets = $TabbedPane.tabAreaInsets +JideTabbedPane.contentBorderInsets = 0,0,0,0 +JideTabbedPane.tabRunOverlay = $TabbedPane.tabRunOverlay +JideTabbedPane.shadow = $TabbedPane.shadow diff --git a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties index f3ec2b98..7ce6a467 100644 --- a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties +++ b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatDarkLaf.properties @@ -16,59 +16,59 @@ #---- BusyLabel ---- -JXBusyLabel.baseColor=#777 -JXBusyLabel.highlightColor=#e0e0e0 +JXBusyLabel.baseColor = #777 +JXBusyLabel.highlightColor = #e0e0e0 #---- Header ---- -JXHeader.background=@background -JXHeader.startBackground=#4c5052 +JXHeader.background = @background +JXHeader.startBackground = #4c5052 #---- HighlighterFactory ---- -UIColorHighlighter.stripingBackground=lighten(@textComponentBackground,5%) +UIColorHighlighter.stripingBackground = lighten(@textComponentBackground,5%) #---- Hyperlink ---- -Hyperlink.linkColor=#589df6 -Hyperlink.visitedColor=$Hyperlink.linkColor -Hyperlink.disabledText=@disabledText +Hyperlink.linkColor = #589df6 +Hyperlink.visitedColor = $Hyperlink.linkColor +Hyperlink.disabledText = @disabledText #---- MonthView ---- -JXMonthView.background=@textComponentBackground -JXMonthView.monthStringBackground=#4c5052 -JXMonthView.monthStringForeground=@foreground -JXMonthView.daysOfTheWeekForeground=#aaa -JXMonthView.weekOfTheYearForeground=#888 -JXMonthView.unselectableDayForeground=#E05555 -JXMonthView.selectedBackground=@selectionBackground -JXMonthView.flaggedDayForeground=#E05555 -JXMonthView.leadingDayForeground=@disabledText -JXMonthView.trailingDayForeground=@disabledText -JXMonthView.arrowColor=@foreground -JXMonthView.disabledArrowColor=@disabledText +JXMonthView.background = @textComponentBackground +JXMonthView.monthStringBackground = #4c5052 +JXMonthView.monthStringForeground = @foreground +JXMonthView.daysOfTheWeekForeground = #aaa +JXMonthView.weekOfTheYearForeground = #888 +JXMonthView.unselectableDayForeground = #E05555 +JXMonthView.selectedBackground = @selectionBackground +JXMonthView.flaggedDayForeground = #E05555 +JXMonthView.leadingDayForeground = @disabledText +JXMonthView.trailingDayForeground = @disabledText +JXMonthView.arrowColor = @foreground +JXMonthView.disabledArrowColor = @disabledText #---- TaskPaneContainer ---- -TaskPaneContainer.background=#3E434C -TaskPaneContainer.border=10,10,10,10 +TaskPaneContainer.background = #3E434C +TaskPaneContainer.border = 10,10,10,10 #---- TaskPane ---- -TaskPane.background=@background -TaskPane.borderColor=$Button.borderColor -TaskPane.contentInsets=10,10,10,10 +TaskPane.background = @background +TaskPane.borderColor = $Button.borderColor +TaskPane.contentInsets = 10,10,10,10 -TaskPane.titleBackgroundGradientStart=#4c5052 -TaskPane.titleForeground=@foreground -TaskPane.titleOver=#888 -TaskPane.specialTitleBackground=#afafaf -TaskPane.specialTitleForeground=#222 -TaskPane.specialTitleOver=#666 +TaskPane.titleBackgroundGradientStart = #4c5052 +TaskPane.titleForeground = @foreground +TaskPane.titleOver = #888 +TaskPane.specialTitleBackground = #afafaf +TaskPane.specialTitleForeground = #222 +TaskPane.specialTitleOver = #666 diff --git a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties index 3d0ca7b7..b15408db 100644 --- a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties +++ b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties @@ -16,29 +16,29 @@ #---- UI delegates ---- -BusyLabelUI=com.formdev.flatlaf.swingx.ui.FlatBusyLabelUI -DatePickerUI=com.formdev.flatlaf.swingx.ui.FlatDatePickerUI -HeaderUI=com.formdev.flatlaf.swingx.ui.FlatHeaderUI -HyperlinkUI=com.formdev.flatlaf.swingx.ui.FlatHyperlinkUI -MonthViewUI=com.formdev.flatlaf.swingx.ui.FlatMonthViewUI -swingx/TaskPaneUI=com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI -TitledPanelUI=com.formdev.flatlaf.swingx.ui.FlatTitledPanelUI +BusyLabelUI = com.formdev.flatlaf.swingx.ui.FlatBusyLabelUI +DatePickerUI = com.formdev.flatlaf.swingx.ui.FlatDatePickerUI +HeaderUI = com.formdev.flatlaf.swingx.ui.FlatHeaderUI +HyperlinkUI = com.formdev.flatlaf.swingx.ui.FlatHyperlinkUI +MonthViewUI = com.formdev.flatlaf.swingx.ui.FlatMonthViewUI +swingx/TaskPaneUI = com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI +TitledPanelUI = com.formdev.flatlaf.swingx.ui.FlatTitledPanelUI #---- DatePicker ---- -JXDatePicker.border=com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder +JXDatePicker.border = com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder #---- MonthView ---- -JXMonthView.monthDownFileName={icon}com.formdev.flatlaf.swingx.ui.FlatMonthDownIcon -JXMonthView.monthUpFileName={icon}com.formdev.flatlaf.swingx.ui.FlatMonthUpIcon +JXMonthView.monthDownFileName = {icon}com.formdev.flatlaf.swingx.ui.FlatMonthDownIcon +JXMonthView.monthUpFileName = {icon}com.formdev.flatlaf.swingx.ui.FlatMonthUpIcon #---- TitledPanel ---- -JXTitledPanel.borderColor=$Button.borderColor -JXTitledPanel.titleBackground=$TaskPane.titleBackgroundGradientStart -JXTitledPanel.titleForeground=$TaskPane.titleForeground -JXTitledPanel.captionInsets=4,10,4,10 +JXTitledPanel.borderColor = $Button.borderColor +JXTitledPanel.titleBackground = $TaskPane.titleBackgroundGradientStart +JXTitledPanel.titleForeground = $TaskPane.titleForeground +JXTitledPanel.captionInsets = 4,10,4,10 diff --git a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties index 094a29fe..fd81dfc8 100644 --- a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties +++ b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLightLaf.properties @@ -16,59 +16,59 @@ #---- BusyLabel ---- -JXBusyLabel.baseColor=#c4c4c4 -JXBusyLabel.highlightColor=#808080 +JXBusyLabel.baseColor = #c4c4c4 +JXBusyLabel.highlightColor = #808080 #---- Header ---- -JXHeader.background=@background -JXHeader.startBackground=#fff +JXHeader.background = @background +JXHeader.startBackground = #fff #---- HighlighterFactory ---- -UIColorHighlighter.stripingBackground=darken(@textComponentBackground,5%) +UIColorHighlighter.stripingBackground = darken(@textComponentBackground,5%) #---- Hyperlink ---- -Hyperlink.linkColor=$Component.linkColor -Hyperlink.visitedColor=$Hyperlink.linkColor -Hyperlink.disabledText=@disabledText +Hyperlink.linkColor = $Component.linkColor +Hyperlink.visitedColor = $Hyperlink.linkColor +Hyperlink.disabledText = @disabledText #---- MonthView ---- -JXMonthView.background=@textComponentBackground -JXMonthView.monthStringBackground=#dfdfdf -JXMonthView.monthStringForeground=@foreground -JXMonthView.daysOfTheWeekForeground=#444 -JXMonthView.weekOfTheYearForeground=#666 -JXMonthView.unselectableDayForeground=#E02222 -JXMonthView.selectedBackground=#B9CEF8 -JXMonthView.flaggedDayForeground=#E02222 -JXMonthView.leadingDayForeground=@disabledText -JXMonthView.trailingDayForeground=@disabledText -JXMonthView.arrowColor=@foreground -JXMonthView.disabledArrowColor=@disabledText +JXMonthView.background = @textComponentBackground +JXMonthView.monthStringBackground = #dfdfdf +JXMonthView.monthStringForeground = @foreground +JXMonthView.daysOfTheWeekForeground = #444 +JXMonthView.weekOfTheYearForeground = #666 +JXMonthView.unselectableDayForeground = #E02222 +JXMonthView.selectedBackground = #B9CEF8 +JXMonthView.flaggedDayForeground = #E02222 +JXMonthView.leadingDayForeground = @disabledText +JXMonthView.trailingDayForeground = @disabledText +JXMonthView.arrowColor = @foreground +JXMonthView.disabledArrowColor = @disabledText #---- TaskPaneContainer ---- -TaskPaneContainer.background=#E6EBF0 -TaskPaneContainer.border=10,10,10,10 +TaskPaneContainer.background = #E6EBF0 +TaskPaneContainer.border = 10,10,10,10 #---- TaskPane ---- -TaskPane.background=@background -TaskPane.borderColor=$Button.borderColor -TaskPane.contentInsets=10,10,10,10 +TaskPane.background = @background +TaskPane.borderColor = $Button.borderColor +TaskPane.contentInsets = 10,10,10,10 -TaskPane.titleBackgroundGradientStart=#dfdfdf -TaskPane.titleForeground=#222 -TaskPane.titleOver=#666 -TaskPane.specialTitleBackground=#afafaf -TaskPane.specialTitleForeground=#222 -TaskPane.specialTitleOver=#666 +TaskPane.titleBackgroundGradientStart = #dfdfdf +TaskPane.titleForeground = #222 +TaskPane.titleOver = #666 +TaskPane.specialTitleBackground = #afafaf +TaskPane.specialTitleForeground = #222 +TaskPane.specialTitleOver = #666 diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index 60e04c10..497605fa 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -16,351 +16,351 @@ #---- variables ---- -@background=#cfc -@foreground=#f00 -@selectionBackground=#0a0 -@selectionForeground=#ff0 -@selectionInactiveBackground=#888 -@selectionInactiveForeground=#fff -@disabledText=#008 -@textComponentBackground=#fff -@menuBackground=#fff -@menuHoverBackground=darken(@menuBackground,10%) -@menuCheckBackground=#ccf -@menuAcceleratorForeground=#f88 -@menuAcceleratorSelectionForeground=#fff -@cellFocusColor=#f00 -@icon=#afafaf +@background = #cfc +@foreground = #f00 +@selectionBackground = #0a0 +@selectionForeground = #ff0 +@selectionInactiveBackground = #888 +@selectionInactiveForeground = #fff +@disabledText = #008 +@textComponentBackground = #fff +@menuBackground = #fff +@menuHoverBackground = darken(@menuBackground,10%) +@menuCheckBackground = #ccf +@menuAcceleratorForeground = #f88 +@menuAcceleratorSelectionForeground = #fff +@cellFocusColor = #f00 +@icon = #afafaf -@dropCellBackground=#f00 -@dropCellForeground=#0f0 -@dropLineColor=#00f -@dropLineShortColor=#ff0 +@dropCellBackground = #f00 +@dropCellForeground = #0f0 +@dropLineColor = #00f +@dropLineShortColor = #ff0 #---- globals ---- -*.caretForeground=#00f -*.inactiveBackground=#f0f0f0 -*.inactiveForeground=#008 -*.disabledBackground=#e0e0e0 +*.caretForeground = #00f +*.inactiveBackground = #f0f0f0 +*.inactiveForeground = #008 +*.disabledBackground = #e0e0e0 #---- system colors ---- -activeCaption=#99b4d1 -inactiveCaption=#bfcddb -controlHighlight=#e3e3e3 -controlLtHighlight=#fff -controlShadow=#a0a0a0 -controlDkShadow=#696969 +activeCaption = #99b4d1 +inactiveCaption = #bfcddb +controlHighlight = #e3e3e3 +controlLtHighlight = #fff +controlShadow = #a0a0a0 +controlDkShadow = #696969 #---- Button ---- -Button.startBackground=#fff -Button.endBackground=#bbb -Button.focusedBackground=#0ff -Button.hoverBackground=#ff0 -Button.pressedBackground=#FFC800 +Button.startBackground = #fff +Button.endBackground = #bbb +Button.focusedBackground = #0ff +Button.hoverBackground = #ff0 +Button.pressedBackground = #FFC800 -Button.startBorderColor=#00f -Button.endBorderColor=#f00 -Button.disabledBorderColor=#008 -Button.focusedBorderColor=#466d94 -Button.hoverBorderColor=#f00 +Button.startBorderColor = #00f +Button.endBorderColor = #f00 +Button.disabledBorderColor = #008 +Button.focusedBorderColor = #466d94 +Button.hoverBorderColor = #f00 -Button.default.startBackground=#ddd -Button.default.endBackground=#888 -Button.default.foreground=#800 -Button.default.focusedBackground=#0ff -Button.default.hoverBackground=#ff0 -Button.default.pressedBackground=#FFC800 -Button.default.startBorderColor=#f00 -Button.default.endBorderColor=#00f -Button.default.hoverBorderColor=#f00 -Button.default.focusedBorderColor=#537699 -Button.default.focusColor=#f00 +Button.default.startBackground = #ddd +Button.default.endBackground = #888 +Button.default.foreground = #800 +Button.default.focusedBackground = #0ff +Button.default.hoverBackground = #ff0 +Button.default.pressedBackground = #FFC800 +Button.default.startBorderColor = #f00 +Button.default.endBorderColor = #00f +Button.default.hoverBorderColor = #f00 +Button.default.focusedBorderColor = #537699 +Button.default.focusColor = #f00 -Button.toolbar.hoverBackground=#fff -Button.toolbar.pressedBackground=#eee +Button.toolbar.hoverBackground = #fff +Button.toolbar.pressedBackground = #eee #---- CheckBox ---- # enabled -CheckBox.icon.borderColor=#878787 -CheckBox.icon.background=#fff -CheckBox.icon.selectedBorderColor=#4982CC -CheckBox.icon.selectedBackground=#4D89C9 -CheckBox.icon.checkmarkColor=#fff +CheckBox.icon.borderColor = #878787 +CheckBox.icon.background = #fff +CheckBox.icon.selectedBorderColor = #4982CC +CheckBox.icon.selectedBackground = #4D89C9 +CheckBox.icon.checkmarkColor = #fff # disabled -CheckBox.icon.disabledBorderColor=#BDBDBD -CheckBox.icon.disabledBackground=#F2F2F2 -CheckBox.icon.disabledCheckmarkColor=#ABABAB +CheckBox.icon.disabledBorderColor = #BDBDBD +CheckBox.icon.disabledBackground = #F2F2F2 +CheckBox.icon.disabledCheckmarkColor = #ABABAB # focused -CheckBox.icon.focusedBorderColor=#7B9FC7 -CheckBox.icon.focusedBackground=#0ff -CheckBox.icon.selectedFocusedBorderColor=#ACCFF7 +CheckBox.icon.focusedBorderColor = #7B9FC7 +CheckBox.icon.focusedBackground = #0ff +CheckBox.icon.selectedFocusedBorderColor = #ACCFF7 # hover -CheckBox.icon.hoverBorderColor=#f00 -CheckBox.icon.hoverBackground=#ff0 +CheckBox.icon.hoverBorderColor = #f00 +CheckBox.icon.hoverBackground = #ff0 # pressed -CheckBox.icon.pressedBackground=#FFC800 +CheckBox.icon.pressedBackground = #FFC800 #---- ComboBox ---- -ComboBox.background=#fff -ComboBox.buttonBackground=#f0f0f0 -ComboBox.buttonEditableBackground=#ccc -ComboBox.buttonArrowColor=#666 -ComboBox.buttonDisabledArrowColor=#ABABAB -ComboBox.buttonHoverArrowColor=#f00 -ComboBox.buttonPressedArrowColor=#00f +ComboBox.background = #fff +ComboBox.buttonBackground = #f0f0f0 +ComboBox.buttonEditableBackground = #ccc +ComboBox.buttonArrowColor = #666 +ComboBox.buttonDisabledArrowColor = #ABABAB +ComboBox.buttonHoverArrowColor = #f00 +ComboBox.buttonPressedArrowColor = #00f #---- Component ---- -Component.borderColor=#f00 -Component.disabledBorderColor=#008 -Component.focusedBorderColor=#466d94 -Component.focusColor=#97c3f3 -#Component.focusWidth=5 -#Component.arc=8 -Component.grayFilter=25,25,100 +Component.borderColor = #f00 +Component.disabledBorderColor = #008 +Component.focusedBorderColor = #466d94 +Component.focusColor = #97c3f3 +#Component.focusWidth = 5 +#Component.arc = 8 +Component.grayFilter = 25,25,100 #---- Desktop ---- -Desktop.background=#afe +Desktop.background = #afe #---- DesktopIcon ---- -DesktopIcon.background=darken($Desktop.background,20%) +DesktopIcon.background = darken($Desktop.background,20%) #---- HelpButton ---- -HelpButton.questionMarkColor=#00f +HelpButton.questionMarkColor = #00f #---- InternalFrame ---- -InternalFrame.activeTitleBackground=#800 -InternalFrame.activeTitleForeground=#faa -InternalFrame.inactiveTitleBackground=#080 -InternalFrame.inactiveTitleForeground=#afa +InternalFrame.activeTitleBackground = #800 +InternalFrame.activeTitleForeground = #faa +InternalFrame.inactiveTitleBackground = #080 +InternalFrame.inactiveTitleForeground = #afa -InternalFrame.activeBorderColor=#f00 -InternalFrame.inactiveBorderColor=#0f0 +InternalFrame.activeBorderColor = #f00 +InternalFrame.inactiveBorderColor = #0f0 -InternalFrame.buttonHoverBackground=#060 -InternalFrame.buttonPressedBackground=#0a0 -InternalFrame.closeHoverBackground=#008 -InternalFrame.closePressedBackground=#00f -InternalFrame.closeHoverForeground=#fff -InternalFrame.closePressedForeground=#fff +InternalFrame.buttonHoverBackground = #060 +InternalFrame.buttonPressedBackground = #0a0 +InternalFrame.closeHoverBackground = #008 +InternalFrame.closePressedBackground = #00f +InternalFrame.closeHoverForeground = #fff +InternalFrame.closePressedForeground = #fff #---- Label ---- -Label.foreground=#080 -Label.disabledForeground=#008 +Label.foreground = #080 +Label.disabledForeground = #008 #---- List ---- -List.background=#f0ffff -List.cellNoFocusBorder=1,6,1,6 -List.focusSelectedCellHighlightBorder=1,6,1,6,#800 -List.focusCellHighlightBorder=1,6,1,6,#800 +List.background = #f0ffff +List.cellNoFocusBorder = 1,6,1,6 +List.focusSelectedCellHighlightBorder = 1,6,1,6,#800 +List.focusCellHighlightBorder = 1,6,1,6,#800 #---- Menu ---- -Menu.icon.arrowColor=#4D89C9 -Menu.icon.disabledArrowColor=#ABABAB +Menu.icon.arrowColor = #4D89C9 +Menu.icon.disabledArrowColor = #ABABAB #---- MenuBar ---- -MenuBar.borderColor=#44f -MenuBar.hoverBackground=#fdd +MenuBar.borderColor = #44f +MenuBar.hoverBackground = #fdd -MenuBar.underlineSelectionBackground=#0f0 -MenuBar.underlineSelectionColor=#f00 -MenuBar.underlineSelectionHeight=5 +MenuBar.underlineSelectionBackground = #0f0 +MenuBar.underlineSelectionColor = #f00 +MenuBar.underlineSelectionHeight = 5 #---- MenuItemCheckBox ---- -MenuItemCheckBox.icon.checkmarkColor=#4D89C9 -MenuItemCheckBox.icon.disabledCheckmarkColor=#ABABAB +MenuItemCheckBox.icon.checkmarkColor = #4D89C9 +MenuItemCheckBox.icon.disabledCheckmarkColor = #ABABAB #---- OptionPane ---- -OptionPane.background=#fdd -OptionPane.foreground=#f00 +OptionPane.background = #fdd +OptionPane.foreground = #f00 -OptionPane.icon.errorColor=#f00 -OptionPane.icon.informationColor=#0f0 -OptionPane.icon.questionColor=#00f -OptionPane.icon.warningColor=#fc0 -OptionPane.icon.foreground=#fff +OptionPane.icon.errorColor = #f00 +OptionPane.icon.informationColor = #0f0 +OptionPane.icon.questionColor = #00f +OptionPane.icon.warningColor = #fc0 +OptionPane.icon.foreground = #fff #---- Popup ---- -Popup.dropShadowColor=#0f0 -Popup.dropShadowOpacity=0.5 -Popup.dropShadowInsets=-6,6,6,6 +Popup.dropShadowColor = #0f0 +Popup.dropShadowOpacity = 0.5 +Popup.dropShadowInsets = -6,6,6,6 #---- PopupMenu ---- -PopupMenu.borderColor=#00f +PopupMenu.borderColor = #00f #---- PopupMenuSeparator ---- -PopupMenuSeparator.height=30 -PopupMenuSeparator.stripeWidth=3 -PopupMenuSeparator.stripeIndent=1 +PopupMenuSeparator.height = 30 +PopupMenuSeparator.stripeWidth = 3 +PopupMenuSeparator.stripeIndent = 1 #---- ProgressBar ---- -ProgressBar.background=#8f8 -ProgressBar.foreground=#73737333 -ProgressBar.selectionForeground=#f00 -ProgressBar.selectionBackground=#008 -ProgressBar.cycleTime=10000 +ProgressBar.background = #8f8 +ProgressBar.foreground = #73737333 +ProgressBar.selectionForeground = #f00 +ProgressBar.selectionBackground = #008 +ProgressBar.cycleTime = 10000 #---- ScrollBar ---- -ScrollBar.track=#8f8 -ScrollBar.thumb=#73737333 -ScrollBar.hoverTrackColor=#0f0 -ScrollBar.hoverThumbColor=#f00 +ScrollBar.track = #8f8 +ScrollBar.thumb = #73737333 +ScrollBar.hoverTrackColor = #0f0 +ScrollBar.hoverThumbColor = #f00 #---- Separator ---- -Separator.foreground=#0b0 -Separator.height=20 -Separator.stripeWidth=10 -Separator.stripeIndent=5 +Separator.foreground = #0b0 +Separator.height = 20 +Separator.stripeWidth = 10 +Separator.stripeIndent = 5 #---- Slider ---- -Slider.trackColor=#8f8 -Slider.thumbColor=#faa -Slider.thumbBorderColor=#f00 -Slider.tickColor=#f00 -Slider.focusedColor=$Component.focusColor -Slider.hoverThumbColor=#00f -Slider.pressedThumbColor=#0f0 -Slider.disabledTrackColor=#ff8 -Slider.disabledThumbColor=#880 +Slider.trackColor = #8f8 +Slider.thumbColor = #faa +Slider.thumbBorderColor = #f00 +Slider.tickColor = #f00 +Slider.focusedColor = $Component.focusColor +Slider.hoverThumbColor = #00f +Slider.pressedThumbColor = #0f0 +Slider.disabledTrackColor = #ff8 +Slider.disabledThumbColor = #880 #---- SplitPane ---- -SplitPaneDivider.draggingColor=#800 -SplitPaneDivider.oneTouchArrowColor=#0f0 -SplitPaneDivider.oneTouchHoverArrowColor=#f00 -SplitPaneDivider.oneTouchPressedArrowColor=#00f +SplitPaneDivider.draggingColor = #800 +SplitPaneDivider.oneTouchArrowColor = #0f0 +SplitPaneDivider.oneTouchHoverArrowColor = #f00 +SplitPaneDivider.oneTouchPressedArrowColor = #00f #---- TabbedPane ---- -TabbedPane.disabledForeground=#777 -TabbedPane.selectedBackground=#0f0 -TabbedPane.selectedForeground=#00f -TabbedPane.underlineColor=#ff0 -TabbedPane.disabledUnderlineColor=#7a7a7a -TabbedPane.hoverColor=#eee -TabbedPane.focusColor=#ddd -TabbedPane.tabSeparatorColor=#00f -TabbedPane.contentAreaColor=#f00 +TabbedPane.disabledForeground = #777 +TabbedPane.selectedBackground = #0f0 +TabbedPane.selectedForeground = #00f +TabbedPane.underlineColor = #ff0 +TabbedPane.disabledUnderlineColor = #7a7a7a +TabbedPane.hoverColor = #eee +TabbedPane.focusColor = #ddd +TabbedPane.tabSeparatorColor = #00f +TabbedPane.contentAreaColor = #f00 -TabbedPane.buttonHoverBackground=#ff0 -TabbedPane.buttonPressedBackground=#FFC800 +TabbedPane.buttonHoverBackground = #ff0 +TabbedPane.buttonPressedBackground = #FFC800 -TabbedPane.closeSize=16,16 -TabbedPane.closeArc=999 -TabbedPane.closeCrossPlainSize={float}12 -TabbedPane.closeCrossFilledSize={float}6.5 -TabbedPane.closeCrossLineWidth={float}2 -#TabbedPane.closeBackground=#faa -TabbedPane.closeForeground=#f00 -TabbedPane.closeHoverBackground=#a00 -TabbedPane.closeHoverForeground=#fff -TabbedPane.closePressedBackground=#0f0 -TabbedPane.closePressedForeground=#000 +TabbedPane.closeSize = 16,16 +TabbedPane.closeArc = 999 +TabbedPane.closeCrossPlainSize = {float}12 +TabbedPane.closeCrossFilledSize = {float}6.5 +TabbedPane.closeCrossLineWidth = {float}2 +#TabbedPane.closeBackground = #faa +TabbedPane.closeForeground = #f00 +TabbedPane.closeHoverBackground = #a00 +TabbedPane.closeHoverForeground = #fff +TabbedPane.closePressedBackground = #0f0 +TabbedPane.closePressedForeground = #000 #---- Table ---- -Table.rowHeight=25 -Table.background=#fffff0 -Table.sortIconColor=#ff0 -Table.gridColor=#0ff +Table.rowHeight = 25 +Table.background = #fffff0 +Table.sortIconColor = #ff0 +Table.gridColor = #0ff #---- TableHeader ---- -TableHeader.background=#44f -TableHeader.foreground=#fff -TableHeader.separatorColor=#0f0 -TableHeader.bottomSeparatorColor=#0f0 +TableHeader.background = #44f +TableHeader.foreground = #fff +TableHeader.separatorColor = #0f0 +TableHeader.bottomSeparatorColor = #0f0 #---- TitledBorder ---- -TitledBorder.titleColor=#f0f -TitledBorder.border=1,1,1,1,#f0f +TitledBorder.titleColor = #f0f +TitledBorder.border = 1,1,1,1,#f0f #---- TitlePane ---- -TitlePane.background=#0f0 -TitlePane.inactiveBackground=#080 -TitlePane.foreground=#00f -TitlePane.inactiveForeground=#fff +TitlePane.background = #0f0 +TitlePane.inactiveBackground = #080 +TitlePane.foreground = #00f +TitlePane.inactiveForeground = #fff #---- ToggleButton ---- -ToggleButton.background=#ddf -ToggleButton.selectedBackground=#4f4 -ToggleButton.selectedForeground=#000 -ToggleButton.disabledSelectedBackground=#4d4 +ToggleButton.background = #ddf +ToggleButton.selectedBackground = #4f4 +ToggleButton.selectedForeground = #000 +ToggleButton.disabledSelectedBackground = #4d4 -ToggleButton.focusedBackground=#0ff -ToggleButton.hoverBackground=#ff0 -ToggleButton.pressedBackground=#FFC800 +ToggleButton.focusedBackground = #0ff +ToggleButton.hoverBackground = #ff0 +ToggleButton.pressedBackground = #FFC800 -ToggleButton.toolbar.selectedBackground=#ddd +ToggleButton.toolbar.selectedBackground = #ddd #---- ToolTip ---- -ToolTip.background=#eef +ToolTip.background = #eef #---- Tree ---- -Tree.background=#fff0ff -Tree.paintLines=true -Tree.hash=#f00 -Tree.editorBorder=1,1,1,1,#f00 -Tree.editorBorderSelectionColor=#00f +Tree.background = #fff0ff +Tree.paintLines = true +Tree.hash = #f00 +Tree.editorBorder = 1,1,1,1,#f00 +Tree.editorBorderSelectionColor = #00f diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatDarkLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatDarkLaf.properties index 0228f31a..0ca9cca1 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatDarkLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatDarkLaf.properties @@ -1 +1 @@ -# @background=#000 +# @background = #000 diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLaf.properties index cc1b0e74..082cc4a2 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLaf.properties @@ -1,2 +1,2 @@ -# Component.arc=9999 -# TextComponent.arc=9999 +# Component.arc = 9999 +# TextComponent.arc = 9999 diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLightLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLightLaf.properties index 33afe328..2a92b92b 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLightLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/customdefaults/FlatLightLaf.properties @@ -1 +1 @@ -# @background=#fff +# @background = #fff diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties index 31b74e10..2ee17af1 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/jideoss/FlatTestLaf.properties @@ -16,5 +16,5 @@ #---- RangeSlider ---- -Slider.hoverTrackColor=#44f -Slider.pressedTrackColor=#8f8 +Slider.hoverTrackColor = #44f +Slider.pressedTrackColor = #8f8 diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/swingx/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/swingx/FlatTestLaf.properties index a917c807..60161ae4 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/swingx/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/swingx/FlatTestLaf.properties @@ -16,61 +16,61 @@ #---- BusyLabel ---- -JXBusyLabel.baseColor=#0f0 -JXBusyLabel.highlightColor=#f00 +JXBusyLabel.baseColor = #0f0 +JXBusyLabel.highlightColor = #f00 #---- Header ---- -JXHeader.background=#f88 -JXHeader.startBackground=#fcc -JXHeader.titleForeground=#00f -JXHeader.descriptionForeground=#f00 +JXHeader.background = #f88 +JXHeader.startBackground = #fcc +JXHeader.titleForeground = #00f +JXHeader.descriptionForeground = #f00 #---- Hyperlink ---- -Hyperlink.linkColor=#f00 -Hyperlink.visitedColor=#00f -Hyperlink.disabledText=#008 +Hyperlink.linkColor = #f00 +Hyperlink.visitedColor = #00f +Hyperlink.disabledText = #008 #---- MonthView ---- -JXMonthView.background=@textComponentBackground -JXMonthView.monthStringBackground=#0f0 -JXMonthView.monthStringForeground=#00f -JXMonthView.daysOfTheWeekForeground=#0f0 -JXMonthView.weekOfTheYearForeground=#00f -JXMonthView.unselectableDayForeground=#00f -JXMonthView.selectedBackground=#afa -JXMonthView.flaggedDayForeground=#0ff -JXMonthView.leadingDayForeground=#c0c0c0 -JXMonthView.trailingDayForeground=#c0c0c0 -JXMonthView.arrowColor=#00f -JXMonthView.disabledArrowColor=#ABABAB +JXMonthView.background = @textComponentBackground +JXMonthView.monthStringBackground = #0f0 +JXMonthView.monthStringForeground = #00f +JXMonthView.daysOfTheWeekForeground = #0f0 +JXMonthView.weekOfTheYearForeground = #00f +JXMonthView.unselectableDayForeground = #00f +JXMonthView.selectedBackground = #afa +JXMonthView.flaggedDayForeground = #0ff +JXMonthView.leadingDayForeground = #c0c0c0 +JXMonthView.trailingDayForeground = #c0c0c0 +JXMonthView.arrowColor = #00f +JXMonthView.disabledArrowColor = #ABABAB #---- TaskPaneContainer ---- -TaskPaneContainer.background=#f88 -TaskPaneContainer.border=10,10,10,10 +TaskPaneContainer.background = #f88 +TaskPaneContainer.border = 10,10,10,10 #---- TaskPane ---- -TaskPane.background=#0f0 -TaskPane.borderColor=#00f -TaskPane.contentInsets=10,10,10,10 +TaskPane.background = #0f0 +TaskPane.borderColor = #00f +TaskPane.contentInsets = 10,10,10,10 -TaskPane.titleBackgroundGradientStart=#ff0 -TaskPane.titleForeground=#f0f -TaskPane.titleOver=#00a -TaskPane.specialTitleBackground=#0ff -TaskPane.specialTitleForeground=#444 -TaskPane.specialTitleOver=#d00 +TaskPane.titleBackgroundGradientStart = #ff0 +TaskPane.titleForeground = #f0f +TaskPane.titleOver = #00a +TaskPane.specialTitleBackground = #0ff +TaskPane.specialTitleForeground = #444 +TaskPane.specialTitleOver = #d00 #---- TitledPanel ---- -JXTitledPanel.borderColor=$Button.startBorderColor +JXTitledPanel.borderColor = $Button.startBorderColor diff --git a/flatlaf-theme-editor/theme-editor-test.properties b/flatlaf-theme-editor/theme-editor-test.properties index 75ece812..d9c49e32 100644 --- a/flatlaf-theme-editor/theme-editor-test.properties +++ b/flatlaf-theme-editor/theme-editor-test.properties @@ -2,50 +2,50 @@ # some comment # -ButtonUI=com.formdev.flatlaf.ui.FlatButtonUI - CheckBoxUI = com.formdev.flatlaf.ui.FlatCheckBoxUI +ButtonUI = com.formdev.flatlaf.ui.FlatButtonUI + CheckBoxUI = com.formdev.flatlaf.ui.FlatCheckBoxUI -Prop.string=some string -Prop.string2="some string 123 #f80" -Prop.char1=x -Prop.char2=\u2022 -Prop.integer=123 -Prop.float=456.123 -Prop.color1=#f80 -Prop.color2=#ff8800 -Prop.color3=#f804 -Prop.color4=#ff880044 -Prop.color5=#12 -Prop.color6=#12345 -Prop.border=1,2,3,4 +Prop.string = some string +Prop.string2 = "some string 123 #f80" +Prop.char1 = x +Prop.char2 = \u2022 +Prop.integer = 123 +Prop.float = 456.123 +Prop.color1 = #f80 +Prop.color2 = #ff8800 +Prop.color3 = #f804 +Prop.color4 = #ff880044 +Prop.color5 = #12 +Prop.color6 = #12345 +Prop.border = 1,2,3,4 -Prop.scaledInteger={scaledInteger}123 +Prop.scaledInteger = {scaledInteger}123 -Prop.null=null -Prop.false=false -Prop.true=true +Prop.null = null +Prop.false = false +Prop.true = true -@var1=123 -Prop.var=@var1 -Prop.ref=$Prop.string +@var1 = 123 +Prop.var = @var1 +Prop.ref = $Prop.string -Prop.lazy=lazy(Prop.string) +Prop.lazy = lazy(Prop.string) -Prop.colorFunc1=rgb(12,34,56) -Prop.colorFunc2=rgba(12,34,56,78) -Prop.colorFunc3=hsl(12,34%,56%) -Prop.colorFunc4=hsla(12,34%,56%,78%) +Prop.colorFunc1 = rgb(12,34,56) +Prop.colorFunc2 = rgba(12,34,56,78) +Prop.colorFunc3 = hsl(12,34%,56%) +Prop.colorFunc4 = hsla(12,34%,56%,78%) -Prop.colorFunc5=lighten(#fe1289,20%) -Prop.colorFunc6=darken(#fe1289,20%) -Prop.colorFunc7=lighten($Prop.colorFunc4,20%,relative autoInverse) -Prop.colorFunc8=lighten(Prop.colorFunc4,20%,lazy) -Prop.colorFunc9=fadein(#ff000000,30%) -Prop.colorFunc10=fadeout(#ff0000,40%) -Prop.colorFunc11=fade(#ff0000,50%) +Prop.colorFunc5 = lighten(#fe1289,20%) +Prop.colorFunc6 = darken(#fe1289,20%) +Prop.colorFunc7 = lighten($Prop.colorFunc4,20%,relative autoInverse) +Prop.colorFunc8 = lighten(Prop.colorFunc4,20%,lazy) +Prop.colorFunc9 = fadein(#ff000000,30%) +Prop.colorFunc10 = fadeout(#ff0000,40%) +Prop.colorFunc11 = fade(#ff0000,50%) -Prop.colorFunc12=#f00 -Prop.colorFunc13=spin($Prop.colorFunc12,40) -Prop.colorFunc14=spin($Prop.colorFunc12,-40) -Prop.colorFunc15=spin($Prop.colorFunc12,400) -Prop.colorFunc16=spin($Prop.colorFunc12,-400) +Prop.colorFunc12 = #f00 +Prop.colorFunc13 = spin($Prop.colorFunc12,40) +Prop.colorFunc14 = spin($Prop.colorFunc12,-40) +Prop.colorFunc15 = spin($Prop.colorFunc12,400) +Prop.colorFunc16 = spin($Prop.colorFunc12,-400) From 4f8b6d6b2809a128f1e27e7a9eef736f9b484e21 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 23 Dec 2020 11:14:26 +0100 Subject: [PATCH 087/178] UIDefaultsLoader: - changed "globals" to "wildcard replacements" - strict checking for background/foreground keys --- .../com/formdev/flatlaf/UIDefaultsLoader.java | 29 ++++++++++--------- .../com/formdev/flatlaf/FlatLaf.properties | 2 +- .../flatlaf/testing/FlatTestLaf.properties | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java index 6a009b73..3bbf239a 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java @@ -70,7 +70,7 @@ class UIDefaultsLoader private static final String VARIABLE_PREFIX = "@"; private static final String PROPERTY_PREFIX = "$"; private static final String OPTIONAL_PREFIX = "?"; - private static final String GLOBAL_PREFIX = "*."; + private static final String WILDCARD_PREFIX = "*."; static void loadDefaultsFromProperties( Class lookAndFeelClass, List addons, Properties additionalDefaults, boolean dark, UIDefaults defaults ) @@ -198,19 +198,19 @@ class UIDefaultsLoader } } - // get (and remove) globals, which override all other defaults that end with same suffix - HashMap globals = new HashMap<>(); + // get (and remove) wildcard replacements, which override all other defaults that end with same suffix + HashMap wildcards = new HashMap<>(); Iterator> it = properties.entrySet().iterator(); while( it.hasNext() ) { Entry e = it.next(); String key = (String) e.getKey(); - if( key.startsWith( GLOBAL_PREFIX ) ) { - globals.put( key.substring( GLOBAL_PREFIX.length() ), (String) e.getValue() ); + if( key.startsWith( WILDCARD_PREFIX ) ) { + wildcards.put( key.substring( WILDCARD_PREFIX.length() ), (String) e.getValue() ); it.remove(); } } - // override UI defaults with globals + // override UI defaults with wildcard replacements for( Object key : defaults.keySet() ) { int dot; if( !(key instanceof String) || @@ -218,10 +218,10 @@ class UIDefaultsLoader (dot = ((String)key).lastIndexOf( '.' )) < 0 ) continue; - String globalKey = ((String)key).substring( dot + 1 ); - String globalValue = globals.get( globalKey ); - if( globalValue != null ) - properties.put( key, globalValue ); + String wildcardKey = ((String)key).substring( dot + 1 ); + String wildcardValue = wildcards.get( wildcardKey ); + if( wildcardValue != null ) + properties.put( key, wildcardValue ); } Function propertiesGetter = key -> { @@ -341,7 +341,12 @@ class UIDefaultsLoader // determine value type from key if( valueType == ValueType.UNKNOWN ) { - if( key.endsWith( "ground" ) || key.endsWith( "Color" ) ) + if( key.endsWith( "UI" ) ) + valueType = ValueType.STRING; + else if( key.endsWith( "Color" ) || + (key.endsWith( "ground" ) && + (key.endsWith( ".background" ) || key.endsWith( "Background" ) || + key.endsWith( ".foreground" ) || key.endsWith( "Foreground" ))) ) valueType = ValueType.COLOR; else if( key.endsWith( ".border" ) || key.endsWith( "Border" ) ) valueType = ValueType.BORDER; @@ -356,8 +361,6 @@ class UIDefaultsLoader valueType = ValueType.INTEGER; else if( key.endsWith( "Char" ) ) valueType = ValueType.CHARACTER; - else if( key.endsWith( "UI" ) ) - valueType = ValueType.STRING; else if( key.endsWith( "grayFilter" ) ) valueType = ValueType.GRAYFILTER; } 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 e052def2..f0076a87 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -67,7 +67,7 @@ ViewportUI = com.formdev.flatlaf.ui.FlatViewportUI @menuItemMargin = 3,6,3,6 -#---- globals ---- +#---- wildcard replacements ---- *.background = @background *.foreground = @foreground diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index 497605fa..cf0c38a8 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -38,7 +38,7 @@ @dropLineShortColor = #ff0 -#---- globals ---- +#---- wildcard replacements ---- *.caretForeground = #00f *.inactiveBackground = #f0f0f0 From 4c885c5e7b7a6f0b8325654af5d89c6349b9c21d Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 23 Dec 2020 12:31:16 +0100 Subject: [PATCH 088/178] CHANGELOG.md: added PR #229 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 923fed3b..d09303f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ FlatLaf Change Log - ComboBox, Spinner and SplitPaneDivider: Added pressed feedback to arrow buttons. +- TextComponent: Clip placeholder text if it does not fit into visible area. (PR + #229) ## 0.46 From 678b879a01777d4a34dcaa673853133279fd823b Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 28 Dec 2020 20:38:48 +0100 Subject: [PATCH 089/178] Theme Editor: - open all .properties files in passed directory in tabs - basic menu bar added (Save, Exit) - auto-save files on window deactivation and app exit --- flatlaf-theme-editor/build.gradle.kts | 8 + .../themeeditor/FlatThemeEditorPane.java | 23 ++- .../themeeditor/FlatThemeFileEditor.java | 189 +++++++++++++++--- .../themeeditor/FlatThemeFileEditor.jfd | 59 +++++- 4 files changed, 235 insertions(+), 44 deletions(-) diff --git a/flatlaf-theme-editor/build.gradle.kts b/flatlaf-theme-editor/build.gradle.kts index 969d0d08..e759f118 100644 --- a/flatlaf-theme-editor/build.gradle.kts +++ b/flatlaf-theme-editor/build.gradle.kts @@ -18,10 +18,18 @@ plugins { `java-library` } +repositories { + maven { + // for using MigLayout snapshot + url = uri( "https://oss.sonatype.org/content/repositories/snapshots/" ) + } +} + dependencies { implementation( project( ":flatlaf-core" ) ) implementation( project( ":flatlaf-extras" ) ) + implementation( "com.miglayout:miglayout-swing:5.3-SNAPSHOT" ) implementation( "com.fifesoft:rsyntaxtextarea:3.1.1" ) implementation( "com.fifesoft:autocomplete:3.1.0" ) } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 7e2afde3..f8384290 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -31,6 +31,7 @@ import org.fife.ui.autocomplete.CompletionProvider; import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory; import org.fife.ui.rsyntaxtextarea.FileLocation; import org.fife.ui.rsyntaxtextarea.SyntaxScheme; +import org.fife.ui.rsyntaxtextarea.TextEditorPane; import org.fife.ui.rsyntaxtextarea.Theme; import org.fife.ui.rsyntaxtextarea.TokenMakerFactory; import org.fife.ui.rtextarea.RTextScrollPane; @@ -44,6 +45,8 @@ import com.formdev.flatlaf.util.UIScale; class FlatThemeEditorPane extends JPanel { + static final String DIRTY_PROPERTY = TextEditorPane.DIRTY_PROPERTY; + private static final String FLATLAF_STYLE = "text/flatlaf"; private final RTextScrollPane scrollPane; @@ -63,6 +66,10 @@ class FlatThemeEditorPane textArea.addParser( new FlatThemeParser() ); // textArea.setUseColorOfColorTokens( true ); + textArea.addPropertyChangeListener( TextEditorPane.DIRTY_PROPERTY, e -> { + firePropertyChange( DIRTY_PROPERTY, e.getOldValue(), e.getNewValue() ); + } ); + // theme try( InputStream in = getClass().getResourceAsStream( "light.xml" ) ) { Theme theme = Theme.load( in ); @@ -117,11 +124,15 @@ class FlatThemeEditorPane textArea.load( loc, StandardCharsets.ISO_8859_1 ); } - void save() { - try { - textArea.save(); - } catch( IOException ex ) { - ex.printStackTrace(); // TODO - } + void save() throws IOException { + textArea.save(); + } + + String getFileName() { + return textArea.getFileName(); + } + + boolean isDirty() { + return textArea.isDirty(); } } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 49ddd1de..aa585931 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -20,16 +20,19 @@ import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dimension; import java.awt.Toolkit; -import java.awt.event.KeyEvent; +import java.awt.event.*; import java.io.File; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; +import java.util.Arrays; +import java.util.function.Supplier; import javax.swing.*; +import com.formdev.flatlaf.extras.components.*; +import net.miginfocom.swing.*; import org.fife.ui.rsyntaxtextarea.FileLocation; import com.formdev.flatlaf.FlatLightLaf; import com.formdev.flatlaf.extras.FlatInspector; import com.formdev.flatlaf.extras.FlatUIDefaultsInspector; +import com.formdev.flatlaf.util.StringUtils; import com.formdev.flatlaf.util.UIScale; /** @@ -41,13 +44,9 @@ public class FlatThemeFileEditor extends JFrame { public static void main( String[] args ) { - File file = new File( args.length > 0 + File dir = new File( args.length > 0 ? args[0] - : "theme-editor-test.properties" ); // TODO - - List baseFiles = new ArrayList<>(); - for( int i = 1; i < args.length; i++ ) - baseFiles.add( new File( args[i] ) ); + : "." ); SwingUtilities.invokeLater( () -> { FlatLightLaf.install(); @@ -56,18 +55,7 @@ public class FlatThemeFileEditor FlatThemeFileEditor frame = new FlatThemeFileEditor(); - frame.themeEditorArea.setBaseFiles( baseFiles ); - try { - frame.themeEditorArea.load( FileLocation.create( file ) ); - } catch( IOException ex ) { - ex.printStackTrace(); - } - - int menuShortcutKeyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); - ((JComponent)frame.getContentPane()).registerKeyboardAction( - e -> frame.themeEditorArea.save(), - KeyStroke.getKeyStroke( KeyEvent.VK_S, menuShortcutKeyMask ), - JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + frame.loadDirectory( dir ); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize( Math.min( UIScale.scale( 800 ), screenSize.width ), @@ -81,28 +69,169 @@ public class FlatThemeFileEditor initComponents(); } + public void loadDirectory( File dir ) { + try { + directoryField.setText( dir.getCanonicalPath() ); + } catch( IOException ex ) { + directoryField.setText( dir.getAbsolutePath() ); + } + + File[] propertiesFiles = dir.listFiles( (d, name) -> { + return name.endsWith( ".properties" ); + } ); + + Arrays.sort( propertiesFiles ); + + for( File file : propertiesFiles ) + openFile( file ); + } + + public void openFile( File file ) { + FlatThemeEditorPane themeEditorArea = new FlatThemeEditorPane(); + try { + themeEditorArea.load( FileLocation.create( file ) ); + } catch( IOException ex ) { + ex.printStackTrace(); // TODO + } + + Supplier titleFun = () -> { + return (themeEditorArea.isDirty() ? "*" : "") + + StringUtils.removeTrailing( themeEditorArea.getFileName(), ".properties" ); + + }; + themeEditorArea.addPropertyChangeListener( FlatThemeEditorPane.DIRTY_PROPERTY, e -> { + int index = tabbedPane.indexOfComponent( themeEditorArea ); + if( index >= 0 ) + tabbedPane.setTitleAt( index, titleFun.get() ); + } ); + + tabbedPane.addTab( titleFun.get(), null, themeEditorArea, file.getAbsolutePath() ); + } + + private boolean saveAll() { + for( FlatThemeEditorPane themeEditorPane : getThemeEditorPanes() ) { + try { + if( themeEditorPane.isDirty() ) + themeEditorPane.save(); + } catch( IOException ex ) { + JOptionPane.showMessageDialog( this, + "Failed to save '" + themeEditorPane.getFileName() + "'\n\nReason: " + ex.getMessage(), + getTitle(), JOptionPane.WARNING_MESSAGE ); + return false; + } + } + return true; + } + + private void exit() { + if( saveAll() ) + System.exit( 0 ); + } + + private void windowClosing() { + exit(); + } + + private void windowDeactivated() { + saveAll(); + } + + private FlatThemeEditorPane[] getThemeEditorPanes() { + FlatThemeEditorPane[] result = new FlatThemeEditorPane[tabbedPane.getTabCount()]; + for( int i = 0; i < result.length; i++ ) + result[i] = (FlatThemeEditorPane) tabbedPane.getComponentAt( i ); + return result; + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents - dialogPane = new JPanel(); - themeEditorArea = new FlatThemeEditorPane(); + menuBar = new JMenuBar(); + fileMenu = new JMenu(); + saveAllMenuItem = new JMenuItem(); + exitMenuItem = new JMenuItem(); + controlPanel = new JPanel(); + directoryLabel = new JLabel(); + directoryField = new JTextField(); + tabbedPane = new FlatTabbedPane(); //======== this ======== - setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); setTitle("FlatLaf Theme Editor"); + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + FlatThemeFileEditor.this.windowClosing(); + } + @Override + public void windowDeactivated(WindowEvent e) { + FlatThemeFileEditor.this.windowDeactivated(); + } + }); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); - //======== dialogPane ======== + //======== menuBar ======== { - dialogPane.setLayout(new BorderLayout()); - dialogPane.add(themeEditorArea, BorderLayout.CENTER); + + //======== fileMenu ======== + { + fileMenu.setText("File"); + + //---- saveAllMenuItem ---- + saveAllMenuItem.setText("Save All"); + saveAllMenuItem.setMnemonic('S'); + saveAllMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); + saveAllMenuItem.addActionListener(e -> saveAll()); + fileMenu.add(saveAllMenuItem); + fileMenu.addSeparator(); + + //---- exitMenuItem ---- + exitMenuItem.setText("Exit"); + exitMenuItem.setMnemonic('X'); + exitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); + exitMenuItem.addActionListener(e -> exit()); + fileMenu.add(exitMenuItem); + } + menuBar.add(fileMenu); } - contentPane.add(dialogPane, BorderLayout.CENTER); + setJMenuBar(menuBar); + + //======== controlPanel ======== + { + controlPanel.setLayout(new MigLayout( + "hidemode 3", + // columns + "[fill]" + + "[grow,fill]", + // rows + "[]")); + + //---- directoryLabel ---- + directoryLabel.setText("Directory:"); + controlPanel.add(directoryLabel, "cell 0 0"); + + //---- directoryField ---- + directoryField.setEditable(false); + controlPanel.add(directoryField, "cell 1 0"); + } + contentPane.add(controlPanel, BorderLayout.NORTH); + + //======== tabbedPane ======== + { + tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); + } + contentPane.add(tabbedPane, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables - private JPanel dialogPane; - private FlatThemeEditorPane themeEditorArea; + private JMenuBar menuBar; + private JMenu fileMenu; + private JMenuItem saveAllMenuItem; + private JMenuItem exitMenuItem; + private JPanel controlPanel; + private JLabel directoryLabel; + private JTextField directoryField; + private FlatTabbedPane tabbedPane; // JFormDesigner - End of variables declaration //GEN-END:variables } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd index 7b56ce1d..fe8bd768 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -7,18 +7,61 @@ new FormModel { name: "this" "$locationPolicy": 2 "$sizePolicy": 2 - "defaultCloseOperation": 3 + "defaultCloseOperation": 0 "title": "FlatLaf Theme Editor" - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { - name: "dialogPane" - add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemeEditorPane" ) { - name: "themeEditorArea" - }, new FormLayoutConstraints( class java.lang.String ) { - "value": "Center" + addEvent( new FormEvent( "java.awt.event.WindowListener", "windowClosing", "windowClosing", false ) ) + addEvent( new FormEvent( "java.awt.event.WindowListener", "windowDeactivated", "windowDeactivated", false ) ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "hidemode 3" + "$columnConstraints": "[fill][grow,fill]" + "$rowConstraints": "[]" + } ) { + name: "controlPanel" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "directoryLabel" + "text": "Directory:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "directoryField" + "editable": false + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 0" + } ) + }, new FormLayoutConstraints( class java.lang.String ) { + "value": "North" + } ) + add( new FormContainer( "com.formdev.flatlaf.extras.components.FlatTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { + name: "tabbedPane" + "tabLayoutPolicy": 1 }, new FormLayoutConstraints( class java.lang.String ) { "value": "Center" } ) + menuBar: new FormContainer( "javax.swing.JMenuBar", new FormLayoutManager( class javax.swing.JMenuBar ) ) { + name: "menuBar" + add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) { + name: "fileMenu" + "text": "File" + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "saveAllMenuItem" + "text": "Save All" + "mnemonic": 83 + "accelerator": static javax.swing.KeyStroke getKeyStroke( 83, 4226, false ) + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "saveAll", false ) ) + } ) + add( new FormComponent( "javax.swing.JPopupMenu$Separator" ) { + name: "separator1" + } ) + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "exitMenuItem" + "text": "Exit" + "mnemonic": 88 + "accelerator": static javax.swing.KeyStroke getKeyStroke( 81, 4226, false ) + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "exit", false ) ) + } ) + } ) + } }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) "size": new java.awt.Dimension( 535, 300 ) From cda146366c5dd449c476c041bb4d575e2c006c5f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 29 Dec 2020 18:30:52 +0100 Subject: [PATCH 090/178] Theme Editor: auto-reload .properties files on window activation, if modified outside --- .../themeeditor/FlatThemeEditorPane.java | 45 ++++++++++++++++++- .../themeeditor/FlatThemeFileEditor.java | 20 +++++---- .../themeeditor/FlatThemeFileEditor.jfd | 1 + 3 files changed, 55 insertions(+), 11 deletions(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index f8384290..214df023 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -19,13 +19,17 @@ package com.formdev.flatlaf.themeeditor; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; +import java.awt.Window; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.List; +import javax.swing.JFrame; import javax.swing.JLayer; +import javax.swing.JOptionPane; import javax.swing.JPanel; +import javax.swing.SwingUtilities; import org.fife.ui.autocomplete.AutoCompletion; import org.fife.ui.autocomplete.CompletionProvider; import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory; @@ -124,8 +128,40 @@ class FlatThemeEditorPane textArea.load( loc, StandardCharsets.ISO_8859_1 ); } - void save() throws IOException { - textArea.save(); + void reloadIfNecessary() { + if( textArea.isModifiedOutsideEditor() ) { + if( textArea.isDirty() ) { + if( JOptionPane.showConfirmDialog( this, + "The file '" + textArea.getFileName() + + "' has been changed. Replace the editor contents with these changes?", + getWindowTitle(), JOptionPane.YES_NO_OPTION ) != JOptionPane.YES_OPTION ) + { + textArea.syncLastSaveOrLoadTimeToActualFile(); + return; + } + } + + try { + textArea.reload(); + } catch( IOException ex ) { + JOptionPane.showMessageDialog( this, + "Failed to reload '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(), + getWindowTitle(), JOptionPane.WARNING_MESSAGE ); + } + } + } + + boolean saveIfDirty() { + try { + if( textArea.isDirty() ) + textArea.save(); + return true; + } catch( IOException ex ) { + JOptionPane.showMessageDialog( this, + "Failed to save '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(), + getWindowTitle(), JOptionPane.WARNING_MESSAGE ); + return false; + } } String getFileName() { @@ -135,4 +171,9 @@ class FlatThemeEditorPane boolean isDirty() { return textArea.isDirty(); } + + private String getWindowTitle() { + Window window = SwingUtilities.windowForComponent( this ); + return (window instanceof JFrame) ? ((JFrame)window).getTitle() : null; + } } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index aa585931..0dedf981 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -95,7 +95,7 @@ public class FlatThemeFileEditor } Supplier titleFun = () -> { - return (themeEditorArea.isDirty() ? "*" : "") + return (themeEditorArea.isDirty() ? "* " : "") + StringUtils.removeTrailing( themeEditorArea.getFileName(), ".properties" ); }; @@ -110,15 +110,8 @@ public class FlatThemeFileEditor private boolean saveAll() { for( FlatThemeEditorPane themeEditorPane : getThemeEditorPanes() ) { - try { - if( themeEditorPane.isDirty() ) - themeEditorPane.save(); - } catch( IOException ex ) { - JOptionPane.showMessageDialog( this, - "Failed to save '" + themeEditorPane.getFileName() + "'\n\nReason: " + ex.getMessage(), - getTitle(), JOptionPane.WARNING_MESSAGE ); + if( !themeEditorPane.saveIfDirty() ) return false; - } } return true; } @@ -132,6 +125,11 @@ public class FlatThemeFileEditor exit(); } + private void windowActivated() { + for( FlatThemeEditorPane themeEditorPane : getThemeEditorPanes() ) + themeEditorPane.reloadIfNecessary(); + } + private void windowDeactivated() { saveAll(); } @@ -158,6 +156,10 @@ public class FlatThemeFileEditor setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); setTitle("FlatLaf Theme Editor"); addWindowListener(new WindowAdapter() { + @Override + public void windowActivated(WindowEvent e) { + FlatThemeFileEditor.this.windowActivated(); + } @Override public void windowClosing(WindowEvent e) { FlatThemeFileEditor.this.windowClosing(); diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd index fe8bd768..98c68d40 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd @@ -11,6 +11,7 @@ new FormModel { "title": "FlatLaf Theme Editor" addEvent( new FormEvent( "java.awt.event.WindowListener", "windowClosing", "windowClosing", false ) ) addEvent( new FormEvent( "java.awt.event.WindowListener", "windowDeactivated", "windowDeactivated", false ) ) + addEvent( new FormEvent( "java.awt.event.WindowListener", "windowActivated", "windowActivated", false ) ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "hidemode 3" "$columnConstraints": "[fill][grow,fill]" From d2109cef86bef8adbcff518d4f49202beffb0180 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 29 Dec 2020 23:12:23 +0100 Subject: [PATCH 091/178] Theme Editor: update open tabs when .properties files were added or removed to directory (on window activation) --- .../themeeditor/FlatThemeEditorPane.java | 38 +++++++++--- .../themeeditor/FlatThemeFileEditor.java | 62 +++++++++++++------ 2 files changed, 73 insertions(+), 27 deletions(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 214df023..850ec621 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -56,6 +56,8 @@ class FlatThemeEditorPane private final RTextScrollPane scrollPane; private final FlatSyntaxTextArea textArea; + private File file; + FlatThemeEditorPane() { super( new BorderLayout() ); @@ -124,11 +126,33 @@ class FlatThemeEditorPane textArea.propertiesSupport.setBaseFiles( baseFiles ); } - void load( FileLocation loc ) throws IOException { - textArea.load( loc, StandardCharsets.ISO_8859_1 ); + File getFile() { + return file; } - void reloadIfNecessary() { + void load( File file ) throws IOException { + this.file = file; + + textArea.load( FileLocation.create( file ), StandardCharsets.ISO_8859_1 ); + } + + boolean reloadIfNecessary() { + if( !file.isFile() ) { + if( textArea.isDirty() ) { + if( JOptionPane.showOptionDialog( this, + "The file '" + textArea.getFileName() + + "' has been deleted. Replace the editor contents with these changes?", + getWindowTitle(), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, + null, new Object[] { "Save", "Close" }, "Save" ) == JOptionPane.YES_OPTION ) + { + saveIfDirty(); + return true; + } + } + + return false; + } + if( textArea.isModifiedOutsideEditor() ) { if( textArea.isDirty() ) { if( JOptionPane.showConfirmDialog( this, @@ -137,7 +161,7 @@ class FlatThemeEditorPane getWindowTitle(), JOptionPane.YES_NO_OPTION ) != JOptionPane.YES_OPTION ) { textArea.syncLastSaveOrLoadTimeToActualFile(); - return; + return true; } } @@ -149,6 +173,8 @@ class FlatThemeEditorPane getWindowTitle(), JOptionPane.WARNING_MESSAGE ); } } + + return true; } boolean saveIfDirty() { @@ -164,10 +190,6 @@ class FlatThemeEditorPane } } - String getFileName() { - return textArea.getFileName(); - } - boolean isDirty() { return textArea.isDirty(); } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 0dedf981..b868eba2 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -24,11 +24,11 @@ import java.awt.event.*; import java.io.File; import java.io.IOException; import java.util.Arrays; +import java.util.HashSet; import java.util.function.Supplier; import javax.swing.*; import com.formdev.flatlaf.extras.components.*; import net.miginfocom.swing.*; -import org.fife.ui.rsyntaxtextarea.FileLocation; import com.formdev.flatlaf.FlatLightLaf; import com.formdev.flatlaf.extras.FlatInspector; import com.formdev.flatlaf.extras.FlatUIDefaultsInspector; @@ -43,6 +43,8 @@ import com.formdev.flatlaf.util.UIScale; public class FlatThemeFileEditor extends JFrame { + private File dir; + public static void main( String[] args ) { File dir = new File( args.length > 0 ? args[0] @@ -69,43 +71,66 @@ public class FlatThemeFileEditor initComponents(); } - public void loadDirectory( File dir ) { + private void loadDirectory( File dir ) { + this.dir = dir; + try { directoryField.setText( dir.getCanonicalPath() ); } catch( IOException ex ) { directoryField.setText( dir.getAbsolutePath() ); } - File[] propertiesFiles = dir.listFiles( (d, name) -> { - return name.endsWith( ".properties" ); - } ); - - Arrays.sort( propertiesFiles ); - - for( File file : propertiesFiles ) + for( File file : getPropertiesFiles( dir ) ) openFile( file ); } - public void openFile( File file ) { - FlatThemeEditorPane themeEditorArea = new FlatThemeEditorPane(); + private void updateDirectory() { + // update open tabs and remove tabs if file was removed + HashSet openFiles = new HashSet<>(); + FlatThemeEditorPane[] themeEditorPanes = getThemeEditorPanes(); + for( int i = themeEditorPanes.length - 1; i >= 0; i-- ) { + FlatThemeEditorPane themeEditorPane = themeEditorPanes[i]; + if( themeEditorPane.reloadIfNecessary() ) + openFiles.add( themeEditorPane.getFile() ); + else + tabbedPane.removeTabAt( i ); + } + + // open newly created files + for( File file : getPropertiesFiles( dir ) ) { + if( !openFiles.contains( file ) ) + openFile( file ); + } + } + + private File[] getPropertiesFiles( File dir ) { + File[] propertiesFiles = dir.listFiles( (d, name) -> { + return name.endsWith( ".properties" ); + } ); + Arrays.sort( propertiesFiles ); + return propertiesFiles; + } + + private void openFile( File file ) { + FlatThemeEditorPane themeEditorPane = new FlatThemeEditorPane(); try { - themeEditorArea.load( FileLocation.create( file ) ); + themeEditorPane.load( file ); } catch( IOException ex ) { ex.printStackTrace(); // TODO } Supplier titleFun = () -> { - return (themeEditorArea.isDirty() ? "* " : "") - + StringUtils.removeTrailing( themeEditorArea.getFileName(), ".properties" ); + return (themeEditorPane.isDirty() ? "* " : "") + + StringUtils.removeTrailing( themeEditorPane.getFile().getName(), ".properties" ); }; - themeEditorArea.addPropertyChangeListener( FlatThemeEditorPane.DIRTY_PROPERTY, e -> { - int index = tabbedPane.indexOfComponent( themeEditorArea ); + themeEditorPane.addPropertyChangeListener( FlatThemeEditorPane.DIRTY_PROPERTY, e -> { + int index = tabbedPane.indexOfComponent( themeEditorPane ); if( index >= 0 ) tabbedPane.setTitleAt( index, titleFun.get() ); } ); - tabbedPane.addTab( titleFun.get(), null, themeEditorArea, file.getAbsolutePath() ); + tabbedPane.addTab( titleFun.get(), null, themeEditorPane, file.getAbsolutePath() ); } private boolean saveAll() { @@ -126,8 +151,7 @@ public class FlatThemeFileEditor } private void windowActivated() { - for( FlatThemeEditorPane themeEditorPane : getThemeEditorPanes() ) - themeEditorPane.reloadIfNecessary(); + updateDirectory(); } private void windowDeactivated() { From ea94899a286a95865a097c70d1b5146fade4a9f1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 30 Dec 2020 11:23:51 +0100 Subject: [PATCH 092/178] Extras: added missing export of package `com.formdev.flatlaf.extras.components` to Java 9 module descriptor (issue #117) --- CHANGELOG.md | 5 +++++ flatlaf-extras/src/main/module-info/module-info.java | 1 + 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d09303f4..dcf53180 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ FlatLaf Change Log - TextComponent: Clip placeholder text if it does not fit into visible area. (PR #229) +#### Fixed bugs + +- Extras: Added missing export of package + `com.formdev.flatlaf.extras.components` to Java 9 module descriptor. + ## 0.46 diff --git a/flatlaf-extras/src/main/module-info/module-info.java b/flatlaf-extras/src/main/module-info/module-info.java index c351ed1a..3fef1e03 100644 --- a/flatlaf-extras/src/main/module-info/module-info.java +++ b/flatlaf-extras/src/main/module-info/module-info.java @@ -24,4 +24,5 @@ module com.formdev.flatlaf.extras { requires com.formdev.flatlaf; exports com.formdev.flatlaf.extras; + exports com.formdev.flatlaf.extras.components; } From 089614383823285a9cb45c1925733c900e514b54 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 30 Dec 2020 14:03:41 +0100 Subject: [PATCH 093/178] Theme Editor: support navigating to next/previous editor with Ctrl+Tab/Ctrl+Shift+Tab --- .../themeeditor/FlatSyntaxTextArea.java | 5 +++ .../themeeditor/FlatThemeFileEditor.java | 42 +++++++++++++++++++ .../themeeditor/FlatThemeFileEditor.jfd | 20 +++++++++ 3 files changed, 67 insertions(+) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java index 4f629012..05f7f8b3 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java @@ -17,6 +17,8 @@ package com.formdev.flatlaf.themeeditor; import java.awt.Color; +import java.awt.KeyboardFocusManager; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import javax.swing.text.BadLocationException; @@ -38,6 +40,9 @@ class FlatSyntaxTextArea private final Map parsedColorsMap = new HashMap<>(); FlatSyntaxTextArea() { + // remove Ctrl+Tab and Ctrl+Shift+Tab focus traversal keys to allow tabbed pane to process them + setFocusTraversalKeys( KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.emptySet() ); + setFocusTraversalKeys( KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, Collections.emptySet() ); } boolean isUseColorOfColorTokens() { diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index b868eba2..5643c4fa 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -165,12 +165,29 @@ public class FlatThemeFileEditor return result; } + private void nextEditor() { + int index = tabbedPane.getSelectedIndex() + 1; + if( index >= tabbedPane.getTabCount() ) + index = 0; + tabbedPane.setSelectedIndex( index ); + } + + private void previousEditor() { + int index = tabbedPane.getSelectedIndex() - 1; + if( index < 0 ) + index = tabbedPane.getTabCount() - 1; + tabbedPane.setSelectedIndex( index ); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents menuBar = new JMenuBar(); fileMenu = new JMenu(); saveAllMenuItem = new JMenuItem(); exitMenuItem = new JMenuItem(); + windowMenu = new JMenu(); + nextEditorMenuItem = new JMenuItem(); + previousEditorMenuItem = new JMenuItem(); controlPanel = new JPanel(); directoryLabel = new JLabel(); directoryField = new JTextField(); @@ -219,6 +236,27 @@ public class FlatThemeFileEditor fileMenu.add(exitMenuItem); } menuBar.add(fileMenu); + + //======== windowMenu ======== + { + windowMenu.setText("Window"); + windowMenu.setMnemonic('W'); + + //---- nextEditorMenuItem ---- + nextEditorMenuItem.setText("Next Editor"); + nextEditorMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); + nextEditorMenuItem.setMnemonic('N'); + nextEditorMenuItem.addActionListener(e -> nextEditor()); + windowMenu.add(nextEditorMenuItem); + + //---- previousEditorMenuItem ---- + previousEditorMenuItem.setText("Previous Editor"); + previousEditorMenuItem.setMnemonic('P'); + previousEditorMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()|KeyEvent.SHIFT_MASK)); + previousEditorMenuItem.addActionListener(e -> previousEditor()); + windowMenu.add(previousEditorMenuItem); + } + menuBar.add(windowMenu); } setJMenuBar(menuBar); @@ -238,6 +276,7 @@ public class FlatThemeFileEditor //---- directoryField ---- directoryField.setEditable(false); + directoryField.setFocusable(false); controlPanel.add(directoryField, "cell 1 0"); } contentPane.add(controlPanel, BorderLayout.NORTH); @@ -255,6 +294,9 @@ public class FlatThemeFileEditor private JMenu fileMenu; private JMenuItem saveAllMenuItem; private JMenuItem exitMenuItem; + private JMenu windowMenu; + private JMenuItem nextEditorMenuItem; + private JMenuItem previousEditorMenuItem; private JPanel controlPanel; private JLabel directoryLabel; private JTextField directoryField; diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd index 98c68d40..5dad47f3 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd @@ -27,6 +27,7 @@ new FormModel { add( new FormComponent( "javax.swing.JTextField" ) { name: "directoryField" "editable": false + "focusable": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 0" } ) @@ -62,6 +63,25 @@ new FormModel { addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "exit", false ) ) } ) } ) + add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) { + name: "windowMenu" + "text": "Window" + "mnemonic": 87 + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "nextEditorMenuItem" + "text": "Next Editor" + "accelerator": static javax.swing.KeyStroke getKeyStroke( 9, 4226, false ) + "mnemonic": 78 + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "nextEditor", false ) ) + } ) + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "previousEditorMenuItem" + "text": "Previous Editor" + "mnemonic": 80 + "accelerator": static javax.swing.KeyStroke getKeyStroke( 9, 4291, false ) + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "previousEditor", false ) ) + } ) + } ) } }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) From 6f3aea8fc1fbb1aef9ca48917109d64e56a9002c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 15:08:14 +0100 Subject: [PATCH 094/178] Theme Editor: basic "find bar" added --- flatlaf-theme-editor/build.gradle.kts | 5 +- .../themeeditor/FlatFindReplaceBar.java | 213 ++++++++++++++++++ .../themeeditor/FlatFindReplaceBar.jfd | 83 +++++++ .../themeeditor/FlatThemeEditorPane.java | 17 +- .../themeeditor/FlatThemeFileEditor.java | 24 ++ .../themeeditor/FlatThemeFileEditor.jfd | 12 + .../flatlaf/themeeditor/icons/LICENSE.txt | 3 + .../flatlaf/themeeditor/icons/close.svg | 3 + .../icons/findAndShowNextMatches.svg | 3 + .../icons/findAndShowPrevMatches.svg | 3 + .../flatlaf/themeeditor/icons/matchCase.svg | 8 + .../flatlaf/themeeditor/icons/regex.svg | 6 + .../flatlaf/themeeditor/icons/words.svg | 5 + 13 files changed, 382 insertions(+), 3 deletions(-) create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/LICENSE.txt create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/close.svg create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/matchCase.svg create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/regex.svg create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/words.svg diff --git a/flatlaf-theme-editor/build.gradle.kts b/flatlaf-theme-editor/build.gradle.kts index e759f118..31a6fc02 100644 --- a/flatlaf-theme-editor/build.gradle.kts +++ b/flatlaf-theme-editor/build.gradle.kts @@ -30,8 +30,9 @@ dependencies { implementation( project( ":flatlaf-extras" ) ) implementation( "com.miglayout:miglayout-swing:5.3-SNAPSHOT" ) - implementation( "com.fifesoft:rsyntaxtextarea:3.1.1" ) - implementation( "com.fifesoft:autocomplete:3.1.0" ) + implementation( "com.fifesoft:rsyntaxtextarea:3.1.2" ) + implementation( "com.fifesoft:autocomplete:3.1.1" ) + implementation( "com.fifesoft:rstaui:3.1.1" ) } tasks { diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java new file mode 100644 index 00000000..141b0614 --- /dev/null +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -0,0 +1,213 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.themeeditor; + +import java.awt.Container; +import javax.swing.*; +import org.fife.rsta.ui.CollapsibleSectionPanel; +import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; +import org.fife.ui.rtextarea.SearchContext; +import org.fife.ui.rtextarea.SearchEngine; +import org.fife.ui.rtextarea.SearchResult; +import com.formdev.flatlaf.extras.FlatSVGIcon; +import net.miginfocom.swing.*; + +/** + * @author Karl Tauber + */ +class FlatFindReplaceBar + extends JPanel +{ + private final RSyntaxTextArea textArea; + + private SearchContext context; + + FlatFindReplaceBar( RSyntaxTextArea textArea ) { + this.textArea = textArea; + + initComponents(); + + findPreviousButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg" ) ); + findNextButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg" ) ); + matchCaseToggleButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/matchCase.svg" ) ); + matchWholeWordToggleButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/words.svg" ) ); + regexToggleButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/regex.svg" ) ); + closeButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/close.svg" ) ); + + SearchContext context = new SearchContext(); + context.setSearchWrap( true ); + setSearchContext( context ); + } + + SearchContext getSearchContext() { + return context; + } + + void setSearchContext( SearchContext context ) { + this.context = context; + + findField.setText( context.getSearchFor() ); + matchCaseToggleButton.setSelected( context.getMatchCase() ); + matchWholeWordToggleButton.setSelected( context.getWholeWord() ); + regexToggleButton.setSelected( context.isRegularExpression() ); + } + + @Override + public boolean requestFocusInWindow() { + return findField.requestFocusInWindow(); + } + + private void findNext() { + context.setSearchForward( true ); + find(); + } + + private void findPrevious() { + context.setSearchForward( false ); + find(); + } + + private void find() { + // update search context + context.setSearchFor( findField.getText() ); + + // find + SearchResult result = SearchEngine.find( textArea, context ); + + // update matches info label + matchesLabel.setText( result.getMarkedCount() + " matches" ); + } + + private void matchCaseChanged() { + context.setMatchCase( matchCaseToggleButton.isSelected() ); + find(); + } + + private void matchWholeWordChanged() { + context.setWholeWord( matchWholeWordToggleButton.isSelected() ); + find(); + } + + private void regexChanged() { + context.setRegularExpression( regexToggleButton.isSelected() ); + find(); + } + + private void close() { + Container parent = getParent(); + if( parent instanceof CollapsibleSectionPanel ) + ((CollapsibleSectionPanel)parent).hideBottomComponent(); + else if( parent != null ) + parent.remove( this ); + } + + private void initComponents() { + // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents + findLabel = new JLabel(); + findField = new JTextField(); + findToolBar = new JToolBar(); + findPreviousButton = new JButton(); + findNextButton = new JButton(); + matchCaseToggleButton = new JToggleButton(); + matchWholeWordToggleButton = new JToggleButton(); + regexToggleButton = new JToggleButton(); + matchesLabel = new JLabel(); + hSpacer1 = new JPanel(null); + closeButton = new JButton(); + + //======== this ======== + setFocusCycleRoot(true); + setLayout(new MigLayout( + "insets 3,hidemode 3", + // columns + "[fill]" + + "[fill]0" + + "[grow,fill]", + // rows + "[]")); + + //---- findLabel ---- + findLabel.setText("Find:"); + findLabel.setDisplayedMnemonic('F'); + findLabel.setLabelFor(findField); + add(findLabel, "cell 0 0"); + + //---- findField ---- + findField.setColumns(16); + findField.addActionListener(e -> find()); + add(findField, "cell 1 0"); + + //======== findToolBar ======== + { + findToolBar.setFloatable(false); + findToolBar.setBorder(null); + + //---- findPreviousButton ---- + findPreviousButton.setToolTipText("Previous Occurrence"); + findPreviousButton.addActionListener(e -> findPrevious()); + findToolBar.add(findPreviousButton); + + //---- findNextButton ---- + findNextButton.setToolTipText("Next Occurrence"); + findNextButton.addActionListener(e -> findNext()); + findToolBar.add(findNextButton); + findToolBar.addSeparator(); + + //---- matchCaseToggleButton ---- + matchCaseToggleButton.setToolTipText("Match Case"); + matchCaseToggleButton.addActionListener(e -> matchCaseChanged()); + findToolBar.add(matchCaseToggleButton); + + //---- matchWholeWordToggleButton ---- + matchWholeWordToggleButton.setToolTipText("Match Whole Word"); + matchWholeWordToggleButton.addActionListener(e -> matchWholeWordChanged()); + findToolBar.add(matchWholeWordToggleButton); + + //---- regexToggleButton ---- + regexToggleButton.setToolTipText("Regex"); + regexToggleButton.addActionListener(e -> regexChanged()); + findToolBar.add(regexToggleButton); + findToolBar.addSeparator(); + + //---- matchesLabel ---- + matchesLabel.setEnabled(false); + findToolBar.add(matchesLabel); + findToolBar.add(hSpacer1); + + //---- closeButton ---- + closeButton.setToolTipText("Close"); + closeButton.addActionListener(e -> close()); + findToolBar.add(closeButton); + } + add(findToolBar, "cell 2 0"); + // JFormDesigner - End of component initialization //GEN-END:initComponents + } + + // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables + private JLabel findLabel; + private JTextField findField; + private JToolBar findToolBar; + private JButton findPreviousButton; + private JButton findNextButton; + private JToggleButton matchCaseToggleButton; + private JToggleButton matchWholeWordToggleButton; + private JToggleButton regexToggleButton; + private JLabel matchesLabel; + private JPanel hSpacer1; + private JButton closeButton; + // JFormDesigner - End of variables declaration //GEN-END:variables +} diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd new file mode 100644 index 00000000..d993c89c --- /dev/null +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd @@ -0,0 +1,83 @@ +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "insets 3,hidemode 3" + "$columnConstraints": "[fill][fill]0[grow,fill]" + "$rowConstraints": "[]" + } ) { + name: "this" + "focusCycleRoot": true + add( new FormComponent( "javax.swing.JLabel" ) { + name: "findLabel" + "text": "Find:" + "displayedMnemonic": 70 + "labelFor": new FormReference( "findField" ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "findField" + "columns": 16 + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "find", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 0" + } ) + add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + name: "findToolBar" + "floatable": false + "border": sfield com.jformdesigner.model.FormObject NULL_VALUE + add( new FormComponent( "javax.swing.JButton" ) { + name: "findPreviousButton" + "toolTipText": "Previous Occurrence" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "findPrevious", false ) ) + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "findNextButton" + "toolTipText": "Next Occurrence" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "findNext", false ) ) + } ) + add( new FormComponent( "javax.swing.JToolBar$Separator" ) { + name: "separator1" + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "matchCaseToggleButton" + "toolTipText": "Match Case" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "matchCaseChanged", false ) ) + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "matchWholeWordToggleButton" + "toolTipText": "Match Whole Word" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "matchWholeWordChanged", false ) ) + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "regexToggleButton" + "toolTipText": "Regex" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "regexChanged", false ) ) + } ) + add( new FormComponent( "javax.swing.JToolBar$Separator" ) { + name: "separator2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "matchesLabel" + "enabled": false + } ) + add( new FormComponent( "com.jformdesigner.designer.wrapper.HSpacer" ) { + name: "hSpacer1" + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "closeButton" + "toolTipText": "Close" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "close", false ) ) + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 0" + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 400, 300 ) + } ) + } +} diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 850ec621..d914af25 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -30,6 +30,7 @@ import javax.swing.JLayer; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.SwingUtilities; +import org.fife.rsta.ui.CollapsibleSectionPanel; import org.fife.ui.autocomplete.AutoCompletion; import org.fife.ui.autocomplete.CompletionProvider; import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory; @@ -53,8 +54,10 @@ class FlatThemeEditorPane private static final String FLATLAF_STYLE = "text/flatlaf"; + private final CollapsibleSectionPanel collapsiblePanel; private final RTextScrollPane scrollPane; private final FlatSyntaxTextArea textArea; + private FlatFindReplaceBar findReplaceBar; private File file; @@ -114,7 +117,10 @@ class FlatThemeEditorPane // use same font for line numbers as in editor scrollPane.getGutter().setLineNumberFont( textArea.getFont() ); - add( scrollPane, BorderLayout.CENTER ); + // create collapsible panel + collapsiblePanel = new CollapsibleSectionPanel(); + collapsiblePanel.add( scrollPane ); + add( collapsiblePanel, BorderLayout.CENTER ); } private static Font scaleFont( Font font ) { @@ -198,4 +204,13 @@ class FlatThemeEditorPane Window window = SwingUtilities.windowForComponent( this ); return (window instanceof JFrame) ? ((JFrame)window).getTitle() : null; } + + void showFindReplaceBar() { + if( findReplaceBar == null ) { + findReplaceBar = new FlatFindReplaceBar( textArea ); + collapsiblePanel.addBottomComponent( findReplaceBar ); + } + + collapsiblePanel.showBottomComponent( findReplaceBar ); + } } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 5643c4fa..48b6e4ed 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -179,12 +179,20 @@ public class FlatThemeFileEditor tabbedPane.setSelectedIndex( index ); } + private void find() { + FlatThemeEditorPane themeEditorPane = (FlatThemeEditorPane) tabbedPane.getSelectedComponent(); + if( themeEditorPane != null ) + themeEditorPane.showFindReplaceBar(); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents menuBar = new JMenuBar(); fileMenu = new JMenu(); saveAllMenuItem = new JMenuItem(); exitMenuItem = new JMenuItem(); + editMenu = new JMenu(); + findMenuItem = new JMenuItem(); windowMenu = new JMenu(); nextEditorMenuItem = new JMenuItem(); previousEditorMenuItem = new JMenuItem(); @@ -237,6 +245,20 @@ public class FlatThemeFileEditor } menuBar.add(fileMenu); + //======== editMenu ======== + { + editMenu.setText("Edit"); + editMenu.setMnemonic('E'); + + //---- findMenuItem ---- + findMenuItem.setText("Find..."); + findMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); + findMenuItem.setMnemonic('F'); + findMenuItem.addActionListener(e -> find()); + editMenu.add(findMenuItem); + } + menuBar.add(editMenu); + //======== windowMenu ======== { windowMenu.setText("Window"); @@ -294,6 +316,8 @@ public class FlatThemeFileEditor private JMenu fileMenu; private JMenuItem saveAllMenuItem; private JMenuItem exitMenuItem; + private JMenu editMenu; + private JMenuItem findMenuItem; private JMenu windowMenu; private JMenuItem nextEditorMenuItem; private JMenuItem previousEditorMenuItem; diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd index 5dad47f3..d424ce74 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd @@ -63,6 +63,18 @@ new FormModel { addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "exit", false ) ) } ) } ) + add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) { + name: "editMenu" + "text": "Edit" + "mnemonic": 69 + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "findMenuItem" + "text": "Find..." + "accelerator": static javax.swing.KeyStroke getKeyStroke( 70, 4226, false ) + "mnemonic": 70 + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "find", false ) ) + } ) + } ) add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) { name: "windowMenu" "text": "Window" diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/LICENSE.txt b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/LICENSE.txt new file mode 100644 index 00000000..186cd751 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/LICENSE.txt @@ -0,0 +1,3 @@ +The icons in this folder are from IntelliJ IDEA Community Edition, +which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o. +See: https://github.com/JetBrains/intellij-community/ diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/close.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/close.svg new file mode 100644 index 00000000..7f63bd7f --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg new file mode 100644 index 00000000..62f0f972 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg @@ -0,0 +1,3 @@ + + + diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg new file mode 100644 index 00000000..88d78e89 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg @@ -0,0 +1,3 @@ + + + diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/matchCase.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/matchCase.svg new file mode 100644 index 00000000..874ee768 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/matchCase.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/regex.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/regex.svg new file mode 100644 index 00000000..68316ab9 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/regex.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/words.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/words.svg new file mode 100644 index 00000000..353e3bb4 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/words.svg @@ -0,0 +1,5 @@ + + + + + From 3f202a7cdc1e0b929ea399e5944ebfadcd553c56 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 15:24:32 +0100 Subject: [PATCH 095/178] Theme Editor: transfer focus to editor when hiding "find bar" --- .../flatlaf/themeeditor/FlatFindReplaceBar.java | 1 + .../flatlaf/themeeditor/FlatThemeEditorPane.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index 141b0614..9910c28f 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -68,6 +68,7 @@ class FlatFindReplaceBar @Override public boolean requestFocusInWindow() { + // invoked from CollapsibleSectionPanel return findField.requestFocusInWindow(); } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index d914af25..ade51c5d 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -106,8 +106,18 @@ class FlatThemeEditorPane // create overlay layer JLayer overlay = new JLayer<>( textArea, new FlatThemeEditorOverlay() ); + // create view panel that transfers focus to editor when hiding find/replace bar + JPanel viewPanel = new JPanel( new BorderLayout() ) { + @Override + public boolean requestFocusInWindow() { + // invoked from CollapsibleSectionPanel + return textArea.requestFocusInWindow(); + } + }; + viewPanel.add( overlay, BorderLayout.CENTER ); + // create scroll pane - scrollPane = new RTextScrollPane( overlay ); + scrollPane = new RTextScrollPane( viewPanel ); scrollPane.setLineNumbersEnabled( true ); // scale fonts From 1c08e98c1c2cd908c90cf117099a1f694e3152c1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 15:55:22 +0100 Subject: [PATCH 096/178] Theme Editor: show/hide highlighted matches when showing/hiding "find bar" --- .../flatlaf/themeeditor/FlatFindReplaceBar.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index 9910c28f..bad54386 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -72,6 +72,22 @@ class FlatFindReplaceBar return findField.requestFocusInWindow(); } + @Override + public void addNotify() { + super.addNotify(); + + // if showing bar, highlight matches in editor + find(); + } + + @Override + public void removeNotify() { + super.removeNotify(); + + // if hiding bar, clear all highlighted matches in editor + SearchEngine.markAll( textArea, new SearchContext() ); + } + private void findNext() { context.setSearchForward( true ); find(); From c40912013df5a9f1476ca9d43e79e410e63d30fc Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 16:11:22 +0100 Subject: [PATCH 097/178] Theme Editor: use markAll() (instead of find()) to avoid that selection jumps to next occurrence when showing find bar or when changing options --- .../themeeditor/FlatFindReplaceBar.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index bad54386..59983e6c 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -77,7 +77,7 @@ class FlatFindReplaceBar super.addNotify(); // if showing bar, highlight matches in editor - find(); + markAll(); } @Override @@ -99,11 +99,21 @@ class FlatFindReplaceBar } private void find() { + findOrMarkAll( true ); + } + + private void markAll() { + findOrMarkAll( false ); + } + + private void findOrMarkAll( boolean find ) { // update search context context.setSearchFor( findField.getText() ); // find - SearchResult result = SearchEngine.find( textArea, context ); + SearchResult result = find + ? SearchEngine.find( textArea, context ) + : SearchEngine.markAll( textArea, context ); // update matches info label matchesLabel.setText( result.getMarkedCount() + " matches" ); @@ -111,17 +121,17 @@ class FlatFindReplaceBar private void matchCaseChanged() { context.setMatchCase( matchCaseToggleButton.isSelected() ); - find(); + markAll(); } private void matchWholeWordChanged() { context.setWholeWord( matchWholeWordToggleButton.isSelected() ); - find(); + markAll(); } private void regexChanged() { context.setRegularExpression( regexToggleButton.isSelected() ); - find(); + markAll(); } private void close() { From b3db52b2ed6d829c7f023adbad1f71957ccf6061 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 16:23:04 +0100 Subject: [PATCH 098/178] Theme Editor: mark occurrence while typing; disable previous/next occurrence buttons if searchFor is empty --- .../themeeditor/FlatFindReplaceBar.java | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index 59983e6c..cc2af24a 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -18,6 +18,8 @@ package com.formdev.flatlaf.themeeditor; import java.awt.Container; import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import org.fife.rsta.ui.CollapsibleSectionPanel; import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; import org.fife.ui.rtextarea.SearchContext; @@ -41,6 +43,8 @@ class FlatFindReplaceBar initComponents(); + findField.getDocument().addDocumentListener( new MarkAllUpdater() ); + findPreviousButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg" ) ); findNextButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg" ) ); matchCaseToggleButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/matchCase.svg" ) ); @@ -108,7 +112,8 @@ class FlatFindReplaceBar private void findOrMarkAll( boolean find ) { // update search context - context.setSearchFor( findField.getText() ); + String searchFor = findField.getText(); + context.setSearchFor( searchFor ); // find SearchResult result = find @@ -117,6 +122,11 @@ class FlatFindReplaceBar // update matches info label matchesLabel.setText( result.getMarkedCount() + " matches" ); + + // enabled/disable + boolean findEnabled = (searchFor != null && !searchFor.isEmpty()); + findPreviousButton.setEnabled( findEnabled ); + findNextButton.setEnabled( findEnabled ); } private void matchCaseChanged() { @@ -237,4 +247,25 @@ class FlatFindReplaceBar private JPanel hSpacer1; private JButton closeButton; // JFormDesigner - End of variables declaration //GEN-END:variables + + //---- class MarkAllUpdater ----------------------------------------------- + + private class MarkAllUpdater + implements DocumentListener + { + @Override + public void insertUpdate( DocumentEvent e ) { + markAll(); + } + + @Override + public void removeUpdate( DocumentEvent e ) { + markAll(); + } + + @Override + public void changedUpdate( DocumentEvent e ) { + markAll(); + } + } } From 95ce92fa1854182fd5853721421f5d540e1154ac Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 17:34:16 +0100 Subject: [PATCH 099/178] Theme Editor: find previous/next with UP/DOWN keys --- .../themeeditor/FlatFindReplaceBar.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index cc2af24a..83cb7ee6 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -17,6 +17,9 @@ package com.formdev.flatlaf.themeeditor; import java.awt.Container; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.util.function.Consumer; import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -45,6 +48,14 @@ class FlatFindReplaceBar findField.getDocument().addDocumentListener( new MarkAllUpdater() ); + // find previous/next with UP/DOWN keys + InputMap inputMap = findField.getInputMap(); + inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_UP, 0 ), "findPrevious" ); + inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_DOWN, 0 ), "findNext" ); + ActionMap actionMap = findField.getActionMap(); + actionMap.put( "findPrevious", new ConsumerAction( e -> findPrevious() ) ); + actionMap.put( "findNext", new ConsumerAction( e -> findNext() ) ); + findPreviousButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg" ) ); findNextButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg" ) ); matchCaseToggleButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/matchCase.svg" ) ); @@ -268,4 +279,21 @@ class FlatFindReplaceBar markAll(); } } + + //---- class ConsumerAction ----------------------------------------------- + + private static class ConsumerAction + extends AbstractAction + { + private final Consumer consumer; + + ConsumerAction( Consumer consumer ) { + this.consumer = consumer; + } + + @Override + public void actionPerformed( ActionEvent e ) { + consumer.accept( e ); + } + } } From d70eca9774553ae0b235a8ed7a44c134e4d9a299 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 18:15:20 +0100 Subject: [PATCH 100/178] Theme Editor: added "error strip" to right side; removed scroll pane border --- .../flatlaf/themeeditor/FlatThemeEditorPane.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index ade51c5d..28ca332f 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -30,10 +30,13 @@ import javax.swing.JLayer; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.border.MatteBorder; import org.fife.rsta.ui.CollapsibleSectionPanel; import org.fife.ui.autocomplete.AutoCompletion; import org.fife.ui.autocomplete.CompletionProvider; import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory; +import org.fife.ui.rsyntaxtextarea.ErrorStrip; import org.fife.ui.rsyntaxtextarea.FileLocation; import org.fife.ui.rsyntaxtextarea.SyntaxScheme; import org.fife.ui.rsyntaxtextarea.TextEditorPane; @@ -118,6 +121,7 @@ class FlatThemeEditorPane // create scroll pane scrollPane = new RTextScrollPane( viewPanel ); + scrollPane.setBorder( null ); scrollPane.setLineNumbersEnabled( true ); // scale fonts @@ -127,9 +131,13 @@ class FlatThemeEditorPane // use same font for line numbers as in editor scrollPane.getGutter().setLineNumberFont( textArea.getFont() ); + // create error strip + ErrorStrip errorStrip = new ErrorStrip( textArea ); + // create collapsible panel collapsiblePanel = new CollapsibleSectionPanel(); collapsiblePanel.add( scrollPane ); + collapsiblePanel.add( errorStrip, BorderLayout.LINE_END ); add( collapsiblePanel, BorderLayout.CENTER ); } @@ -218,6 +226,8 @@ class FlatThemeEditorPane void showFindReplaceBar() { if( findReplaceBar == null ) { findReplaceBar = new FlatFindReplaceBar( textArea ); + findReplaceBar.setBorder( new MatteBorder( 1, 0, 0, 0, + UIManager.getColor( "Component.borderColor" ) ) ); collapsiblePanel.addBottomComponent( findReplaceBar ); } From 2f47466f3bed00f85b3e21953a59b8be49bb6daa Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 22:29:09 +0100 Subject: [PATCH 101/178] Theme Editor: - fixed broken (mouse-wheel) scrolling caused by the additional JPanel - fixed broken slide-in animation of "find bar" --- .../flatlaf/themeeditor/FlatFindReplaceBar.java | 12 +++++------- .../flatlaf/themeeditor/FlatThemeEditorPane.java | 12 +----------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index 83cb7ee6..a8ba969b 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -84,23 +84,21 @@ class FlatFindReplaceBar @Override public boolean requestFocusInWindow() { // invoked from CollapsibleSectionPanel - return findField.requestFocusInWindow(); - } - - @Override - public void addNotify() { - super.addNotify(); // if showing bar, highlight matches in editor + // (not invoking this from addNotify() because this would break the slide-in animation) markAll(); + + return findField.requestFocusInWindow(); } @Override public void removeNotify() { super.removeNotify(); - // if hiding bar, clear all highlighted matches in editor + // if hiding bar, clear all highlighted matches in editor and focus it SearchEngine.markAll( textArea, new SearchContext() ); + textArea.requestFocusInWindow(); } private void findNext() { diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 28ca332f..836e1ce5 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -109,18 +109,8 @@ class FlatThemeEditorPane // create overlay layer JLayer overlay = new JLayer<>( textArea, new FlatThemeEditorOverlay() ); - // create view panel that transfers focus to editor when hiding find/replace bar - JPanel viewPanel = new JPanel( new BorderLayout() ) { - @Override - public boolean requestFocusInWindow() { - // invoked from CollapsibleSectionPanel - return textArea.requestFocusInWindow(); - } - }; - viewPanel.add( overlay, BorderLayout.CENTER ); - // create scroll pane - scrollPane = new RTextScrollPane( viewPanel ); + scrollPane = new RTextScrollPane( overlay ); scrollPane.setBorder( null ); scrollPane.setLineNumbersEnabled( true ); From 89d0c301c23af00fd4671397e9abe5a4b0b1648a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 31 Dec 2020 23:22:45 +0100 Subject: [PATCH 102/178] Theme Editor: "replace" and "replace all" added; focus editor with F12 key --- .../themeeditor/FlatFindReplaceBar.java | 113 +++++++++++++++--- .../themeeditor/FlatFindReplaceBar.jfd | 72 ++++++++--- .../themeeditor/FlatThemeFileEditor.java | 2 +- .../themeeditor/FlatThemeFileEditor.jfd | 2 +- 4 files changed, 157 insertions(+), 32 deletions(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index a8ba969b..9816beec 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -48,13 +48,15 @@ class FlatFindReplaceBar findField.getDocument().addDocumentListener( new MarkAllUpdater() ); - // find previous/next with UP/DOWN keys - InputMap inputMap = findField.getInputMap(); + // find previous/next with UP/DOWN keys; focus editor with F12 key + InputMap inputMap = getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_UP, 0 ), "findPrevious" ); inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_DOWN, 0 ), "findNext" ); - ActionMap actionMap = findField.getActionMap(); + inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_F12, 0 ), "focusEditor" ); + ActionMap actionMap = getActionMap(); actionMap.put( "findPrevious", new ConsumerAction( e -> findPrevious() ) ); actionMap.put( "findNext", new ConsumerAction( e -> findNext() ) ); + actionMap.put( "focusEditor", new ConsumerAction( e -> textArea.requestFocusInWindow() ) ); findPreviousButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowPrevMatches.svg" ) ); findNextButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/findAndShowNextMatches.svg" ) ); @@ -76,6 +78,7 @@ class FlatFindReplaceBar this.context = context; findField.setText( context.getSearchFor() ); + replaceField.setText( context.getReplaceWith() ); matchCaseToggleButton.setSelected( context.getMatchCase() ); matchWholeWordToggleButton.setSelected( context.getWholeWord() ); regexToggleButton.setSelected( context.isRegularExpression() ); @@ -130,7 +133,7 @@ class FlatFindReplaceBar : SearchEngine.markAll( textArea, context ); // update matches info label - matchesLabel.setText( result.getMarkedCount() + " matches" ); + updateMatchesLabel( result, false ); // enabled/disable boolean findEnabled = (searchFor != null && !searchFor.isEmpty()); @@ -153,6 +156,33 @@ class FlatFindReplaceBar markAll(); } + private void replace() { + // update search context + context.setReplaceWith( replaceField.getText() ); + + // replace + SearchResult result = SearchEngine.replace( textArea, context ); + + // update matches info labels + updateMatchesLabel( result, true ); + } + + private void replaceAll() { + // update search context + context.setReplaceWith( replaceField.getText() ); + + // replace all + SearchResult result = SearchEngine.replaceAll( textArea, context ); + + // update matches info labels + updateMatchesLabel( result, true ); + } + + private void updateMatchesLabel( SearchResult result, boolean replace ) { + matchesLabel.setText( result.getMarkedCount() + " matches" ); + replaceMatchesLabel.setText( replace ? result.getCount() + " matches replaced" : null ); + } + private void close() { Container parent = getParent(); if( parent instanceof CollapsibleSectionPanel ) @@ -172,18 +202,27 @@ class FlatFindReplaceBar matchWholeWordToggleButton = new JToggleButton(); regexToggleButton = new JToggleButton(); matchesLabel = new JLabel(); - hSpacer1 = new JPanel(null); + closeToolBar = new JToolBar(); closeButton = new JButton(); + replaceLabel = new JLabel(); + replaceField = new JTextField(); + toolBar1 = new JToolBar(); + replaceButton = new JButton(); + replaceAllButton = new JButton(); + replaceMatchesLabel = new JLabel(); //======== this ======== setFocusCycleRoot(true); setLayout(new MigLayout( - "insets 3,hidemode 3", + "insets 3 6 3 3,hidemode 3", // columns "[fill]" + "[fill]0" + - "[grow,fill]", + "[fill]" + + "[grow,fill]" + + "[fill]", // rows + "[]3" + "[]")); //---- findLabel ---- @@ -227,19 +266,57 @@ class FlatFindReplaceBar regexToggleButton.setToolTipText("Regex"); regexToggleButton.addActionListener(e -> regexChanged()); findToolBar.add(regexToggleButton); - findToolBar.addSeparator(); + } + add(findToolBar, "cell 2 0"); - //---- matchesLabel ---- - matchesLabel.setEnabled(false); - findToolBar.add(matchesLabel); - findToolBar.add(hSpacer1); + //---- matchesLabel ---- + matchesLabel.setEnabled(false); + add(matchesLabel, "cell 3 0"); + + //======== closeToolBar ======== + { + closeToolBar.setFloatable(false); + closeToolBar.setBorder(null); //---- closeButton ---- closeButton.setToolTipText("Close"); closeButton.addActionListener(e -> close()); - findToolBar.add(closeButton); + closeToolBar.add(closeButton); } - add(findToolBar, "cell 2 0"); + add(closeToolBar, "cell 4 0"); + + //---- replaceLabel ---- + replaceLabel.setText("Replace:"); + replaceLabel.setDisplayedMnemonic('R'); + replaceLabel.setLabelFor(replaceField); + add(replaceLabel, "cell 0 1"); + + //---- replaceField ---- + replaceField.setColumns(16); + add(replaceField, "cell 1 1"); + + //======== toolBar1 ======== + { + toolBar1.setFloatable(false); + toolBar1.setBorder(null); + + //---- replaceButton ---- + replaceButton.setText("Replace"); + replaceButton.setMnemonic('E'); + replaceButton.addActionListener(e -> replace()); + toolBar1.add(replaceButton); + + //---- replaceAllButton ---- + replaceAllButton.setText("Replace All"); + replaceAllButton.setMnemonic('A'); + replaceAllButton.addActionListener(e -> replaceAll()); + toolBar1.add(replaceAllButton); + } + add(toolBar1, "cell 2 1"); + + //---- replaceMatchesLabel ---- + replaceMatchesLabel.setEnabled(false); + add(replaceMatchesLabel, "cell 3 1"); // JFormDesigner - End of component initialization //GEN-END:initComponents } @@ -253,8 +330,14 @@ class FlatFindReplaceBar private JToggleButton matchWholeWordToggleButton; private JToggleButton regexToggleButton; private JLabel matchesLabel; - private JPanel hSpacer1; + private JToolBar closeToolBar; private JButton closeButton; + private JLabel replaceLabel; + private JTextField replaceField; + private JToolBar toolBar1; + private JButton replaceButton; + private JButton replaceAllButton; + private JLabel replaceMatchesLabel; // JFormDesigner - End of variables declaration //GEN-END:variables //---- class MarkAllUpdater ----------------------------------------------- diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd index d993c89c..a5ed0622 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.jfd @@ -4,9 +4,9 @@ new FormModel { contentType: "form/swing" root: new FormRoot { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$layoutConstraints": "insets 3,hidemode 3" - "$columnConstraints": "[fill][fill]0[grow,fill]" - "$rowConstraints": "[]" + "$layoutConstraints": "insets 3 6 3 3,hidemode 3" + "$columnConstraints": "[fill][fill]0[fill][grow,fill][fill]" + "$rowConstraints": "[]3[]" } ) { name: "this" "focusCycleRoot": true @@ -57,27 +57,69 @@ new FormModel { "toolTipText": "Regex" addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "regexChanged", false ) ) } ) - add( new FormComponent( "javax.swing.JToolBar$Separator" ) { - name: "separator2" - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "matchesLabel" - "enabled": false - } ) - add( new FormComponent( "com.jformdesigner.designer.wrapper.HSpacer" ) { - name: "hSpacer1" - } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "matchesLabel" + "enabled": false + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 0" + } ) + add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + name: "closeToolBar" + "floatable": false + "border": sfield com.jformdesigner.model.FormObject NULL_VALUE add( new FormComponent( "javax.swing.JButton" ) { name: "closeButton" "toolTipText": "Close" addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "close", false ) ) } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 2 0" + "value": "cell 4 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "replaceLabel" + "text": "Replace:" + "displayedMnemonic": 82 + "labelFor": new FormReference( "replaceField" ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "replaceField" + "columns": 16 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) + add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + name: "toolBar1" + "floatable": false + "border": sfield com.jformdesigner.model.FormObject NULL_VALUE + add( new FormComponent( "javax.swing.JButton" ) { + name: "replaceButton" + "text": "Replace" + "mnemonic": 69 + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "replace", false ) ) + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "replaceAllButton" + "text": "Replace All" + "mnemonic": 65 + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "replaceAll", false ) ) + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "replaceMatchesLabel" + "enabled": false + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 1" } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 400, 300 ) + "size": new java.awt.Dimension( 465, 125 ) } ) } } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 48b6e4ed..01bd54b3 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -251,7 +251,7 @@ public class FlatThemeFileEditor editMenu.setMnemonic('E'); //---- findMenuItem ---- - findMenuItem.setText("Find..."); + findMenuItem.setText("Find/Replace..."); findMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); findMenuItem.setMnemonic('F'); findMenuItem.addActionListener(e -> find()); diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd index d424ce74..5803684e 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd @@ -69,7 +69,7 @@ new FormModel { "mnemonic": 69 add( new FormComponent( "javax.swing.JMenuItem" ) { name: "findMenuItem" - "text": "Find..." + "text": "Find/Replace..." "accelerator": static javax.swing.KeyStroke getKeyStroke( 70, 4226, false ) "mnemonic": 70 addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "find", false ) ) From 15ba00a902d699427b29dd10c669895fdb80936f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 1 Jan 2021 12:56:29 +0100 Subject: [PATCH 103/178] Theme Editor: use selected text in editor for searching when pressing Ctrl+F --- .../flatlaf/themeeditor/FlatFindReplaceBar.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index 9816beec..f1186801 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -29,6 +29,7 @@ import org.fife.ui.rtextarea.SearchContext; import org.fife.ui.rtextarea.SearchEngine; import org.fife.ui.rtextarea.SearchResult; import com.formdev.flatlaf.extras.FlatSVGIcon; +import com.formdev.flatlaf.util.StringUtils; import net.miginfocom.swing.*; /** @@ -88,6 +89,11 @@ class FlatFindReplaceBar public boolean requestFocusInWindow() { // invoked from CollapsibleSectionPanel + // use selected text in editor for searching + String selectedText = textArea.getSelectedText(); + if( !StringUtils.isEmpty( selectedText ) && selectedText.indexOf( '\n' ) < 0 ) + findField.setText( selectedText ); + // if showing bar, highlight matches in editor // (not invoking this from addNotify() because this would break the slide-in animation) markAll(); @@ -136,7 +142,7 @@ class FlatFindReplaceBar updateMatchesLabel( result, false ); // enabled/disable - boolean findEnabled = (searchFor != null && !searchFor.isEmpty()); + boolean findEnabled = !StringUtils.isEmpty( searchFor ); findPreviousButton.setEnabled( findEnabled ); findNextButton.setEnabled( findEnabled ); } @@ -158,6 +164,7 @@ class FlatFindReplaceBar private void replace() { // update search context + context.setSearchFor( findField.getText() ); context.setReplaceWith( replaceField.getText() ); // replace @@ -169,6 +176,7 @@ class FlatFindReplaceBar private void replaceAll() { // update search context + context.setSearchFor( findField.getText() ); context.setReplaceWith( replaceField.getText() ); // replace all From 8ec907050e49ca4bb4551b750e55aa72ead6c262 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 1 Jan 2021 17:43:05 +0100 Subject: [PATCH 104/178] Theme Editor: - "Open Directory" action added - remember recently opened directories - remember recently selected file --- .../themeeditor/FlatThemeEditorPane.java | 5 + .../themeeditor/FlatThemeFileEditor.java | 314 ++++++++++++++++-- .../themeeditor/FlatThemeFileEditor.jfd | 24 +- .../flatlaf/themeeditor/icons/menu-open.svg | 3 + 4 files changed, 324 insertions(+), 22 deletions(-) create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/menu-open.svg diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 836e1ce5..47a13b33 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -136,6 +136,11 @@ class FlatThemeEditorPane return font.deriveFont( (float) newFontSize ); } + @Override + public boolean requestFocusInWindow() { + return textArea.requestFocusInWindow(); + } + void setBaseFiles( List baseFiles ) { textArea.propertiesSupport.setBaseFiles( baseFiles ); } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 01bd54b3..9897d331 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -17,21 +17,27 @@ package com.formdev.flatlaf.themeeditor; import java.awt.BorderLayout; +import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.*; import java.io.File; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Comparator; import java.util.HashSet; +import java.util.Objects; import java.util.function.Supplier; +import java.util.prefs.Preferences; import javax.swing.*; -import com.formdev.flatlaf.extras.components.*; import net.miginfocom.swing.*; import com.formdev.flatlaf.FlatLightLaf; import com.formdev.flatlaf.extras.FlatInspector; +import com.formdev.flatlaf.extras.FlatSVGIcon; import com.formdev.flatlaf.extras.FlatUIDefaultsInspector; +import com.formdev.flatlaf.extras.components.*; import com.formdev.flatlaf.util.StringUtils; import com.formdev.flatlaf.util.UIScale; @@ -43,21 +49,26 @@ import com.formdev.flatlaf.util.UIScale; public class FlatThemeFileEditor extends JFrame { + private static final String PREFS_ROOT_PATH = "/flatlaf-theme-editor"; + private static final String KEY_DIRECTORIES = "directories"; + private static final String KEY_RECENT_DIRECTORY = "recentDirectory"; + private static final String KEY_RECENT_FILE = "recentFile"; + private File dir; + private Preferences state; + private boolean inLoadDirectory; public static void main( String[] args ) { - File dir = new File( args.length > 0 - ? args[0] - : "." ); + File dir = (args.length > 0) + ? new File( args[0] ) + : null; SwingUtilities.invokeLater( () -> { FlatLightLaf.install(); FlatInspector.install( "ctrl alt shift X" ); FlatUIDefaultsInspector.install( "ctrl shift alt Y" ); - FlatThemeFileEditor frame = new FlatThemeFileEditor(); - - frame.loadDirectory( dir ); + FlatThemeFileEditor frame = new FlatThemeFileEditor( dir ); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize( Math.min( UIScale.scale( 800 ), screenSize.width ), @@ -67,24 +78,133 @@ public class FlatThemeFileEditor } ); } - public FlatThemeFileEditor() { + private FlatThemeFileEditor( File dir ) { initComponents(); + + openDirectoryButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/menu-open.svg" ) ); + + restoreState(); + + // load directory + if( dir == null ) { + String recentDirectory = state.get( KEY_RECENT_DIRECTORY, null ); + if( recentDirectory != null ) + dir = new File( recentDirectory ); + } + if( dir != null && !dir.isDirectory() ) + dir = null; + if( dir != null ) + loadDirectory( dir ); + } + + private void openDirectory() { + // save all currently open editors before showing directory chooser + if( !saveAll() ) + return; + + // choose directory + JFileChooser chooser = new JFileChooser( dir ) { + @Override + public void approveSelection() { + if( !checkDirectory( this, getSelectedFile() ) ) + return; + + super.approveSelection(); + } + }; + chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY ); + if( chooser.showOpenDialog( this ) != JFileChooser.APPROVE_OPTION ) + return; + + File selectedFile = chooser.getSelectedFile(); + if( selectedFile == null || selectedFile.equals( dir ) ) + return; + + // open new directory + loadDirectory( selectedFile ); + } + + private boolean checkDirectory( Component parentComponent, File dir ) { + if( !dir.isDirectory() ) { + JOptionPane.showMessageDialog( parentComponent, + "Directory '" + dir + "' does not exist.", + getTitle(), JOptionPane.INFORMATION_MESSAGE ); + return false; + } + + if( getPropertiesFiles( dir ).length == 0 ) { + JOptionPane.showMessageDialog( parentComponent, + "Directory '" + dir + "' does not contain properties files.", + getTitle(), JOptionPane.INFORMATION_MESSAGE ); + return false; + } + + return true; + } + + private void directoryChanged() { + if( inLoadDirectory ) + return; + + Object selectedItem = directoryField.getSelectedItem(); + if( selectedItem == null ) + return; + + File dir = new File( (String) selectedItem ); + if( checkDirectory( this, dir ) ) + loadDirectory( dir ); + else { + // remove from directories history + directoryField.removeItem( selectedItem ); + directoryField.setSelectedItem( this.dir.getAbsolutePath() ); + saveState(); + } } private void loadDirectory( File dir ) { + dir = getCanonicalFile( dir ); + if( Objects.equals( this.dir, dir ) || !dir.isDirectory() ) + return; + + // save all currently open editors + if( !saveAll() ) + return; + this.dir = dir; - try { - directoryField.setText( dir.getCanonicalPath() ); - } catch( IOException ex ) { - directoryField.setText( dir.getAbsolutePath() ); - } + inLoadDirectory = true; + // close all open editors + int tabCount = tabbedPane.getTabCount(); + for( int i = tabCount - 1; i >= 0; i-- ) + tabbedPane.removeTabAt( i ); + + // update directory field + DefaultComboBoxModel model = (DefaultComboBoxModel) directoryField.getModel(); + String dirStr = dir.getAbsolutePath(); + int indexOf = model.getIndexOf( dirStr ); + if( indexOf < 0 ) + model.addElement( dirStr ); + directoryField.setSelectedItem( dirStr ); + + // open all properties files in directory + String recentFile = state.get( KEY_RECENT_FILE, null ); for( File file : getPropertiesFiles( dir ) ) - openFile( file ); + openFile( file, file.getName().equals( recentFile ) ); + + FlatThemeEditorPane themeEditorPane = (FlatThemeEditorPane) tabbedPane.getSelectedComponent(); + if( themeEditorPane != null ) + themeEditorPane.requestFocusInWindow(); + + saveState(); + + inLoadDirectory = false; } private void updateDirectory() { + if( dir == null ) + return; + // update open tabs and remove tabs if file was removed HashSet openFiles = new HashSet<>(); FlatThemeEditorPane[] themeEditorPanes = getThemeEditorPanes(); @@ -99,7 +219,18 @@ public class FlatThemeFileEditor // open newly created files for( File file : getPropertiesFiles( dir ) ) { if( !openFiles.contains( file ) ) - openFile( file ); + openFile( file, false ); + } + } + + private File getCanonicalFile( File dir ) { + if( dir == null ) + return null; + + try { + return dir.getCanonicalFile(); + } catch( IOException ex ) { + return dir.getAbsoluteFile(); } } @@ -111,7 +242,7 @@ public class FlatThemeFileEditor return propertiesFiles; } - private void openFile( File file ) { + private void openFile( File file, boolean select ) { FlatThemeEditorPane themeEditorPane = new FlatThemeEditorPane(); try { themeEditorPane.load( file ); @@ -122,7 +253,6 @@ public class FlatThemeFileEditor Supplier titleFun = () -> { return (themeEditorPane.isDirty() ? "* " : "") + StringUtils.removeTrailing( themeEditorPane.getFile().getName(), ".properties" ); - }; themeEditorPane.addPropertyChangeListener( FlatThemeEditorPane.DIRTY_PROPERTY, e -> { int index = tabbedPane.indexOfComponent( themeEditorPane ); @@ -131,6 +261,18 @@ public class FlatThemeFileEditor } ); tabbedPane.addTab( titleFun.get(), null, themeEditorPane, file.getAbsolutePath() ); + + if( select ) + tabbedPane.setSelectedComponent( themeEditorPane ); + } + + private void selectedTabChanged() { + if( inLoadDirectory ) + return; + + FlatThemeEditorPane themeEditorPane = (FlatThemeEditorPane) tabbedPane.getSelectedComponent(); + String filename = (themeEditorPane != null) ? themeEditorPane.getFile().getName() : null; + putPrefsString( state, KEY_RECENT_FILE, filename ); } private boolean saveAll() { @@ -166,6 +308,9 @@ public class FlatThemeFileEditor } private void nextEditor() { + if( tabbedPane.getTabCount() == 0 ) + return; + int index = tabbedPane.getSelectedIndex() + 1; if( index >= tabbedPane.getTabCount() ) index = 0; @@ -173,6 +318,9 @@ public class FlatThemeFileEditor } private void previousEditor() { + if( tabbedPane.getTabCount() == 0 ) + return; + int index = tabbedPane.getSelectedIndex() - 1; if( index < 0 ) index = tabbedPane.getTabCount() - 1; @@ -185,10 +333,58 @@ public class FlatThemeFileEditor themeEditorPane.showFindReplaceBar(); } + private void restoreState() { + state = Preferences.userRoot().node( PREFS_ROOT_PATH ); + + // restore directories history + String[] directories = getPrefsStrings( state, KEY_DIRECTORIES ); + SortedComboBoxModel model = new SortedComboBoxModel<>( directories ); + directoryField.setModel( model ); + } + + private void saveState() { + // save directories history + ComboBoxModel model = directoryField.getModel(); + String[] directories = new String[model.getSize()]; + for( int i = 0; i < directories.length; i++ ) + directories[i] = model.getElementAt( i ); + putPrefsStrings( state, KEY_DIRECTORIES, directories ); + + // save recent directory + putPrefsString( state, KEY_RECENT_DIRECTORY, dir.getAbsolutePath() ); + } + + private static void putPrefsString( Preferences prefs, String key, String value ) { + if( !StringUtils.isEmpty( value ) ) + prefs.put( key, value ); + else + prefs.remove( key ); + } + + private static String[] getPrefsStrings( Preferences prefs, String key ) { + ArrayList arr = new ArrayList<>(); + for( int i = 0; i < 10000; i++ ) { + String s = prefs.get( key+(i+1), null ); + if( s == null ) + break; + arr.add( s ); + } + return arr.toArray( new String[arr.size()] ); + } + + private static void putPrefsStrings( Preferences prefs, String key, String[] strings ) { + for( int i = 0; i < strings.length; i++ ) + prefs.put( key+(i+1), strings[i] ); + + for( int i = strings.length; prefs.get( key+(i+1), null ) != null; i++ ) + prefs.remove( key+(i+1) ); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents menuBar = new JMenuBar(); fileMenu = new JMenu(); + openDirectoryMenuItem = new JMenuItem(); saveAllMenuItem = new JMenuItem(); exitMenuItem = new JMenuItem(); editMenu = new JMenu(); @@ -198,7 +394,8 @@ public class FlatThemeFileEditor previousEditorMenuItem = new JMenuItem(); controlPanel = new JPanel(); directoryLabel = new JLabel(); - directoryField = new JTextField(); + directoryField = new JComboBox<>(); + openDirectoryButton = new JButton(); tabbedPane = new FlatTabbedPane(); //======== this ======== @@ -228,6 +425,13 @@ public class FlatThemeFileEditor { fileMenu.setText("File"); + //---- openDirectoryMenuItem ---- + openDirectoryMenuItem.setText("Open Directory..."); + openDirectoryMenuItem.setMnemonic('O'); + openDirectoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); + openDirectoryMenuItem.addActionListener(e -> openDirectory()); + fileMenu.add(openDirectoryMenuItem); + //---- saveAllMenuItem ---- saveAllMenuItem.setText("Save All"); saveAllMenuItem.setMnemonic('S'); @@ -288,7 +492,8 @@ public class FlatThemeFileEditor "hidemode 3", // columns "[fill]" + - "[grow,fill]", + "[grow,fill]" + + "[fill]", // rows "[]")); @@ -299,13 +504,21 @@ public class FlatThemeFileEditor //---- directoryField ---- directoryField.setEditable(false); directoryField.setFocusable(false); + directoryField.addActionListener(e -> directoryChanged()); controlPanel.add(directoryField, "cell 1 0"); + + //---- openDirectoryButton ---- + openDirectoryButton.setFocusable(false); + openDirectoryButton.addActionListener(e -> openDirectory()); + controlPanel.add(openDirectoryButton, "cell 2 0"); } contentPane.add(controlPanel, BorderLayout.NORTH); //======== tabbedPane ======== { tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); + tabbedPane.setFocusable(false); + tabbedPane.addChangeListener(e -> selectedTabChanged()); } contentPane.add(tabbedPane, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents @@ -314,6 +527,7 @@ public class FlatThemeFileEditor // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JMenuBar menuBar; private JMenu fileMenu; + private JMenuItem openDirectoryMenuItem; private JMenuItem saveAllMenuItem; private JMenuItem exitMenuItem; private JMenu editMenu; @@ -323,7 +537,67 @@ public class FlatThemeFileEditor private JMenuItem previousEditorMenuItem; private JPanel controlPanel; private JLabel directoryLabel; - private JTextField directoryField; + private JComboBox directoryField; + private JButton openDirectoryButton; private FlatTabbedPane tabbedPane; // JFormDesigner - End of variables declaration //GEN-END:variables + + //---- class SortedComboBoxModel ------------------------------------------ + + private static class SortedComboBoxModel + extends DefaultComboBoxModel + { + private Comparator comparator; + + public SortedComboBoxModel( E[] items ) { + this( items, null ); + } + + public SortedComboBoxModel( E[] items, Comparator c ) { + super( sort( items, c ) ); + this.comparator = c; + } + + @Override + public void addElement( E obj ) { + if( getSize() == 0 ) { + super.addElement( obj ); + } else { + int index = binarySearch( this, obj, comparator ); + insertElementAt( obj, (index < 0) ? ((-index)-1) : index ); + } + } + + static E[] sort( E[] items, Comparator c ) { + // clone array + items = items.clone(); + + Arrays.sort( items, c ); + return items; + } + + @SuppressWarnings("unchecked") + static int binarySearch( ListModel model, E key, Comparator c ) { + int low = 0; + int high = model.getSize() - 1; + + while( low <= high ) { + int mid = (low + high) / 2; + E midVal = model.getElementAt( mid ); + int cmp; + if( c != null ) + cmp = c.compare( midVal, key ); + else + cmp = ((Comparable)midVal).compareTo( key ); + + if( cmp < 0 ) + low = mid + 1; + else if( cmp > 0 ) + high = mid - 1; + else + return mid; // key found + } + return -(low + 1); // key not found. + } + } } diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd index 5803684e..b8d961e0 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd @@ -14,7 +14,7 @@ new FormModel { addEvent( new FormEvent( "java.awt.event.WindowListener", "windowActivated", "windowActivated", false ) ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "hidemode 3" - "$columnConstraints": "[fill][grow,fill]" + "$columnConstraints": "[fill][grow,fill][fill]" "$rowConstraints": "[]" } ) { name: "controlPanel" @@ -24,19 +24,32 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 0" } ) - add( new FormComponent( "javax.swing.JTextField" ) { + add( new FormComponent( "javax.swing.JComboBox" ) { name: "directoryField" "editable": false "focusable": false + auxiliary() { + "JavaCodeGenerator.typeParameters": "String" + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "directoryChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 0" } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "openDirectoryButton" + "focusable": false + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "openDirectory", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 0" + } ) }, new FormLayoutConstraints( class java.lang.String ) { "value": "North" } ) add( new FormContainer( "com.formdev.flatlaf.extras.components.FlatTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) { name: "tabbedPane" "tabLayoutPolicy": 1 + "focusable": false + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "selectedTabChanged", false ) ) }, new FormLayoutConstraints( class java.lang.String ) { "value": "Center" } ) @@ -45,6 +58,13 @@ new FormModel { add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) { name: "fileMenu" "text": "File" + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "openDirectoryMenuItem" + "text": "Open Directory..." + "mnemonic": 79 + "accelerator": static javax.swing.KeyStroke getKeyStroke( 79, 4226, false ) + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "openDirectory", false ) ) + } ) add( new FormComponent( "javax.swing.JMenuItem" ) { name: "saveAllMenuItem" "text": "Save All" diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/menu-open.svg b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/menu-open.svg new file mode 100644 index 00000000..51e7f354 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/icons/menu-open.svg @@ -0,0 +1,3 @@ + + + From cb65dc0e9df89540c97ae7e61911e4cad6d08a13 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 2 Jan 2021 13:09:31 +0100 Subject: [PATCH 105/178] added dummy pom.xml for GitHub dependency graph --- .github/dependency-graph/flatlaf-core/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependency-graph/flatlaf-core/pom.xml diff --git a/.github/dependency-graph/flatlaf-core/pom.xml b/.github/dependency-graph/flatlaf-core/pom.xml new file mode 100644 index 00000000..bbc2df4a --- /dev/null +++ b/.github/dependency-graph/flatlaf-core/pom.xml @@ -0,0 +1,10 @@ + + + 4.0.0 + + com.formdev + flatlaf + 1.0-SNAPSHOT + From e4a03ede1f170e300ab2395f5b59ebbfb7100cb5 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 2 Jan 2021 14:05:10 +0100 Subject: [PATCH 106/178] added dummy pom.xml for GitHub dependency graph for flatlaf-extras --- .github/dependency-graph/flatlaf-extras/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependency-graph/flatlaf-extras/pom.xml diff --git a/.github/dependency-graph/flatlaf-extras/pom.xml b/.github/dependency-graph/flatlaf-extras/pom.xml new file mode 100644 index 00000000..0e992fb4 --- /dev/null +++ b/.github/dependency-graph/flatlaf-extras/pom.xml @@ -0,0 +1,10 @@ + + + 4.0.0 + + com.formdev + flatlaf-extras + 0.46 + From 3eb53b96489a4fd6ff8056f38cc111cf44b0e9d2 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 2 Jan 2021 15:44:37 +0100 Subject: [PATCH 107/178] Theme Editor: save/restore window size (basic implementation; ignoring maximized state and screen number) --- .../themeeditor/FlatThemeFileEditor.java | 63 ++++++++++++++++--- 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 9897d331..50af6743 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -20,6 +20,9 @@ import java.awt.BorderLayout; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; +import java.awt.GraphicsConfiguration; +import java.awt.Insets; +import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.event.*; import java.io.File; @@ -28,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; +import java.util.List; import java.util.Objects; import java.util.function.Supplier; import java.util.prefs.Preferences; @@ -38,6 +42,7 @@ import com.formdev.flatlaf.extras.FlatInspector; import com.formdev.flatlaf.extras.FlatSVGIcon; import com.formdev.flatlaf.extras.FlatUIDefaultsInspector; import com.formdev.flatlaf.extras.components.*; +import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.StringUtils; import com.formdev.flatlaf.util.UIScale; @@ -53,6 +58,7 @@ public class FlatThemeFileEditor private static final String KEY_DIRECTORIES = "directories"; private static final String KEY_RECENT_DIRECTORY = "recentDirectory"; private static final String KEY_RECENT_FILE = "recentFile"; + private static final String KEY_WINDOW_BOUNDS = "windowBounds"; private File dir; private Preferences state; @@ -69,11 +75,6 @@ public class FlatThemeFileEditor FlatUIDefaultsInspector.install( "ctrl shift alt Y" ); FlatThemeFileEditor frame = new FlatThemeFileEditor( dir ); - - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - frame.setSize( Math.min( UIScale.scale( 800 ), screenSize.width ), - screenSize.height - UIScale.scale( 100 ) ); - frame.setLocationRelativeTo( null ); frame.setVisible( true ); } ); } @@ -84,6 +85,7 @@ public class FlatThemeFileEditor openDirectoryButton.setIcon( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/menu-open.svg" ) ); restoreState(); + restoreWindowBounds(); // load directory if( dir == null ) { @@ -284,8 +286,11 @@ public class FlatThemeFileEditor } private void exit() { - if( saveAll() ) - System.exit( 0 ); + if( !saveAll() ) + return; + + saveWindowBounds(); + System.exit( 0 ); } private void windowClosing() { @@ -354,6 +359,50 @@ public class FlatThemeFileEditor putPrefsString( state, KEY_RECENT_DIRECTORY, dir.getAbsolutePath() ); } + private void restoreWindowBounds() { + String windowBoundsStr = state.get( KEY_WINDOW_BOUNDS, null ); + if( windowBoundsStr != null ) { + List list = StringUtils.split( windowBoundsStr, ',' ); + if( list.size() >= 4 ) { + try { + int x = Integer.parseInt( list.get( 0 ) ); + int y = Integer.parseInt( list.get( 1 ) ); + int w = Integer.parseInt( list.get( 2 ) ); + int h = Integer.parseInt( list.get( 3 ) ); + + // limit to screen size + GraphicsConfiguration gc = getGraphicsConfiguration(); + if( gc != null ) { + Rectangle screenBounds = gc.getBounds(); + Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets( gc ); + Rectangle r = FlatUIUtils.subtractInsets( screenBounds, screenInsets ); + + w = Math.min( w, r.width ); + h = Math.min( h, r.height ); + x = Math.max( Math.min( x, r.width - w ), r.x ); + y = Math.max( Math.min( y, r.height - h ), r.y ); + } + + setBounds( x, y, w, h ); + return; + } catch( NumberFormatException ex ) { + // ignore + } + } + } + + // default window size + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + setSize( Math.min( UIScale.scale( 800 ), screenSize.width ), + screenSize.height - UIScale.scale( 100 ) ); + setLocationRelativeTo( null ); + } + + private void saveWindowBounds() { + Rectangle r = getBounds(); + state.put( KEY_WINDOW_BOUNDS, r.x + "," + r.y + ',' + r.width + ',' + r.height ); + } + private static void putPrefsString( Preferences prefs, String key, String value ) { if( !StringUtils.isEmpty( value ) ) prefs.put( key, value ); From 949ca5ddffda022b8b0f60ffb08b066271cc44e3 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 3 Jan 2021 11:55:09 +0100 Subject: [PATCH 108/178] JIDE: auto-initialize JIDE extensions (issue #230) --- CHANGELOG.md | 2 ++ .../formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java | 2 ++ .../formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java | 2 ++ .../formdev/flatlaf/testing/jideoss/FlatJideOssTest.java | 8 -------- .../flatlaf/testing/jideoss/FlatRangeSliderTest.java | 9 --------- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcf53180..ad19ce2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ FlatLaf Change Log - Extras: Added missing export of package `com.formdev.flatlaf.extras.components` to Java 9 module descriptor. +- JIDE Common Layer: Invoke `LookAndFeelFactory.installJideExtension()` when + using FlatLaf UI delegates. (issue #230) ## 0.46 diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java index 86494336..8ae713eb 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatJideTabbedPaneUI.java @@ -39,6 +39,7 @@ import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.ui.FlatUIUtils; +import com.jidesoft.plaf.LookAndFeelFactory; import com.jidesoft.plaf.UIDefaultsLookup; import com.jidesoft.plaf.basic.BasicJideTabbedPaneUI; import com.jidesoft.swing.JideTabbedPane; @@ -66,6 +67,7 @@ public class FlatJideTabbedPaneUI private Object[] oldRenderingHints; public static ComponentUI createUI( JComponent c ) { + LookAndFeelFactory.installJideExtension(); return new FlatJideTabbedPaneUI(); } diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index a8793da6..e92cb859 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -36,6 +36,7 @@ import javax.swing.plaf.ComponentUI; import com.formdev.flatlaf.ui.FlatSliderUI; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.UIScale; +import com.jidesoft.plaf.LookAndFeelFactory; import com.jidesoft.plaf.basic.BasicRangeSliderUI; /** @@ -65,6 +66,7 @@ public class FlatRangeSliderUI private Object[] oldRenderingHints; public static ComponentUI createUI( JComponent c ) { + LookAndFeelFactory.installJideExtension(); return new FlatRangeSliderUI(); } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java index 936fa1a2..b9c8e66b 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatJideOssTest.java @@ -24,7 +24,6 @@ import javax.swing.border.*; import com.formdev.flatlaf.testing.*; import com.formdev.flatlaf.testing.FlatTestFrame; import com.jgoodies.forms.layout.*; -import com.jidesoft.plaf.LookAndFeelFactory; import com.jidesoft.popup.JidePopup; import com.jidesoft.swing.*; import net.miginfocom.swing.*; @@ -38,14 +37,7 @@ public class FlatJideOssTest public static void main( String[] args ) { SwingUtilities.invokeLater( () -> { FlatTestFrame frame = FlatTestFrame.create( args, "FlatJideOssTest" ); - LookAndFeelFactory.installJideExtension(); frame.showFrame( FlatJideOssTest::new ); - - UIManager.addPropertyChangeListener( e -> { - if( "lookAndFeel".equals( e.getPropertyName() ) ) { - LookAndFeelFactory.installJideExtension(); - } - } ); } ); } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java index a84c6c88..e2daf1d6 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/jideoss/FlatRangeSliderTest.java @@ -22,11 +22,9 @@ import javax.swing.JLabel; import javax.swing.JSlider; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; -import javax.swing.UIManager; import javax.swing.event.ChangeListener; import com.formdev.flatlaf.testing.FlatTestFrame; import com.formdev.flatlaf.testing.FlatTestPanel; -import com.jidesoft.plaf.LookAndFeelFactory; import com.jidesoft.swing.RangeSlider; import net.miginfocom.swing.MigLayout; @@ -37,14 +35,7 @@ public class FlatRangeSliderTest public static void main( String[] args ) { SwingUtilities.invokeLater( () -> { FlatTestFrame frame = FlatTestFrame.create( args, "FlatRangeSliderTest" ); - LookAndFeelFactory.installJideExtension(); frame.showFrame( FlatRangeSliderTest::new ); - - UIManager.addPropertyChangeListener( e -> { - if( "lookAndFeel".equals( e.getPropertyName() ) ) { - LookAndFeelFactory.installJideExtension(); - } - } ); } ); } From 88d2b8266e3766bd6f44a8a81f9939068f9db0ac Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 3 Jan 2021 11:59:44 +0100 Subject: [PATCH 109/178] README.md: reordered chapters --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a30dfef8..1e00315b 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,20 @@ Addons - [JIDE Common Layer](flatlaf-jide-oss) +Documentation +------------- + +For more information and documentation visit +[FlatLaf Home](https://www.formdev.com/flatlaf/) + + +Buzz +---- + +- [What others say about FlatLaf on Twitter](https://twitter.com/search?f=live&q=flatlaf) +- [FlatLaf announcement on Reddit](https://www.reddit.com/r/java/comments/dl0hu3/flatlaf_flat_look_and_feel/) + + Projects using FlatLaf ---------------------- @@ -112,14 +126,14 @@ Projects using FlatLaf [OFTP2](https://mendelson-e-c.com/oftp2) (commercial) - [MeteoInfo](https://github.com/meteoinfo/MeteoInfo) 2.2 - GIS and scientific computation environment for meteorological community -- [lsfusion platform](https://github.com/lsfusion/platform) - information +- [lsfusion platform](https://github.com/lsfusion/platform) 4 - information systems development platform - ![New](images/new.svg) [JPass](https://github.com/gaborbata/jpass) - password manager with strong encryption - [Jes - Die Java-EÜR](https://www.jes-eur.de) - [Mapton](https://mapton.org/) 2.0 - ([source code](https://github.com/trixon/mapton)) based on NetBeans platform - - some kind of map application + ([source code](https://github.com/trixon/mapton)) - some kind of map + application (based on NetBeans platform) - [Pseudo Assembler IDE](https://github.com/tomasz-herman/PseudoAssemblerIDE) - IDE for Pseudo-Assembler - ![New](images/new.svg) [Linotte](https://github.com/cpc6128/LangageLinotte) @@ -147,17 +161,3 @@ Projects using FlatLaf [Android Tool](https://github.com/fast-geek/Android-Tool) - makes popular adb and fastboot commands easier to use - and more... - - -Buzz ----- - -- [What others say about FlatLaf on Twitter](https://twitter.com/search?f=live&q=flatlaf) -- [FlatLaf announcement on Reddit](https://www.reddit.com/r/java/comments/dl0hu3/flatlaf_flat_look_and_feel/) - - -Documentation -------------- - -For more information and documentation visit -[FlatLaf Home](https://www.formdev.com/flatlaf/) From be18317a6d961efaa4e82d3169ba9889aefb6ee7 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 5 Jan 2021 11:48:50 +0100 Subject: [PATCH 110/178] moved flatlaf-extras/pom.xml (for GitHub dependency graph) to another folder to check whether GitHub recognizes it there --- .../dependency-graph/flatlaf-extras => flatlaf-extras}/pom.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.github/dependency-graph/flatlaf-extras => flatlaf-extras}/pom.xml (100%) diff --git a/.github/dependency-graph/flatlaf-extras/pom.xml b/flatlaf-extras/pom.xml similarity index 100% rename from .github/dependency-graph/flatlaf-extras/pom.xml rename to flatlaf-extras/pom.xml From 1c8ba0c538e4a474f752384ff4d4d47cfdc47050 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 5 Jan 2021 11:58:02 +0100 Subject: [PATCH 111/178] added dummy root pom.xml for GitHub dependency graph --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..61158839 --- /dev/null +++ b/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + com.formdev + flatlaf-parent + pom + 0.46 + + flatlaf-extras + + From b5954102b62d980a5f73d9b9fe7eba7e15c5092b Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 5 Jan 2021 15:09:52 +0100 Subject: [PATCH 112/178] README.md: added maven-central badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1e00315b..a4a43679 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Maven Central](https://img.shields.io/maven-central/v/com.formdev/flatlaf.svg)](https://search.maven.org/artifact/com.formdev/flatlaf/) + FlatLaf - Flat Look and Feel ============================ From 1315d847b997b594db984ccf1916a7886ba7734e Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 7 Jan 2021 14:09:55 +0100 Subject: [PATCH 113/178] removed dummy pom.xml for GitHub dependency graph --- .github/dependency-graph/flatlaf-core/pom.xml | 10 ---------- README.md | 2 -- flatlaf-extras/pom.xml | 10 ---------- pom.xml | 14 -------------- 4 files changed, 36 deletions(-) delete mode 100644 .github/dependency-graph/flatlaf-core/pom.xml delete mode 100644 flatlaf-extras/pom.xml delete mode 100644 pom.xml diff --git a/.github/dependency-graph/flatlaf-core/pom.xml b/.github/dependency-graph/flatlaf-core/pom.xml deleted file mode 100644 index bbc2df4a..00000000 --- a/.github/dependency-graph/flatlaf-core/pom.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 4.0.0 - - com.formdev - flatlaf - 1.0-SNAPSHOT - diff --git a/README.md b/README.md index a4a43679..1e00315b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.formdev/flatlaf.svg)](https://search.maven.org/artifact/com.formdev/flatlaf/) - FlatLaf - Flat Look and Feel ============================ diff --git a/flatlaf-extras/pom.xml b/flatlaf-extras/pom.xml deleted file mode 100644 index 0e992fb4..00000000 --- a/flatlaf-extras/pom.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 4.0.0 - - com.formdev - flatlaf-extras - 0.46 - diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 61158839..00000000 --- a/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - com.formdev - flatlaf-parent - pom - 0.46 - - flatlaf-extras - - From 2fe1b9e72605ac42e054242dfa77b6860e02b78c Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 8 Jan 2021 11:20:55 +0100 Subject: [PATCH 114/178] ScrollPane: smooth scrolling: - scroll at least one pixel to avoid "hanging" - limit scroll increment to visible width/height - no longer use block increment because had width/height of view (IOW was too large and had no effect) (issue #27) --- .../formdev/flatlaf/ui/FlatScrollPaneUI.java | 76 +++++++++---------- 1 file changed, 36 insertions(+), 40 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java index 13c3ea8c..9c10726f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java @@ -14,12 +14,6 @@ * limitations under the License. */ -/* - * Smooth scrolling code partly based on code from IntelliJ IDEA Community Edition, - * which is licensed under the Apache 2.0 license. Copyright 2000-2016 JetBrains s.r.o. - * See: https://github.com/JetBrains/intellij-community/blob/31e1b5a8e43219b9571951bab6457cfb3012e3ef/platform/platform-api/src/com/intellij/ui/components/SmoothScrollPane.java#L141-L185 - * - */ package com.formdev.flatlaf.ui; import java.awt.Component; @@ -138,8 +132,6 @@ public class FlatScrollPaneUI return UIManager.getBoolean( "ScrollPane.smoothScrolling" ); } - private static final double EPSILON = 1e-5d; - private void mouseWheelMovedSmooth( MouseWheelEvent e ) { // return if there is no viewport JViewport viewport = scrollpane.getViewport(); @@ -160,24 +152,22 @@ public class FlatScrollPaneUI // get precise wheel rotation double rotation = e.getPreciseWheelRotation(); - // get unit and block increment + // get unit increment int unitIncrement; - int blockIncrement; int orientation = scrollbar.getOrientation(); Component view = viewport.getView(); if( view instanceof Scrollable ) { Scrollable scrollable = (Scrollable) view; - // Use (0, 0) view position to obtain constant unit increment of first item - // (which might otherwise be variable on smaller-than-unit scrolling). + // Use (0, 0) view position to obtain a constant unit increment of first item. + // Unit increment may be different for each item. Rectangle visibleRect = new Rectangle( viewport.getViewSize() ); unitIncrement = scrollable.getScrollableUnitIncrement( visibleRect, orientation, 1 ); - blockIncrement = scrollable.getScrollableBlockIncrement( visibleRect, orientation, 1 ); if( unitIncrement > 0 ) { // For the case that the first item (e.g. in a list) is larger - // than the other items, get the unit increment of the second item - // and use the smaller one. + // than the other items (e.g. themes list in FlatLaf Demo), + // get the unit increment of the second item and use the smaller one. if( orientation == SwingConstants.VERTICAL ) { visibleRect.y += unitIncrement; visibleRect.height -= unitIncrement; @@ -192,52 +182,58 @@ public class FlatScrollPaneUI } else { int direction = rotation < 0 ? -1 : 1; unitIncrement = scrollbar.getUnitIncrement( direction ); - blockIncrement = scrollbar.getBlockIncrement( direction ); } - // limit scroll amount (number of units to scroll) for small viewports - // (e.g. vertical scrolling in file chooser) - int scrollAmount = e.getScrollAmount(); + // get viewport width/height (the visible width/height) int viewportWH = (orientation == SwingConstants.VERTICAL) ? viewport.getHeight() : viewport.getWidth(); - if( unitIncrement * scrollAmount > viewportWH ) - scrollAmount = Math.max( viewportWH / unitIncrement, 1 ); + + // limit scroll increment to viewport width/height + // - if scroll amount is set to a large value in OS settings + // - for large unit increments in small viewports (e.g. horizontal scrolling in file chooser) + int scrollIncrement = Math.min( unitIncrement * e.getScrollAmount(), viewportWH ); // compute relative delta - double delta = rotation * scrollAmount * unitIncrement; - boolean adjustDelta = Math.abs( rotation ) < (1.0 + EPSILON); - double adjustedDelta = adjustDelta - ? Math.max( -blockIncrement, Math.min( delta, blockIncrement ) ) - : delta; + double delta = rotation * scrollIncrement; + int idelta = (int) Math.round( delta ); + + // scroll at least one pixel to avoid "hanging" + // - for "super-low-speed" scrolling (move fingers very slowly on trackpad) + // - if unit increment is very small (e.g. 1 if scroll view does not implement + // javax.swing.Scrollable interface) + if( idelta == 0 ) { + if( rotation > 0 ) + idelta = 1; + else if( rotation < 0 ) + idelta = -1; + } // compute new value int value = scrollbar.getValue(); - double minDelta = scrollbar.getMinimum() - value; - double maxDelta = scrollbar.getMaximum() - scrollbar.getModel().getExtent() - value; - double boundedDelta = Math.max( minDelta, Math.min( adjustedDelta, maxDelta ) ); - int newValue = value + (int) Math.round( boundedDelta ); + int minValue = scrollbar.getMinimum(); + int maxValue = scrollbar.getMaximum() - scrollbar.getModel().getExtent(); + int newValue = Math.max( minValue, Math.min( value + idelta, maxValue ) ); // set new value if( newValue != value ) scrollbar.setValue( newValue ); /*debug - System.out.println( String.format( "%4d %9f / %4d %4d / %12f %5s %12f / %4d %4d %4d / %12f %12f %12f / %4d", + System.out.println( String.format( "%s %4d %9f / %3d * %d = %3d [%3d] / %8.2f %5d / %4d --> %4d [%d, %d]", + (orientation == SwingConstants.VERTICAL) ? "V" : "H", e.getWheelRotation(), e.getPreciseWheelRotation(), unitIncrement, - blockIncrement, + e.getScrollAmount(), + scrollIncrement, + viewportWH, delta, - adjustDelta, - adjustedDelta, + idelta, value, - scrollbar.getMinimum(), - scrollbar.getMaximum(), - minDelta, - maxDelta, - boundedDelta, - newValue ) ); + newValue, + minValue, + maxValue ) ); */ } From 64d850c583803659e24b400c750248cdce8aa64e Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 8 Jan 2021 11:47:48 +0100 Subject: [PATCH 115/178] build.gradle.kts: added more information to pom --- buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts b/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts index dee9ff6a..59d69d73 100644 --- a/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts @@ -63,8 +63,14 @@ publishing { } scm { + connection.set( "scm:git:git://github.com/JFormDesigner/FlatLaf.git" ) url.set( "https://github.com/JFormDesigner/FlatLaf" ) } + + issueManagement { + system.set( "GitHub" ) + url.set( "https://github.com/JFormDesigner/FlatLaf/issues" ) + } } } } From e3cac95d37a3a634fec1eb4c969f4522d6394be3 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 8 Jan 2021 18:03:09 +0100 Subject: [PATCH 116/178] UI defaults: - moved some common properties from FlatLightLaf.properties and FlatDarkLaf.properties to FlatLaf.properties - use color functions for more properties --- .../formdev/flatlaf/FlatDarkLaf.properties | 18 ++++++++------- .../com/formdev/flatlaf/FlatLaf.properties | 22 +++++++++++-------- .../formdev/flatlaf/FlatLightLaf.properties | 18 ++++++++------- .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 2 +- .../flatlaf/testing/FlatTestLaf.properties | 10 +++++---- 5 files changed, 40 insertions(+), 30 deletions(-) diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index bdd60937..f405154e 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -36,6 +36,12 @@ @cellFocusColor = #000 @icon = #adadad +# for buttons within components (e.g. combobox or spinner) +@buttonArrowColor = #9A9DA1 +@buttonDisabledArrowColor = darken(@buttonArrowColor,25%) +@buttonHoverArrowColor = lighten(@buttonArrowColor,10%,derived noAutoInverse) +@buttonPressedArrowColor = lighten(@buttonArrowColor,20%,derived noAutoInverse) + # Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors) @dropCellBackground = darken(List.selectionBackground,10%,lazy) @dropCellForeground = lazy(List.selectionForeground) @@ -62,8 +68,8 @@ Button.selectedForeground = @foreground Button.disabledSelectedBackground = lighten($Button.background,3%,derived) Button.borderColor = #5e6060 -Button.disabledBorderColor = #5e6060 -Button.focusedBorderColor = #466d94 +Button.disabledBorderColor = $Button.borderColor +Button.focusedBorderColor = $Component.focusedBorderColor Button.hoverBorderColor = $Button.focusedBorderColor Button.default.background = #365880 @@ -119,11 +125,7 @@ CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled]. #---- ComboBox ---- -ComboBox.buttonEditableBackground = #404445 -ComboBox.buttonArrowColor = #9A9DA1 -ComboBox.buttonDisabledArrowColor = darken($ComboBox.buttonArrowColor,25%) -ComboBox.buttonHoverArrowColor = lighten($ComboBox.buttonArrowColor,10%,derived noAutoInverse) -ComboBox.buttonPressedArrowColor = lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) +ComboBox.buttonEditableBackground = darken($ComboBox.background,2%) #---- Component ---- @@ -307,4 +309,4 @@ ToolTip.background = #1e2123 #---- Tree ---- -Tree.hash = #505355 +Tree.hash = lighten($Tree.background,5%) 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 f0076a87..c8a34016 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -203,6 +203,10 @@ ComboBox.maximumRowCount = 15 ComboBox.buttonStyle = auto ComboBox.background = @textComponentBackground ComboBox.buttonBackground = @textComponentBackground +ComboBox.buttonArrowColor = @buttonArrowColor +ComboBox.buttonDisabledArrowColor = @buttonDisabledArrowColor +ComboBox.buttonHoverArrowColor = @buttonHoverArrowColor +ComboBox.buttonPressedArrowColor = @buttonPressedArrowColor #---- Component ---- @@ -474,8 +478,8 @@ ScrollBar.hoverThumbWithTrack = false ScrollBar.pressedThumbWithTrack = false ScrollBar.showButtons = false ScrollBar.squareButtons = false -ScrollBar.buttonArrowColor = $ComboBox.buttonArrowColor -ScrollBar.buttonDisabledArrowColor = $ComboBox.buttonDisabledArrowColor +ScrollBar.buttonArrowColor = @buttonArrowColor +ScrollBar.buttonDisabledArrowColor = @buttonDisabledArrowColor ScrollBar.allowsAbsolutePositioning = true [mac]ScrollBar.minimumThumbSize = 18,18 @@ -516,10 +520,10 @@ Slider.focusWidth = 4 Spinner.border = com.formdev.flatlaf.ui.FlatRoundBorder Spinner.background = @textComponentBackground Spinner.buttonBackground = $ComboBox.buttonEditableBackground -Spinner.buttonArrowColor = $ComboBox.buttonArrowColor -Spinner.buttonDisabledArrowColor = $ComboBox.buttonDisabledArrowColor -Spinner.buttonHoverArrowColor = $ComboBox.buttonHoverArrowColor -Spinner.buttonPressedArrowColor = $ComboBox.buttonPressedArrowColor +Spinner.buttonArrowColor = @buttonArrowColor +Spinner.buttonDisabledArrowColor = @buttonDisabledArrowColor +Spinner.buttonHoverArrowColor = @buttonHoverArrowColor +Spinner.buttonPressedArrowColor = @buttonPressedArrowColor Spinner.padding = @textComponentMargin Spinner.editorBorderPainted = false # allowed values: button or none @@ -536,9 +540,9 @@ SplitPane.oneTouchButtonSize = {scaledInteger}6 SplitPane.oneTouchButtonOffset = {scaledInteger}2 SplitPaneDivider.border = null -SplitPaneDivider.oneTouchArrowColor = $ComboBox.buttonArrowColor -SplitPaneDivider.oneTouchHoverArrowColor = $ComboBox.buttonHoverArrowColor -SplitPaneDivider.oneTouchPressedArrowColor = $ComboBox.buttonPressedArrowColor +SplitPaneDivider.oneTouchArrowColor = @buttonArrowColor +SplitPaneDivider.oneTouchHoverArrowColor = @buttonHoverArrowColor +SplitPaneDivider.oneTouchPressedArrowColor = @buttonPressedArrowColor # allowed values: grip or plain SplitPaneDivider.style = grip SplitPaneDivider.gripColor = @icon diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index a3892348..8a23f71d 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -36,6 +36,12 @@ @cellFocusColor = #000 @icon = #afafaf +# for buttons within components (e.g. combobox or spinner) +@buttonArrowColor = #666 +@buttonDisabledArrowColor = lighten(@buttonArrowColor,25%) +@buttonHoverArrowColor = lighten(@buttonArrowColor,20%,derived noAutoInverse) +@buttonPressedArrowColor = lighten(@buttonArrowColor,30%,derived noAutoInverse) + # Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors) @dropCellBackground = lighten(List.selectionBackground,10%,lazy) @dropCellForeground = lazy(List.selectionForeground) @@ -47,8 +53,8 @@ activeCaption = #99b4d1 inactiveCaption = #bfcddb -controlHighlight = #e3e3e3 -controlLtHighlight = #fff +controlHighlight = lighten($controlShadow,12%) +controlLtHighlight = lighten($controlShadow,25%) controlDkShadow = darken($controlShadow,15%) @@ -126,11 +132,7 @@ CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled]. #---- ComboBox ---- -ComboBox.buttonEditableBackground = #fafafa -ComboBox.buttonArrowColor = #666 -ComboBox.buttonDisabledArrowColor = lighten($ComboBox.buttonArrowColor,25%) -ComboBox.buttonHoverArrowColor = lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) -ComboBox.buttonPressedArrowColor = lighten($ComboBox.buttonArrowColor,30%,derived noAutoInverse) +ComboBox.buttonEditableBackground = darken($ComboBox.background,2%) #---- Component ---- @@ -319,4 +321,4 @@ ToolTip.background = #fafafa #---- Tree ---- -Tree.hash = #E6E6E6 +Tree.hash = darken($Tree.background,10%) diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 96f8175b..c08e7ccb 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -1246,7 +1246,7 @@ Tree.editorBorder [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI] Tree.font [active] $defaultFont [UI] Tree.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] -Tree.hash #505355 javax.swing.plaf.ColorUIResource [UI] +Tree.hash #515657 javax.swing.plaf.ColorUIResource [UI] Tree.icon.closedColor #adadad javax.swing.plaf.ColorUIResource [UI] Tree.icon.collapsedColor #adadad javax.swing.plaf.ColorUIResource [UI] Tree.icon.expandedColor #adadad javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index cf0c38a8..fef4f47f 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -32,6 +32,12 @@ @cellFocusColor = #f00 @icon = #afafaf +# for buttons within components (e.g. combobox or spinner) +@buttonArrowColor = #666 +@buttonDisabledArrowColor = #ABABAB +@buttonHoverArrowColor = #f00 +@buttonPressedArrowColor = #00f + @dropCellBackground = #f00 @dropCellForeground = #0f0 @dropLineColor = #00f @@ -118,10 +124,6 @@ CheckBox.icon.pressedBackground = #FFC800 ComboBox.background = #fff ComboBox.buttonBackground = #f0f0f0 ComboBox.buttonEditableBackground = #ccc -ComboBox.buttonArrowColor = #666 -ComboBox.buttonDisabledArrowColor = #ABABAB -ComboBox.buttonHoverArrowColor = #f00 -ComboBox.buttonPressedArrowColor = #00f #---- Component ---- From 00b4e0a6fd3900595757b9d573c87f6d74115149 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 9 Jan 2021 00:38:46 +0100 Subject: [PATCH 117/178] UI defaults inspector: support embedding into any window --- CHANGELOG.md | 2 + .../extras/FlatUIDefaultsInspector.java | 273 ++++++++++-------- .../extras/FlatUIDefaultsInspector.jfd | 138 ++++----- .../flatlaf/testing/FlatTestFrame.java | 43 ++- .../formdev/flatlaf/testing/FlatTestFrame.jfd | 22 +- 5 files changed, 263 insertions(+), 215 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad19ce2b..43aeca58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ FlatLaf Change Log buttons. - TextComponent: Clip placeholder text if it does not fit into visible area. (PR #229) +- Extras: Support embedding UI defaults inspector into any window (see + `FlatUIDefaultsInspector.createInspectorPanel()`. #### Fixed bugs diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java index 3eee4ee6..5a628fdf 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java @@ -66,9 +66,8 @@ public class FlatUIDefaultsInspector { private static final int KEY_MODIFIERS_MASK = InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.META_DOWN_MASK; - private static FlatUIDefaultsInspector inspector; + private static JFrame inspectorFrame; - private final String title; private final PropertyChangeListener lafListener = this::lafChanged; private final PropertyChangeListener lafDefaultsListener = this::lafDefaultsChanged; private boolean refreshPending; @@ -92,27 +91,31 @@ public class FlatUIDefaultsInspector } public static void show() { - if( inspector != null ) { - inspector.ensureOnScreen(); - inspector.frame.toFront(); + if( inspectorFrame != null ) { + ensureOnScreen( inspectorFrame ); + inspectorFrame.toFront(); return; } - inspector = new FlatUIDefaultsInspector(); - inspector.frame.setVisible( true ); + inspectorFrame = new FlatUIDefaultsInspector().createFrame(); + inspectorFrame.setVisible( true ); } public static void hide() { - if( inspector != null ) - inspector.frame.dispose(); + if( inspectorFrame != null ) + inspectorFrame.dispose(); + } + + /** + * Creates a UI defaults inspector panel that can be embedded into any window. + */ + public static JComponent createInspectorPanel() { + return new FlatUIDefaultsInspector().panel; } private FlatUIDefaultsInspector() { initComponents(); - title = frame.getTitle(); - updateWindowTitle(); - panel.setBorder( new ScaledEmptyBorder( 10, 10, 10, 10 ) ); filterPanel.setBorder( new ScaledEmptyBorder( 0, 0, 10, 0 ) ); @@ -143,24 +146,21 @@ public class FlatUIDefaultsInspector table.getRowSorter().setSortKeys( Collections.singletonList( new RowSorter.SortKey( 0, SortOrder.ASCENDING ) ) ); - // restore window bounds - Preferences prefs = getPrefs(); - int x = prefs.getInt( "x", -1 ); - int y = prefs.getInt( "y", -1 ); - int width = prefs.getInt( "width", UIScale.scale( 600 ) ); - int height = prefs.getInt( "height", UIScale.scale( 800 ) ); - frame.setSize( width, height ); - if( x != -1 && y != -1 ) { - frame.setLocation( x, y ); - ensureOnScreen(); - } else - frame.setLocationRelativeTo( null ); - // restore column widths + Preferences prefs = getPrefs(); TableColumnModel columnModel = table.getColumnModel(); columnModel.getColumn( 0 ).setPreferredWidth( prefs.getInt( "column1width", 100 ) ); columnModel.getColumn( 1 ).setPreferredWidth( prefs.getInt( "column2width", 100 ) ); + PropertyChangeListener columnWidthListener = e -> { + if( "width".equals( e.getPropertyName() ) ) { + prefs.putInt( "column1width", columnModel.getColumn( 0 ).getWidth() ); + prefs.putInt( "column2width", columnModel.getColumn( 1 ).getWidth() ); + } + }; + columnModel.getColumn( 0 ).addPropertyChangeListener( columnWidthListener ); + columnModel.getColumn( 1 ).addPropertyChangeListener( columnWidthListener ); + // restore filter String filter = prefs.get( "filter", "" ); String valueType = prefs.get( "valueType", null ); @@ -169,20 +169,66 @@ public class FlatUIDefaultsInspector if( valueType != null ) valueTypeField.setSelectedItem( valueType ); - UIManager.addPropertyChangeListener( lafListener ); - UIManager.getDefaults().addPropertyChangeListener( lafDefaultsListener ); + panel.addPropertyChangeListener( "ancestor", e -> { + if( e.getNewValue() != null ) { + UIManager.addPropertyChangeListener( lafListener ); + UIManager.getDefaults().addPropertyChangeListener( lafDefaultsListener ); + } else { + UIManager.removePropertyChangeListener( lafListener ); + UIManager.getDefaults().removePropertyChangeListener( lafDefaultsListener ); + } + } ); // register F5 key to refresh - ((JComponent)frame.getContentPane()).registerKeyboardAction( + panel.registerKeyboardAction( e -> refresh(), KeyStroke.getKeyStroke( KeyEvent.VK_F5, 0, false ), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + } + + private JFrame createFrame() { + JFrame frame = new JFrame(); + frame.setTitle( "UI Defaults Inspector" ); + frame.setDefaultCloseOperation( WindowConstants.DISPOSE_ON_CLOSE ); + frame.addWindowListener( new WindowAdapter() { + @Override + public void windowClosed( WindowEvent e ) { + inspectorFrame = null; + } + @Override + public void windowClosing( WindowEvent e ) { + saveWindowBounds( frame ); + } + @Override + public void windowDeactivated( WindowEvent e ) { + saveWindowBounds( frame ); + } + } ); + + updateWindowTitle( frame ); + + frame.getContentPane().add( panel, BorderLayout.CENTER ); + + // restore window bounds + Preferences prefs = getPrefs(); + int x = prefs.getInt( "x", -1 ); + int y = prefs.getInt( "y", -1 ); + int width = prefs.getInt( "width", UIScale.scale( 600 ) ); + int height = prefs.getInt( "height", UIScale.scale( 800 ) ); + frame.setSize( width, height ); + if( x != -1 && y != -1 ) { + frame.setLocation( x, y ); + ensureOnScreen( frame ); + } else + frame.setLocationRelativeTo( null ); // register ESC key to close frame ((JComponent)frame.getContentPane()).registerKeyboardAction( e -> frame.dispose(), KeyStroke.getKeyStroke( KeyEvent.VK_ESCAPE, 0, false ), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); + + return frame; } private void delegateKey( int keyCode, String actionKey ) { @@ -202,7 +248,7 @@ public class FlatUIDefaultsInspector } ); } - private void ensureOnScreen() { + private static void ensureOnScreen( JFrame frame ) { Rectangle frameBounds = frame.getBounds(); boolean onScreen = false; for( GraphicsDevice screen : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices() ) { @@ -219,12 +265,12 @@ public class FlatUIDefaultsInspector frame.setLocationRelativeTo( null ); } - void lafChanged( PropertyChangeEvent e ) { + private void lafChanged( PropertyChangeEvent e ) { if( "lookAndFeel".equals( e.getPropertyName() ) ) refresh(); } - void lafDefaultsChanged( PropertyChangeEvent e ) { + private void lafDefaultsChanged( PropertyChangeEvent e ) { if( refreshPending ) return; @@ -235,11 +281,13 @@ public class FlatUIDefaultsInspector } ); } - void refresh() { + private void refresh() { ItemsTableModel model = (ItemsTableModel) table.getModel(); model.setItems( getUIDefaultsItems() ); - updateWindowTitle(); + JFrame frame = (JFrame) SwingUtilities.getAncestorOfClass( JFrame.class, panel ); + if( frame != null ) + updateWindowTitle( frame ); } private Item[] getUIDefaultsItems() { @@ -277,33 +325,27 @@ public class FlatUIDefaultsInspector return items.toArray( new Item[items.size()] ); } - private void updateWindowTitle() { - frame.setTitle( title + " - " + UIManager.getLookAndFeel().getName() ); + private void updateWindowTitle( JFrame frame ) { + String title = frame.getTitle(); + String sep = " - "; + int sepIndex = title.indexOf( sep ); + if( sepIndex >= 0 ) + title = title.substring( 0, sepIndex ); + frame.setTitle( title + sep + UIManager.getLookAndFeel().getName() ); } - private void saveWindowBounds() { + private void saveWindowBounds( JFrame frame ) { Preferences prefs = getPrefs(); prefs.putInt( "x", frame.getX() ); prefs.putInt( "y", frame.getY() ); prefs.putInt( "width", frame.getWidth() ); prefs.putInt( "height", frame.getHeight() ); - - TableColumnModel columnModel = table.getColumnModel(); - prefs.putInt( "column1width", columnModel.getColumn( 0 ).getWidth() ); - prefs.putInt( "column2width", columnModel.getColumn( 1 ).getWidth() ); } private Preferences getPrefs() { return Preferences.userRoot().node( "flatlaf-uidefaults-inspector" ); } - private void windowClosed() { - UIManager.removePropertyChangeListener( lafListener ); - UIManager.getDefaults().removePropertyChangeListener( lafDefaultsListener ); - - inspector = null; - } - private void filterChanged() { String filter = filterField.getText().trim(); String valueType = (String) valueTypeField.getSelectedItem(); @@ -360,7 +402,6 @@ public class FlatUIDefaultsInspector private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents - frame = new JFrame(); panel = new JPanel(); filterPanel = new JPanel(); flterLabel = new JLabel(); @@ -370,99 +411,75 @@ public class FlatUIDefaultsInspector scrollPane = new JScrollPane(); table = new JTable(); - //======== frame ======== + //======== panel ======== { - frame.setTitle("UI Defaults Inspector"); - frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - frame.addWindowListener(new WindowAdapter() { - @Override - public void windowClosed(WindowEvent e) { - FlatUIDefaultsInspector.this.windowClosed(); - } - @Override - public void windowClosing(WindowEvent e) { - saveWindowBounds(); - } - @Override - public void windowDeactivated(WindowEvent e) { - saveWindowBounds(); - } - }); - Container frameContentPane = frame.getContentPane(); - frameContentPane.setLayout(new BorderLayout()); + panel.setLayout(new BorderLayout()); - //======== panel ======== + //======== filterPanel ======== { - panel.setLayout(new BorderLayout()); + filterPanel.setLayout(new GridBagLayout()); + ((GridBagLayout)filterPanel.getLayout()).columnWidths = new int[] {0, 0, 0, 0, 0}; + ((GridBagLayout)filterPanel.getLayout()).rowHeights = new int[] {0, 0}; + ((GridBagLayout)filterPanel.getLayout()).columnWeights = new double[] {0.0, 1.0, 0.0, 0.0, 1.0E-4}; + ((GridBagLayout)filterPanel.getLayout()).rowWeights = new double[] {0.0, 1.0E-4}; - //======== filterPanel ======== - { - filterPanel.setLayout(new GridBagLayout()); - ((GridBagLayout)filterPanel.getLayout()).columnWidths = new int[] {0, 0, 0, 0, 0}; - ((GridBagLayout)filterPanel.getLayout()).rowHeights = new int[] {0, 0}; - ((GridBagLayout)filterPanel.getLayout()).columnWeights = new double[] {0.0, 1.0, 0.0, 0.0, 1.0E-4}; - ((GridBagLayout)filterPanel.getLayout()).rowWeights = new double[] {0.0, 1.0E-4}; + //---- flterLabel ---- + flterLabel.setText("Filter:"); + flterLabel.setLabelFor(filterField); + flterLabel.setDisplayedMnemonic('F'); + filterPanel.add(flterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, + GridBagConstraints.CENTER, GridBagConstraints.BOTH, + new Insets(0, 0, 0, 10), 0, 0)); - //---- flterLabel ---- - flterLabel.setText("Filter:"); - flterLabel.setLabelFor(filterField); - flterLabel.setDisplayedMnemonic('F'); - filterPanel.add(flterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, - GridBagConstraints.CENTER, GridBagConstraints.BOTH, - new Insets(0, 0, 0, 10), 0, 0)); + //---- filterField ---- + filterField.putClientProperty("JTextField.placeholderText", "enter one or more filter strings, separated by space characters"); + filterPanel.add(filterField, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, + GridBagConstraints.CENTER, GridBagConstraints.BOTH, + new Insets(0, 0, 0, 10), 0, 0)); - //---- filterField ---- - filterField.putClientProperty("JTextField.placeholderText", "enter one or more filter strings, separated by space characters"); - filterPanel.add(filterField, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, - GridBagConstraints.CENTER, GridBagConstraints.BOTH, - new Insets(0, 0, 0, 10), 0, 0)); + //---- valueTypeLabel ---- + valueTypeLabel.setText("Value Type:"); + valueTypeLabel.setLabelFor(valueTypeField); + valueTypeLabel.setDisplayedMnemonic('T'); + filterPanel.add(valueTypeLabel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, + GridBagConstraints.CENTER, GridBagConstraints.BOTH, + new Insets(0, 0, 0, 10), 0, 0)); - //---- valueTypeLabel ---- - valueTypeLabel.setText("Value Type:"); - valueTypeLabel.setLabelFor(valueTypeField); - valueTypeLabel.setDisplayedMnemonic('T'); - filterPanel.add(valueTypeLabel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, - GridBagConstraints.CENTER, GridBagConstraints.BOTH, - new Insets(0, 0, 0, 10), 0, 0)); - - //---- valueTypeField ---- - valueTypeField.setModel(new DefaultComboBoxModel<>(new String[] { - "(any)", - "Boolean", - "Border", - "Color", - "Dimension", - "Float", - "Font", - "Icon", - "Insets", - "Integer", - "String", - "(other)" - })); - valueTypeField.addActionListener(e -> filterChanged()); - filterPanel.add(valueTypeField, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, - GridBagConstraints.CENTER, GridBagConstraints.BOTH, - new Insets(0, 0, 0, 0), 0, 0)); - } - panel.add(filterPanel, BorderLayout.NORTH); - - //======== scrollPane ======== - { - - //---- table ---- - table.setAutoCreateRowSorter(true); - scrollPane.setViewportView(table); - } - panel.add(scrollPane, BorderLayout.CENTER); + //---- valueTypeField ---- + valueTypeField.setModel(new DefaultComboBoxModel<>(new String[] { + "(any)", + "Boolean", + "Border", + "Color", + "Dimension", + "Float", + "Font", + "Icon", + "Insets", + "Integer", + "String", + "(other)" + })); + valueTypeField.addActionListener(e -> filterChanged()); + filterPanel.add(valueTypeField, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, + GridBagConstraints.CENTER, GridBagConstraints.BOTH, + new Insets(0, 0, 0, 0), 0, 0)); } - frameContentPane.add(panel, BorderLayout.CENTER); + panel.add(filterPanel, BorderLayout.NORTH); + + //======== scrollPane ======== + { + + //---- table ---- + table.setAutoCreateRowSorter(true); + scrollPane.setViewportView(table); + } + panel.add(scrollPane, BorderLayout.CENTER); } // JFormDesigner - End of component initialization //GEN-END:initComponents } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables - private JFrame frame; private JPanel panel; private JPanel filterPanel; private JLabel flterLabel; diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd index a563dd73..9c90fb66 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd @@ -1,83 +1,71 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" root: new FormRoot { - add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class java.awt.BorderLayout ) ) { - name: "frame" - "title": "UI Defaults Inspector" - "defaultCloseOperation": 2 - "$sizePolicy": 2 - "$locationPolicy": 2 - addEvent( new FormEvent( "java.awt.event.WindowListener", "windowClosed", "windowClosed", false ) ) - addEvent( new FormEvent( "java.awt.event.WindowListener", "windowClosing", "saveWindowBounds", false ) ) - addEvent( new FormEvent( "java.awt.event.WindowListener", "windowDeactivated", "saveWindowBounds", false ) ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { - name: "panel" - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.GridBagLayout ) { - "$columnSpecs": "0, 0:1.0, 0, 0" - "$rowSpecs": "0" - "$hGap": 10 - "$vGap": 5 - "$alignLeft": true - "$alignTop": true - } ) { - name: "filterPanel" - add( new FormComponent( "javax.swing.JLabel" ) { - name: "flterLabel" - "text": "Filter:" - "labelFor": new FormReference( "filterField" ) - "displayedMnemonic": 70 - }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) ) - add( new FormComponent( "javax.swing.JTextField" ) { - name: "filterField" - "$client.JTextField.placeholderText": "enter one or more filter strings, separated by space characters" - }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { - "gridx": 1 - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "valueTypeLabel" - "text": "Value Type:" - "labelFor": new FormReference( "valueTypeField" ) - "displayedMnemonic": 84 - }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { - "gridx": 2 - } ) - add( new FormComponent( "javax.swing.JComboBox" ) { - name: "valueTypeField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "(any)" - addElement( "(any)" ) - addElement( "Boolean" ) - addElement( "Border" ) - addElement( "Color" ) - addElement( "Dimension" ) - addElement( "Float" ) - addElement( "Font" ) - addElement( "Icon" ) - addElement( "Insets" ) - addElement( "Integer" ) - addElement( "String" ) - addElement( "(other)" ) - } - auxiliary() { - "JavaCodeGenerator.typeParameters": "String" - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "filterChanged", false ) ) - }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { - "gridx": 3 - } ) - }, new FormLayoutConstraints( class java.lang.String ) { - "value": "North" + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { + name: "panel" + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.GridBagLayout ) { + "$columnSpecs": "0, 0:1.0, 0, 0" + "$rowSpecs": "0" + "$hGap": 10 + "$vGap": 5 + "$alignLeft": true + "$alignTop": true + } ) { + name: "filterPanel" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "flterLabel" + "text": "Filter:" + "labelFor": new FormReference( "filterField" ) + "displayedMnemonic": 70 + }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "filterField" + "$client.JTextField.placeholderText": "enter one or more filter strings, separated by space characters" + }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { + "gridx": 1 } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane" - add( new FormComponent( "javax.swing.JTable" ) { - name: "table" - "autoCreateRowSorter": true - } ) - }, new FormLayoutConstraints( class java.lang.String ) { - "value": "Center" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "valueTypeLabel" + "text": "Value Type:" + "labelFor": new FormReference( "valueTypeField" ) + "displayedMnemonic": 84 + }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { + "gridx": 2 + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "valueTypeField" + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "(any)" + addElement( "(any)" ) + addElement( "Boolean" ) + addElement( "Border" ) + addElement( "Color" ) + addElement( "Dimension" ) + addElement( "Float" ) + addElement( "Font" ) + addElement( "Icon" ) + addElement( "Insets" ) + addElement( "Integer" ) + addElement( "String" ) + addElement( "(other)" ) + } + auxiliary() { + "JavaCodeGenerator.typeParameters": "String" + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "filterChanged", false ) ) + }, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { + "gridx": 3 + } ) + }, new FormLayoutConstraints( class java.lang.String ) { + "value": "North" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane" + add( new FormComponent( "javax.swing.JTable" ) { + name: "table" + "autoCreateRowSorter": true } ) }, new FormLayoutConstraints( class java.lang.String ) { "value": "Center" diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index 1d197994..fff7b226 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -27,6 +27,7 @@ import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.Supplier; import javax.swing.*; +import javax.swing.FocusManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.metal.MetalLookAndFeel; @@ -504,6 +505,29 @@ public class FlatTestFrame inspector.setEnabled( inspectCheckBox.isSelected() ); } + private void uiDefaultsInspectorChanged() { + getContentPane().removeAll(); + + FocusManager focusManager = FocusManager.getCurrentManager(); + Component focusOwner = focusManager.getFocusOwner(); + + if( uiDefaultsInspectorCheckBox.isSelected() ) { + JComponent uiDefaultsInspector = FlatUIDefaultsInspector.createInspectorPanel(); + + JSplitPane splitPane = new JSplitPane(); + splitPane.setLeftComponent( dialogPane ); + splitPane.setRightComponent( uiDefaultsInspector ); + getContentPane().add( splitPane, BorderLayout.CENTER ); + } else + getContentPane().add( dialogPane, BorderLayout.CENTER ); + + if( focusOwner != null && focusOwner.isDisplayable() ) + focusOwner.requestFocusInWindow(); + + pack(); + setLocationRelativeTo( null ); + } + private void scaleFactorChanged() { String scaleFactor = (String) scaleFactorComboBox.getSelectedItem(); if( "default".equals( scaleFactor ) ) @@ -662,6 +686,7 @@ public class FlatTestFrame rightToLeftCheckBox = new JCheckBox(); enabledCheckBox = new JCheckBox(); inspectCheckBox = new JCheckBox(); + uiDefaultsInspectorCheckBox = new JCheckBox(); explicitColorsCheckBox = new JCheckBox(); backgroundCheckBox = new JCheckBox(); opaqueTriStateCheckBox = new FlatTriStateCheckBox(); @@ -704,6 +729,7 @@ public class FlatTestFrame "[fill]" + "[fill]" + "[fill]" + + "[fill]" + "[grow,fill]" + "[button,fill]", // rows @@ -757,23 +783,29 @@ public class FlatTestFrame inspectCheckBox.addActionListener(e -> inspectChanged()); buttonBar.add(inspectCheckBox, "cell 5 0"); + //---- uiDefaultsInspectorCheckBox ---- + uiDefaultsInspectorCheckBox.setText("UI defaults"); + uiDefaultsInspectorCheckBox.setMnemonic('U'); + uiDefaultsInspectorCheckBox.addActionListener(e -> uiDefaultsInspectorChanged()); + buttonBar.add(uiDefaultsInspectorCheckBox, "cell 6 0"); + //---- explicitColorsCheckBox ---- explicitColorsCheckBox.setText("explicit colors"); explicitColorsCheckBox.setMnemonic('X'); explicitColorsCheckBox.addActionListener(e -> explicitColorsChanged()); - buttonBar.add(explicitColorsCheckBox, "cell 6 0"); + buttonBar.add(explicitColorsCheckBox, "cell 7 0"); //---- backgroundCheckBox ---- backgroundCheckBox.setText("background"); backgroundCheckBox.setMnemonic('B'); backgroundCheckBox.addActionListener(e -> backgroundChanged()); - buttonBar.add(backgroundCheckBox, "cell 7 0"); + buttonBar.add(backgroundCheckBox, "cell 8 0"); //---- opaqueTriStateCheckBox ---- opaqueTriStateCheckBox.setText("opaque"); opaqueTriStateCheckBox.setMnemonic('O'); opaqueTriStateCheckBox.addActionListener(e -> opaqueChanged()); - buttonBar.add(opaqueTriStateCheckBox, "cell 8 0"); + buttonBar.add(opaqueTriStateCheckBox, "cell 9 0"); //---- sizeVariantComboBox ---- sizeVariantComboBox.setModel(new DefaultComboBoxModel<>(new String[] { @@ -784,11 +816,11 @@ public class FlatTestFrame })); sizeVariantComboBox.setSelectedIndex(2); sizeVariantComboBox.addActionListener(e -> sizeVariantChanged()); - buttonBar.add(sizeVariantComboBox, "cell 9 0"); + buttonBar.add(sizeVariantComboBox, "cell 10 0"); //---- closeButton ---- closeButton.setText("Close"); - buttonBar.add(closeButton, "cell 11 0"); + buttonBar.add(closeButton, "cell 12 0"); } dialogPane.add(buttonBar, BorderLayout.SOUTH); dialogPane.add(themesPanel, BorderLayout.EAST); @@ -807,6 +839,7 @@ public class FlatTestFrame private JCheckBox rightToLeftCheckBox; private JCheckBox enabledCheckBox; private JCheckBox inspectCheckBox; + private JCheckBox uiDefaultsInspectorCheckBox; private JCheckBox explicitColorsCheckBox; private JCheckBox backgroundCheckBox; private FlatTriStateCheckBox opaqueTriStateCheckBox; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd index 03eb55b1..a74be2cc 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -21,7 +21,7 @@ new FormModel { } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets dialog" - "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][fill][fill][grow,fill][button,fill]" + "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][fill][fill][fill][grow,fill][button,fill]" "$rowSpecs": "[fill]" } ) { name: "buttonBar" @@ -91,13 +91,21 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 5 0" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "uiDefaultsInspectorCheckBox" + "text": "UI defaults" + "mnemonic": 85 + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "uiDefaultsInspectorChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 0" + } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "explicitColorsCheckBox" "text": "explicit colors" "mnemonic": 88 addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "explicitColorsChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 6 0" + "value": "cell 7 0" } ) add( new FormComponent( "javax.swing.JCheckBox" ) { name: "backgroundCheckBox" @@ -105,7 +113,7 @@ new FormModel { "mnemonic": 66 addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "backgroundChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 7 0" + "value": "cell 8 0" } ) add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) { name: "opaqueTriStateCheckBox" @@ -113,7 +121,7 @@ new FormModel { "mnemonic": 79 addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "opaqueChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 8 0" + "value": "cell 9 0" } ) add( new FormComponent( "javax.swing.JComboBox" ) { name: "sizeVariantComboBox" @@ -127,13 +135,13 @@ new FormModel { "selectedIndex": 2 addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sizeVariantChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 9 0" + "value": "cell 10 0" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "closeButton" "text": "Close" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 11 0" + "value": "cell 12 0" } ) }, new FormLayoutConstraints( class java.lang.String ) { "value": "South" From 9113c31612d99b422f2f84586347d6c482ccfd97 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 9 Jan 2021 11:13:17 +0100 Subject: [PATCH 118/178] UI defaults inspector: support copy key/value to clipboard --- CHANGELOG.md | 6 +- .../extras/FlatUIDefaultsInspector.java | 80 ++++++++++++++++++- .../extras/FlatUIDefaultsInspector.jfd | 22 +++++ 3 files changed, 105 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43aeca58..f8e57582 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,10 @@ FlatLaf Change Log buttons. - TextComponent: Clip placeholder text if it does not fit into visible area. (PR #229) -- Extras: Support embedding UI defaults inspector into any window (see - `FlatUIDefaultsInspector.createInspectorPanel()`. +- Extras: UI defaults inspector: + - Support embedding UI defaults inspector panel into any window. See + `FlatUIDefaultsInspector.createInspectorPanel()`. + - Copy selected keys and values into clipboard via context menu. #### Fixed bugs diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java index 5a628fdf..9849f805 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java @@ -17,6 +17,7 @@ package com.formdev.flatlaf.extras; import java.awt.*; +import java.awt.datatransfer.StringSelection; import java.awt.event.*; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -325,7 +326,7 @@ public class FlatUIDefaultsInspector return items.toArray( new Item[items.size()] ); } - private void updateWindowTitle( JFrame frame ) { + private static void updateWindowTitle( JFrame frame ) { String title = frame.getTitle(); String sep = " - "; int sepIndex = title.indexOf( sep ); @@ -400,6 +401,49 @@ public class FlatUIDefaultsInspector return "(other)"; } + private void tableMousePressed( MouseEvent e ) { + if( !SwingUtilities.isRightMouseButton( e ) ) + return; + + int row = table.rowAtPoint( e.getPoint() ); + if( row >= 0 && !table.isRowSelected( row ) ) + table.setRowSelectionInterval( row, row ); + } + + private void copyKey() { + copyToClipboard( 0 ); + } + + private void copyValue() { + copyToClipboard( 1 ); + } + + private void copyKeyAndValue() { + copyToClipboard( -1 ); + } + + private void copyToClipboard( int column ) { + int[] rows = table.getSelectedRows(); + if( rows.length == 0 ) + return; + + StringBuilder buf = new StringBuilder(); + for( int i = 0; i < rows.length; i++ ) { + if( i > 0 ) + buf.append( '\n' ); + + if( column < 0 || column == 0 ) + buf.append( table.getValueAt( rows[i], 0 ) ); + if( column < 0 ) + buf.append( " = " ); + if( column < 0 || column == 1 ) + buf.append( table.getValueAt( rows[i], 1 ) ); + } + + Toolkit.getDefaultToolkit().getSystemClipboard().setContents( + new StringSelection( buf.toString() ), null ); + } + private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents panel = new JPanel(); @@ -410,6 +454,10 @@ public class FlatUIDefaultsInspector valueTypeField = new JComboBox<>(); scrollPane = new JScrollPane(); table = new JTable(); + tablePopupMenu = new JPopupMenu(); + copyKeyMenuItem = new JMenuItem(); + copyValueMenuItem = new JMenuItem(); + copyKeyAndValueMenuItem = new JMenuItem(); //======== panel ======== { @@ -472,10 +520,36 @@ public class FlatUIDefaultsInspector //---- table ---- table.setAutoCreateRowSorter(true); + table.setComponentPopupMenu(tablePopupMenu); + table.addMouseListener(new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + tableMousePressed(e); + } + }); scrollPane.setViewportView(table); } panel.add(scrollPane, BorderLayout.CENTER); } + + //======== tablePopupMenu ======== + { + + //---- copyKeyMenuItem ---- + copyKeyMenuItem.setText("Copy Key"); + copyKeyMenuItem.addActionListener(e -> copyKey()); + tablePopupMenu.add(copyKeyMenuItem); + + //---- copyValueMenuItem ---- + copyValueMenuItem.setText("Copy Value"); + copyValueMenuItem.addActionListener(e -> copyValue()); + tablePopupMenu.add(copyValueMenuItem); + + //---- copyKeyAndValueMenuItem ---- + copyKeyAndValueMenuItem.setText("Copy Key and Value"); + copyKeyAndValueMenuItem.addActionListener(e -> copyKeyAndValue()); + tablePopupMenu.add(copyKeyAndValueMenuItem); + } // JFormDesigner - End of component initialization //GEN-END:initComponents } @@ -488,6 +562,10 @@ public class FlatUIDefaultsInspector private JComboBox valueTypeField; private JScrollPane scrollPane; private JTable table; + private JPopupMenu tablePopupMenu; + private JMenuItem copyKeyMenuItem; + private JMenuItem copyValueMenuItem; + private JMenuItem copyKeyAndValueMenuItem; // JFormDesigner - End of variables declaration //GEN-END:variables //---- class Item --------------------------------------------------------- diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd index 9c90fb66..731c5284 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.jfd @@ -66,6 +66,8 @@ new FormModel { add( new FormComponent( "javax.swing.JTable" ) { name: "table" "autoCreateRowSorter": true + "componentPopupMenu": new FormReference( "tablePopupMenu" ) + addEvent( new FormEvent( "java.awt.event.MouseListener", "mousePressed", "tableMousePressed", true ) ) } ) }, new FormLayoutConstraints( class java.lang.String ) { "value": "Center" @@ -74,5 +76,25 @@ new FormModel { "location": new java.awt.Point( 0, 0 ) "size": new java.awt.Dimension( 400, 300 ) } ) + add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) { + name: "tablePopupMenu" + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "copyKeyMenuItem" + "text": "Copy Key" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "copyKey", false ) ) + } ) + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "copyValueMenuItem" + "text": "Copy Value" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "copyValue", false ) ) + } ) + add( new FormComponent( "javax.swing.JMenuItem" ) { + name: "copyKeyAndValueMenuItem" + "text": "Copy Key and Value" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "copyKeyAndValue", false ) ) + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 370 ) + } ) } } From cf141f0e55b0a85c5c8563dbad1bcdf60ab949e8 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 9 Jan 2021 17:35:13 +0100 Subject: [PATCH 119/178] IntelliJ Themes: updated "Dracula" and "Gradianto" themes --- CHANGELOG.md | 2 + .../flatlaf/demo/intellijthemes/themes.json | 2 +- .../intellijthemes/themes/Dracula.theme.json | 188 +++++++++++------- .../themes/Gradianto_Nature_Green.theme.json | 20 +- .../themes/Gradianto_dark_fuchsia.theme.json | 16 +- .../themes/Gradianto_deep_ocean.theme.json | 19 +- .../intellijthemes/themes/one_dark.theme.json | 1 + 7 files changed, 142 insertions(+), 106 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8e57582..60e0aa78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ FlatLaf Change Log - Support embedding UI defaults inspector panel into any window. See `FlatUIDefaultsInspector.createInspectorPanel()`. - Copy selected keys and values into clipboard via context menu. +- IntelliJ Themes: + - Updated "Dracula" and "Gradianto" themes. #### Fixed bugs diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json index 39cf75cb..a1f0fd19 100644 --- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json +++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json @@ -74,7 +74,7 @@ "license": "MIT", "licenseFile": "Dracula.LICENSE.txt", "sourceCodeUrl": "https://github.com/dracula/jetbrains", - "sourceCodePath": "blob/master/src/main/resources/themes/dracula.theme.json" + "sourceCodePath": "blob/master/src/main/resources/themes/Dracula.theme.json" }, "Gradianto_dark_fuchsia.theme.json": { "name": "Gradianto Dark Fuchsia", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json index 0f0fd1e2..95d57fb9 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Dracula.theme.json @@ -2,37 +2,48 @@ "name": "Dracula", "dark": true, "author": "Zihan Ma", - "editorScheme": "/themes/dracula.xml", + "editorScheme": "/themes/Dracula.xml", + "colors": { + "primaryForeground": "#f8f8f2", + "primaryBackground": "#414450", + "secondaryBackground": "#44475a", + "hoverBackground": "#282a36", + "selectionBackground": "#6272a4", + "selectionInactiveBackground": "#4e5a82", + "borderColor": "#282a36", + "separatorColor": "#282a36" + }, "ui": { "*": { "arc": "7", - "background": "#414450", - "selectionBackground": "#6272a4", - "selectionInactiveBackground": "#4e5a82", - "inactiveBackground": "#414450", - "borderColor": "#282a36" + "background": "primaryBackground", + "selectionBackground": "selectionBackground", + "selectionInactiveBackground": "selectionInactiveBackground", + "inactiveBackground": "primaryBackground", + "borderColor": "borderColor", + "separatorColor": "separatorColor" }, "Borders": { - "color": "#282a36", - "ContrastBorderColor": "#282a36" + "color": "borderColor", + "ContrastBorderColor": "borderColor" }, "ActionButton": { - "hoverBackground": "#282a35", - "hoverBorderColor": "#282a35", - "pressedBackground": "#282a35", - "pressedBorderColor": "#282a35" + "hoverBackground": "hoverBackground", + "hoverBorderColor": "hoverBackground", + "pressedBackground": "hoverBackground", + "pressedBorderColor": "hoverBackground" }, "Button": { - "foreground": "#f8f8f2", - "startBorderColor": "#6272a4", - "endBorderColor": "#6272a4", - "startBackground": "#6272a4", - "endBackground": "#6272a4", + "foreground": "primaryForeground", + "startBorderColor": "selectionBackground", + "endBorderColor": "selectionBackground", + "startBackground": "selectionBackground", + "endBackground": "selectionBackground", "focusedBorderColor": "#bd93f9", "default": { - "foreground": "#f8f8f2", - "startBackground": "#6272a4", - "endBackground": "#6272a4", + "foreground": "primaryForeground", + "startBackground": "selectionBackground", + "endBackground": "selectionBackground", "startBorderColor": "#bd93f9", "endBorderColor": "#bd93f9", "focusColor": "#bd93f9", @@ -40,7 +51,7 @@ } }, "Counter": { - "foreground": "#414450", + "foreground": "primaryBackground", "background": "#2fc864" }, "CheckBoxMenuItem": { @@ -49,50 +60,50 @@ "ComboBox": { "modifiedItemForeground": "#ff79c6", "ArrowButton": { - "background": "#44475a", - "nonEditableBackground": "#44475a", + "background": "secondaryBackground", + "nonEditableBackground": "secondaryBackground", "iconColor": "#bd93f9" }, "selectionBackground": "#bd93f9", - "nonEditableBackground": "#44475a" + "nonEditableBackground": "secondaryBackground" }, "CompletionPopup": { - "selectionBackground": "#6272a4", - "selectionInactiveBackground": "#4e5a82", + "selectionBackground": "selectionBackground", + "selectionInactiveBackground": "selectionInactiveBackground", "matchForeground": "#ff79c6" }, "Component": { "focusColor": "#bd93f9", - "borderColor": "#6272a4", - "focusedBorderColor": "#6272a4", + "borderColor": "selectionBackground", + "focusedBorderColor": "selectionBackground", "errorFocusColor": "#ff5554", "inactiveErrorFocusColor": "#ff5554", "warningFocusColor": "#f1fa8c", "inactiveWarningFocusColor": "#f1fa8c" }, "DragAndDrop": { - "areaBorderColor": "#6272a4" + "areaBorderColor": "selectionBackground" }, "Editor": { - "background": "#44475a", + "background": "secondaryBackground", "shortcutForeground": "#ff79c6" }, "EditorTabs": { - "background": "#44475a", + "background": "secondaryBackground", "underlinedTabBackground": "#313341", "underlineColor": "#bd93f9", - "underlineHeight": 1 + "underlineHeight": 2 }, "FileColor": { "Blue": "#8be9fd", "Green": "#63667E", "Orange": "#ffb86c", - "Yellow": "#44475a", + "Yellow": "secondaryBackground", "Rose": "#ff79c6", "Violet": "#bd93f9" }, "Label": { - "foreground": "#f8f8f2", + "foreground": "primaryForeground", "errorForeground": "#ff5554" }, "Link": { @@ -102,51 +113,52 @@ "pressedForeground": "#bd93f9" }, "Notification": { - "borderColor": "#6272a4", + "borderColor": "selectionBackground", "errorBorderColor": "#ff5554", - "errorBackground": "#414450", - "errorForeground": "#f8f8f2", + "errorBackground": "primaryBackground", + "errorForeground": "primaryForeground", "ToolWindow": { - "warningForeground": "#f8f8f2", - "warningBackground": "#414450", + "warningForeground": "primaryForeground", + "warningBackground": "primaryBackground", "warningBorderColor": "#ffb86c", - "errorForeground": "#f8f8f2", + "errorForeground": "primaryForeground", "errorBorderColor": "#ff5554", - "errorBackground": "#414450", - "informativeForeground": "#f8f8f2", - "informativeBackground": "#414450", + "errorBackground": "primaryBackground", + "informativeForeground": "primaryForeground", + "informativeBackground": "primaryBackground", "informativeBorderColor": "#50fa7b" } }, "Plugins": { "SearchField": { - "background": "#44475a" + "background": "secondaryBackground" }, "SectionHeader": { - "foreground": "#f8f8f2" + "foreground": "primaryForeground" }, - "lightSelectionBackground": "#282a35", + "hoverBackground": "hoverBackground", + "lightSelectionBackground": "hoverBackground", "Button": { "installBorderColor": "#bd93f9", "installForeground": "#bd93f9", - "installBackground": "#414450", - "installFillForeground": "#414450", + "installBackground": "primaryBackground", + "installFillForeground": "primaryBackground", "installFillBackground": "#bd93f9", - "installFocusedBackground": "#414450", + "installFocusedBackground": "primaryBackground", "updateBorderColor": "#5da3f4", - "updateForeground": "#f8f8f2", + "updateForeground": "primaryForeground", "updateBackground": "#5da3f4" }, "Tab": { - "selectedBackground": "#282a35", - "selectedForeground": "#f8f8f2", - "hoverBackground": "#282a35" + "selectedBackground": "hoverBackground", + "selectedForeground": "primaryForeground", + "hoverBackground": "hoverBackground" } }, "ProgressBar": { "failedColor": "#ff5554", "failedEndColor": "#ff5554", - "trackColor": "#6272a4", + "trackColor": "selectionBackground", "progressColor": "#ff79c6", "indeterminateStartColor": "#93b8f9", "indeterminateEndColor": "#bd93f9", @@ -155,8 +167,8 @@ }, "Popup": { "Header": { - "activeBackground": "#44475a", - "inactiveBackground": "#44475a" + "activeBackground": "secondaryBackground", + "inactiveBackground": "secondaryBackground" } }, "ScrollBar": { @@ -169,39 +181,54 @@ }, "SearchEverywhere": { "SearchField": { - "background": "#44475a" + "background": "secondaryBackground" }, "Tab": { "selectedBackground": "#313341", - "selectedForeground": "#f8f8f2" + "selectedForeground": "primaryForeground" } }, "SearchMatch": { "startBackground": "#ff79c6", "endBackground": "#ff79c6" }, - "Separator.separatorColor": "#282a35", + "Separator": { + "separatorColor": "separatorColor" + }, + "SidePanel": { + "background": "secondaryBackground" + }, + "StatusBar": { + "hoverBackground": "hoverBackground" + }, "TabbedPane": { "tabSelectionHeight": 1, - "focusColor": "#282a35", - "hoverColor": "#282a35", + "focusColor": "hoverBackground", + "hoverColor": "hoverBackground", "underlineColor": "#bd93f9", - "contentAreaColor": "#282a35" + "contentAreaColor": "hoverBackground" + }, + "Table": { + "gridColor": "#5d617a", + "hoverBackground": "selectionBackground" + }, + "TableHeader": { + "bottomSeparatorColor": "separatorColor" }, "ToggleButton": { "onBackground": "#50fa7b", - "onForeground": "#282a35", - "offBackground": "#6272a4", - "offForeground": "#282a35", - "buttonColor": "#f8f8f2" + "onForeground": "hoverBackground", + "offBackground": "selectionBackground", + "offForeground": "hoverBackground", + "buttonColor": "primaryForeground" }, "ToolWindow": { "Button": { - "hoverBackground": "#282a35" + "hoverBackground": "hoverBackground" }, "Header": { - "background": "#44475a", - "inactiveBackground": "#44475a" + "background": "secondaryBackground", + "inactiveBackground": "secondaryBackground" }, "HeaderTab": { "underlineColor": "#bd93f9", @@ -212,8 +239,8 @@ }, "Tree": { "modifiedItemForeground": "#ff79c6", - "selectionBackground": "#6272a4", - "selectionInactiveBackground": "#4e5a82" + "selectionBackground": "selectionBackground", + "selectionInactiveBackground": "selectionInactiveBackground" }, "ValidationTooltip": { "errorBackground": "#ff5554", @@ -224,7 +251,7 @@ "VersionControl": { "FileHistory": { "Commit": { - "selectedBranchBackground": "#44475a" + "selectedBranchBackground": "secondaryBackground" } }, "GitLog": { @@ -236,16 +263,23 @@ }, "Log": { "Commit": { - "currentBranchBackground": "#44475a" + "hoveredBackground": "selectionBackground", + "currentBranchBackground": "secondaryBackground" } } }, "WelcomeScreen": { - "separatorColor": "#191b1f", + "SidePanel": { + "background": "secondaryBackground" + }, + "separatorColor": "separatorColor", "Projects": { - "background": "#282a35", - "selectionBackground": "#44475a", - "selectionInactiveBackground": "#44475a" + "background": "hoverBackground", + "selectionBackground": "secondaryBackground", + "selectionInactiveBackground": "secondaryBackground", + "actions": { + "background": "hoverBackground" + } } } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json index ac5c3eb7..b2d43faa 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_Nature_Green.theme.json @@ -230,35 +230,35 @@ "ScrollBar" : { "hoverThumbBorderColor" : "#39666394", "background" : "#16322cff", - "hoverThumbColor": "#1f3e38b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#224039ff", - "thumb": "#20403aff", + "thumb": "#406480ff", "thumbBorderColor": "#39666394", - "thumbColor": "#20403d94", + "thumbColor": "#406480ff", "thumbDarkShadow": "#122623ff", "thumbHighlight": "#2a4f4cff", "thumbShadow": "#162b24ff", "track": "#182d26ff", "Transparent": { - "thumbColor": "#20403d94", + "thumbColor": "#406480ff", "hoverThumbBorderColor" : "#14262694", - "hoverThumbColor": "#1f3e38b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#224039ff", "thumbBorderColor": "#14262694" }, "Mac" : { "Transparent": { - "thumbColor": "#20403d94", + "thumbColor": "#406480ff", "hoverThumbBorderColor" : "#14262694", - "hoverThumbColor": "#1f3e38b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#224039ff", - "thumbBorderColor": "##39666394" + "thumbBorderColor": "#39666394" }, "hoverThumbBorderColor" : "#14262694", - "hoverThumbColor": "#1f3e38b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#224039ff", "thumbBorderColor": "#14262694", - "thumbColor": "#20403d94" + "thumbColor": "#406480ff" } }, "EditorPane.inactiveBackground": "#254a39ff" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json index dd5058f1..c27af9ea 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_dark_fuchsia.theme.json @@ -252,35 +252,35 @@ "ScrollBar" : { "hoverThumbBorderColor" : "#3a2241b2", "background" : "#241632ff", - "hoverThumbColor": "#472950b2", + "hoverThumbColor": "#694f92ff", "hoverTrackColor": "#3d2240ff", "thumb": "#2f2040ff", "thumbBorderColor": "#2c152fff", - "thumbColor": "#2f1f4094", + "thumbColor": "#6c499194", "thumbDarkShadow": "#261226ff", "thumbHighlight": "#4f2a4eff", "thumbShadow": "#22162bff", "track": "#23182dff", "Transparent": { - "thumbColor": "#2f1f4094", + "thumbColor": "#6c499194", "hoverThumbBorderColor" : "#3a2241b2", - "hoverThumbColor": "#472950b2", + "hoverThumbColor": "#694f92ff", "hoverTrackColor": "#3d2240ff", "thumbBorderColor": "#2c152fff" }, "Mac" : { "Transparent": { - "thumbColor": "#2f1f4094", + "thumbColor": "#6c499194", "hoverThumbBorderColor" : "#3a2241b2", - "hoverThumbColor": "#472950b2", + "hoverThumbColor": "#694f92ff", "hoverTrackColor": "#3d2240ff", "thumbBorderColor": "#2c152fff" }, "hoverThumbBorderColor" : "#3a2241b2", - "hoverThumbColor": "#472950b2", + "hoverThumbColor": "#694f92ff", "hoverTrackColor": "#3d2240ff", "thumbBorderColor": "#2c152fff", - "thumbColor": "#2f1f4094" + "thumbColor": "#6c499194" } }, "TabbedPane": { diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json index b518a1e7..6cf44d12 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/Gradianto_deep_ocean.theme.json @@ -18,7 +18,6 @@ "disabledForeground": "#a3a3a3", "disabledBackground": "#222f44", "inactiveBackground": "#325180", - "errorForeground": "#b5b5b5", "disabledText": "#adadad", @@ -71,35 +70,35 @@ "ScrollBar" : { "hoverThumbBorderColor" : "#12182994", "background" : "#161f3294", - "hoverThumbColor": "#313f62b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#222a40b2", - "thumb": "#20294094", + "thumb": "#3c557cff", "thumbBorderColor": "#12182994", - "thumbColor": "#20294094", + "thumbColor": "#3c557cff", "thumbDarkShadow": "#0c0f1a94", "thumbHighlight": "#3b496bb2", "thumbShadow": "#161a2b94", "track": "#181e2db2", "Transparent": { - "thumbColor": "#20294094", + "thumbColor": "#3c557cff", "hoverThumbBorderColor" : "#12182994", - "hoverThumbColor": "#313f62b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#222a40b2", "thumbBorderColor": "#12182994" }, "Mac" : { "Transparent": { - "thumbColor": "#20294094", + "thumbColor": "#3c557cff", "hoverThumbBorderColor" : "#12182994", - "hoverThumbColor": "#313f62b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#222a40b2", "thumbBorderColor": "#12182994" }, "hoverThumbBorderColor" : "#12182994", - "hoverThumbColor": "#313f62b2", + "hoverThumbColor": "#497486ff", "hoverTrackColor": "#222a40b2", "thumbBorderColor": "#12182994", - "thumbColor": "#20294094" + "thumbColor": "#3c557cff" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json index 912a3448..379efced 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/one_dark.theme.json @@ -341,6 +341,7 @@ "VersionControl": { "Log.Commit": { "currentBranchBackground": "#282c35", + "hoveredBackground": "#2c313c", "unmatchedForeground": "#5c6370" }, From 1d06a2c2e875c0eda7875d9df94c7f1d652dae85 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 9 Jan 2021 17:55:09 +0100 Subject: [PATCH 120/178] IntelliJ Themes: updated "Material Theme UI Lite" themes; added "Material Theme UI Lite / Moonlight" theme --- CHANGELOG.md | 3 +- .../flatlaf/demo/intellijthemes/themes.json | 16 + flatlaf-intellij-themes/README.md | 2 + .../intellijthemes/FlatAllIJThemes.java | 2 + .../FlatMoonlightContrastIJTheme.java | 54 + .../FlatMoonlightIJTheme.java | 54 + .../Arc Dark Contrast.theme.json | 233 +++- .../Arc Dark.theme.json | 233 +++- .../Atom One Dark Contrast.theme.json | 187 ++- .../Atom One Dark.theme.json | 187 ++- .../Atom One Light Contrast.theme.json | 689 ++++++---- .../Atom One Light.theme.json | 687 ++++++---- .../Dracula Contrast.theme.json | 459 ++++--- .../material-theme-ui-lite/Dracula.theme.json | 459 ++++--- .../GitHub Contrast.theme.json | 471 ++++--- .../material-theme-ui-lite/GitHub.theme.json | 427 +++--- .../Light Owl Contrast.theme.json | 1215 +++++++++-------- .../Light Owl.theme.json | 1215 +++++++++-------- .../Material Darker Contrast.theme.json | 191 ++- .../Material Darker.theme.json | 191 ++- .../Material Deep Ocean Contrast.theme.json | 165 ++- .../Material Deep Ocean.theme.json | 165 ++- .../Material Lighter Contrast.theme.json | 307 +++-- .../Material Lighter.theme.json | 263 ++-- .../Material Oceanic Contrast.theme.json | 165 ++- .../Material Oceanic.theme.json | 165 ++- .../Material Palenight Contrast.theme.json | 165 ++- .../Material Palenight.theme.json | 165 ++- .../Monokai Pro Contrast.theme.json | 389 ++++-- .../Monokai Pro.theme.json | 345 +++-- .../Moonlight Contrast.theme.json | 1010 ++++++++++++++ .../Moonlight.theme.json | 1010 ++++++++++++++ .../Night Owl Contrast.theme.json | 907 ++++++------ .../Night Owl.theme.json | 855 ++++++------ .../Solarized Dark Contrast.theme.json | 283 ++-- .../Solarized Dark.theme.json | 281 ++-- .../Solarized Light Contrast.theme.json | 353 +++-- .../Solarized Light.theme.json | 351 +++-- 38 files changed, 9629 insertions(+), 4690 deletions(-) create mode 100644 flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightContrastIJTheme.java create mode 100644 flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightIJTheme.java create mode 100644 flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight Contrast.theme.json create mode 100644 flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight.theme.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 60e0aa78..d12c0bb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ FlatLaf Change Log `FlatUIDefaultsInspector.createInspectorPanel()`. - Copy selected keys and values into clipboard via context menu. - IntelliJ Themes: - - Updated "Dracula" and "Gradianto" themes. + - Added "Material Theme UI Lite / Moonlight" theme. + - Updated "Dracula", "Gradianto" and "Material Theme UI Lite" themes. #### Fixed bugs diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json index a1f0fd19..49b4e182 100644 --- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json +++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/themes.json @@ -410,6 +410,22 @@ "sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite", "sourceCodePath": "blob/master/src/main/resources/themes/Monokai Pro Contrast.theme.json" }, + "material-theme-ui-lite/Moonlight.theme.json": { + "name": "Material Theme UI Lite / Moonlight", + "dark": true, + "license": "MIT", + "licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt", + "sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite", + "sourceCodePath": "blob/master/src/main/resources/themes/Moonlight.theme.json" + }, + "material-theme-ui-lite/Moonlight Contrast.theme.json": { + "name": "Material Theme UI Lite / Moonlight Contrast", + "dark": true, + "license": "MIT", + "licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt", + "sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite", + "sourceCodePath": "blob/master/src/main/resources/themes/Moonlight Contrast.theme.json" + }, "material-theme-ui-lite/Night Owl.theme.json": { "name": "Material Theme UI Lite / Night Owl", "dark": true, diff --git a/flatlaf-intellij-themes/README.md b/flatlaf-intellij-themes/README.md index ad0d1534..cac648ef 100644 --- a/flatlaf-intellij-themes/README.md +++ b/flatlaf-intellij-themes/README.md @@ -101,6 +101,8 @@ Name | Class [Material Palenight Contrast (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightContrastIJTheme` [Monokai Pro (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProIJTheme` [Monokai Pro Contrast (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProContrastIJTheme` +[Moonlight (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMoonlightIJTheme` +[Moonlight Contrast (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMoonlightContrastIJTheme` [Night Owl (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlIJTheme` [Night Owl Contrast (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlContrastIJTheme` [Solarized Dark (Material)](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkIJTheme` diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java index 4dad3a7d..d6b2833a 100644 --- a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatAllIJThemes.java @@ -82,6 +82,8 @@ public class FlatAllIJThemes new FlatIJLookAndFeelInfo( "Material Palenight Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightContrastIJTheme", true ), new FlatIJLookAndFeelInfo( "Monokai Pro (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProIJTheme", true ), new FlatIJLookAndFeelInfo( "Monokai Pro Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProContrastIJTheme", true ), + new FlatIJLookAndFeelInfo( "Moonlight (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMoonlightIJTheme", true ), + new FlatIJLookAndFeelInfo( "Moonlight Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMoonlightContrastIJTheme", true ), new FlatIJLookAndFeelInfo( "Night Owl (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlIJTheme", true ), new FlatIJLookAndFeelInfo( "Night Owl Contrast (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlContrastIJTheme", true ), new FlatIJLookAndFeelInfo( "Solarized Dark (Material)", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkIJTheme", true ), diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightContrastIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightContrastIJTheme.java new file mode 100644 index 00000000..e2d60dd0 --- /dev/null +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightContrastIJTheme.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + +// +// DO NOT MODIFY +// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator +// + +import com.formdev.flatlaf.IntelliJTheme; + +/** + * @author Karl Tauber + */ +public class FlatMoonlightContrastIJTheme + extends IntelliJTheme.ThemeLaf +{ + public static final String NAME = "Moonlight Contrast (Material)"; + + public static boolean install() { + try { + return install( new FlatMoonlightContrastIJTheme() ); + } catch( RuntimeException ex ) { + return false; + } + } + + public static void installLafInfo() { + installLafInfo( NAME, FlatMoonlightContrastIJTheme.class ); + } + + public FlatMoonlightContrastIJTheme() { + super( Utils.loadTheme( "Moonlight Contrast.theme.json" ) ); + } + + @Override + public String getName() { + return NAME; + } +} diff --git a/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightIJTheme.java b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightIJTheme.java new file mode 100644 index 00000000..6b2026c3 --- /dev/null +++ b/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/materialthemeuilite/FlatMoonlightIJTheme.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 FormDev Software GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.formdev.flatlaf.intellijthemes.materialthemeuilite; + +// +// DO NOT MODIFY +// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator +// + +import com.formdev.flatlaf.IntelliJTheme; + +/** + * @author Karl Tauber + */ +public class FlatMoonlightIJTheme + extends IntelliJTheme.ThemeLaf +{ + public static final String NAME = "Moonlight (Material)"; + + public static boolean install() { + try { + return install( new FlatMoonlightIJTheme() ); + } catch( RuntimeException ex ) { + return false; + } + } + + public static void installLafInfo() { + installLafInfo( NAME, FlatMoonlightIJTheme.class ); + } + + public FlatMoonlightIJTheme() { + super( Utils.loadTheme( "Moonlight.theme.json" ) ); + } + + @Override + public String getName() { + return NAME; + } +} diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark Contrast.theme.json index 4516c784..5809bd42 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark Contrast.theme.json @@ -3,18 +3,24 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Arc Dark.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/arcdark.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#8b9eb5", "background": "#2f343f", "borderColor": "#404552", - "disabledBackground": "#37373d", + "disabledBackground": "#474B57", "disabledForeground": "#D3DAE3", "disabledText": "#D3DAE3", - "focusColor": "#08507C", + "focusColor": "#3F3F46", "focusedBorderColor": "#42A5F5", "foreground": "#D3DAE3", - "inactiveBackground": "#37373d", + "inactiveBackground": "#474B57", "inactiveForeground": "#8b9eb5", "infoForeground": "#8b9eb5", "selectionBackground": "#8888FF", @@ -54,7 +60,7 @@ "disabledText": "#D3DAE3", "endBackground": "#383C4A", "endBorderColor": "#383C4A", - "focus": "#08507C", + "focus": "#3F3F46", "focusedBorderColor": "#42A5F5", "foreground": "#8b9eb5", "highlight": "#FFFFFF", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#404552", "Tooltip.background": "#262a33" }, - "Content.background": "#262b33", + "Content": { + "background": "#262b33", + "selectionBackground": "#8888FF" + }, "CheckBox": { "background": "#2f343f", "disabledText": "#D3DAE3", @@ -89,6 +98,14 @@ "selectionBackground": "#8888FF", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#D3DAE3", + "AccessEnabled": { + "accessDot": "#42A5F5", + "dropdownBorder": "#393f4c", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#2f343f", "foreground": "#D3DAE3", @@ -104,6 +121,7 @@ }, "background": "#262b33", "buttonBackground": "#383C4A", + "darcula.hoveredArrowButtonForeground": "#42A5F5", "disabledForeground": "#D3DAE3", "foreground": "#D3DAE3", "modifiedItemForeground": "#42A5F5", @@ -130,7 +148,7 @@ }, "Component": { "arc": 4, - "borderColor": "#08507C", + "borderColor": "#3F3F46", "disabledBorderColor": "#383C4A", "focusColor": "#42A5F5", "focusedBorderColor": "#42A5F5", @@ -156,23 +174,25 @@ } }, "DebuggerTabs": { - "selectedBackground": "#08507C", - "underlinedTabBackground": "#08507C" + "selectedBackground": "#3F3F46", + "underlinedTabBackground": "#3F3F46" }, "DebuggerPopup": { - "borderColor": "#08507C" + "borderColor": "#3F3F46" }, "DefaultTabs": { "background": "#2f343f", "borderColor": "#2f343f", "hoverBackground": "#41416A", "hoverColor": "#262b33", - "hoverMaskColor": "#08507C", + "hoverMaskColor": "#3F3F46", + "inactiveColoredTabBackground": "#2f343f", "inactiveColoredFileBackground": "#383C4A", - "inactiveUnderlineColor": "#D3DAE3", + "inactiveUnderlineColor": "#42A5F5", "inactiveMaskColor": "#262b33", "underlineColor": "#42A5F5", - "underlinedTabBackground": "#41416A" + "underlinedTabBackground": "#41416A", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#2f343f", "DialogWrapper.southPanelBackground": "#2f343f", @@ -198,21 +218,23 @@ }, "EditorTabs": { "borderColor": "#393f4c", - "hoverColor": "#08507C", - "hoverMaskColor": "#08507C", + "hoverBackground": "#3F3F46", + "hoverColor": "#3F3F46", + "hoverMaskColor": "#3F3F46", "inactiveMaskColor": "#2f343f", - "inactiveColoredFileBackground": "#2f343f2", + "inactiveColoredFileBackground": "#2f343f", "inactiveUnderlineColor": "#D3DAE3", "selectedForeground": "#D3DAE3", "selectedBackground": "#41416A", "underlineColor": "#42A5F5", - "underlinedTabBackground": "#41416A" + "underlinedTabBackground": "#41416A", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#2f343f", "borderColor": "#393f4c", - "hoverBackground": "#08507C", - "hoverColor": "#08507C", + "hoverBackground": "#3F3F46", + "hoverColor": "#3F3F46", "inactiveUnderlineColor": "#42A5F5", "underlineColor": "#42A5F5", "underlinedTabBackground": "#41416A", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#37373d", + "Yellow": "#474B57", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#41416A" }, + "GotItTooltip.borderColor": "#262a33", "Group": { "disabledSeparatorColor": "#404552", "separatorColor": "#404552" }, "GutterTooltip": { - "infoForeground": "#D3DAE3", + "infoForeground": "#8b9eb5", "lineSeparatorColor": "#2f343f" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#D3DAE3", "foreground": "#D3DAE3", "infoForeground": "#8b9eb5", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#D3DAE3" }, "Link": { "activeForeground": "#42A5F5", @@ -301,10 +325,12 @@ "List": { "background": "#393f4c", "foreground": "#D3DAE3", + "hoverBackground": "#08507C70", + "hoverInactiveBackground": "#41416A", "selectionBackground": "#8888FF50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#09477170" + "selectionInactiveBackground": "#08507C70" }, "material": { "background": "#2f343f", @@ -320,8 +346,8 @@ }, "MemoryIndicator": { "allocatedBackground": "#393f4c", - "usedColor": "#08507C", - "usedBackground": "#08507C" + "usedColor": "#3F3F46", + "usedBackground": "#3F3F46" }, "Menu": { "acceleratorForeground": "#8b9eb5", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#393f4c", "borderColor": "#41416A", - "currentOverloadBackground": "#41416A", + "currentOverloadBackground": "#3F3F46", "currentParameterForeground": "#42A5F5", "disabledForeground": "#D3DAE3", "foreground": "#D3DAE3", @@ -428,21 +454,22 @@ "Plugins": { "background": "#2f343f", "disabledForeground": "#D3DAE3", - "eapTagBackground": "#08507C", - "lightSelectionBackground": "#8888FF", - "paidTagBackground": "#08507C", + "eapTagBackground": "#3F3F46", + "hoverBackground": "#08507C70", + "lightSelectionBackground": "#41416A", + "paidTagBackground": "#3F3F46", "selectionBackground": "#8888FF", "tagForeground": "#42A5F5", - "tagBackground": "#08507C", - "trialTagBackground": "#08507C", + "tagBackground": "#3F3F46", + "trialTagBackground": "#3F3F46", "Button": { "installBackground": "#383C4A", "installBorderColor": "#383C4A", "installForeground": "#D3DAE3", - "installFocusedBackground": "#08507C", + "installFocusedBackground": "#3F3F46", "installFillForeground": "#D3DAE3", "installFillBackground": "#383C4A", - "updateBackground": "#383C4A", + "updateBackground": "#42A5F5", "updateBorderColor": "#383C4A", "updateForeground": "#D3DAE3" }, @@ -496,8 +523,8 @@ "indeterminateEndColor": "#42A5F5", "indeterminateStartColor": "#42A5F5", "progressColor": "#42A5F5", - "selectionBackground": "#08507C", - "trackColor": "#08507C" + "selectionBackground": "#3F3F46", + "trackColor": "#3F3F46" }, "PsiViewer": { "referenceHighlightColor": "#42A5F5" @@ -517,6 +544,7 @@ "selectionBackground": "#8888FF", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#404552", "ScrollBar": { "background": "#2f343f", "hoverThumbBorderColor": "#42A5F5", @@ -538,7 +566,7 @@ "trackColor": "#2f343f30" } }, - "thumb": "#08507C", + "thumb": "#3F3F46", "thumbBorderColor": "#42A5F570", "thumbColor": "#42A5F570", "trackColor": "#2f343f30", @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#FFFFFF", "selectedForeground": "#FFFFFF", - "selectedBackground": "#08507C" + "selectedBackground": "#3F3F46" } }, "SearchMatch": { "endBackground": "#42A5F5", - "startBackground": "#42A5F5" + "startBackground": "#42A5F5", + "endColor": "#42A5F5", + "startColor": "#42A5F5" }, "SearchField.errorBackground": "#262a33", + "SearchOption": { + "selectedBackground": "#41416A" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#8b9eb5", + "Repeated.File.Foreground": "#D3DAE3" + }, "Separator": { "background": "#393f4c", "foreground": "#393f4c", @@ -599,7 +636,7 @@ "thumb": "#42A5F5" }, "SpeedSearch": { - "background": "#08507C", + "background": "#3F3F46", "borderColor": "#404552", "foreground": "#D3DAE3", "errorForeground": "#D3DAE3" @@ -616,11 +653,13 @@ }, "SplitPaneDivider.draggingColor": "#393f4c", "StatusBar": { - "borderColor": "#2f343f" + "borderColor": "#2f343f", + "hoverBackground": "#3F3F46", + "LightEditBackground": "#41416A" }, "TabbedPane": { "background": "#2f343f", - "contentAreaColor": "#08507C", + "contentAreaColor": "#3F3F46", "contentBorderInsets": "3,1,1,1", "darkShadow": "#404552", "disabledForeground": "#D3DAE3", @@ -630,7 +669,7 @@ "fontSizeOffset": 0, "foreground": "#D3DAE3", "highlight": "#404552", - "hoverColor": "#08507C", + "hoverColor": "#3F3F46", "labelShift": 0, "selectedForeground": "#FFFFFF", "selectedLabelShift": 0, @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#262b33", "Table": { + "alternativeRowBackground": "#262b33", "background": "#2f343f", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#D3DAE3", "dropLineColor": "#42A5F5", "dropLineShortColor": "#42A5F5", "focusCellBackground": "#41416A", @@ -653,6 +694,8 @@ "foreground": "#D3DAE3", "gridColor": "#2f343f", "highlightOuter": "#41416A", + "hoverBackground": "#08507C70", + "hoverInactiveBackground": "#41416A", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#8b9eb5", "lightSelectionInactiveBackground": "#393f4c", @@ -704,7 +747,7 @@ }, "TitlePane": { "background": "#262b33", - "Button.hoverBackground": "#08507C", + "Button.hoverBackground": "#3F3F46", "inactiveBackground": "#2f343f", "infoForeground": "#8b9eb5", "inactiveInfoForeground": "#8b9eb5" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#2f343f", "Actions.infoForeground": "#8b9eb5", - "background": "#2f343f", - "borderColor": "#08507C", + "background": "#262a33", + "borderColor": "#404552", "foreground": "#D3DAE3", "infoForeground": "#8b9eb5", "separatorColor": "#404552", @@ -751,50 +794,93 @@ "background": "#2f343f" }, "HeaderTab": { - "hoverBackground": "#08507C", - "hoverInactiveBackground": "#393f4c", + "borderColor": "#3F3F46", + "hoverBackground": "#3F3F46", + "hoverInactiveBackground": "#3F3F46", "inactiveUnderlineColor": "#42A5F5", "selectedBackground": "#262b33", "selectedInactiveBackground": "#262b33", "underlineColor": "#42A5F5", - "underlinedTabBackground": "#08507C", - "underlinedTabInactiveBackground": "#393f4c" + "underlinedTabBackground": "#41416A", + "underlinedTabInactiveBackground": "#393f4c", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#D3DAE3" } }, "Tree": { "background": "#262b33", "foreground": "#8b9eb5", "hash": "#404552", + "hoverBackground": "#08507C70", + "hoverInactiveBackground": "#41416A", "modifiedItemForeground": "#42A5F5", "rowHeight": 28, - "selectionBackground": "#09477170", + "selectionBackground": "#08507C70", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#09477170", + "selectionInactiveBackground": "#08507C70", "textBackground": "#262b33" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#404552", - "ColorPicker.background": "#2f343f", - "ColorPicker.foreground": "#D3DAE3", - "Component.borderColor": "#404552", - "Component.background": "#2f343f", - "Component.foreground": "#D3DAE3", - "Connector.borderColor": "#404552", - "Connector.hoverBorderColor": "#08507C", + "Canvas.background": "#262b33", + "ColorPicker": { + "background": "#2f343f", + "foreground": "#D3DAE3" + }, + "Component": { + "borderColor": "#404552", + "background": "#2f343f", + "foreground": "#D3DAE3", + "hoverBorderColor": "#3F3F46" + }, + "Connector": { + "borderColor": "#404552", + "hoverBorderColor": "#3F3F46" + }, "Canvas.background": "#262b33", "highStroke.foreground": "#D3DAE3", "Label.foreground": "#8b9eb5", - "List.selectionBackground": "#09477170", - "Panel.borderColor": "#404552", - "Panel.background": "#2f343f", + "List.selectionBackground": "#08507C70", + "motion": { + "borderColor": "#404552", + "Component.foreground": "#D3DAE3", + "ConstraintSetText.foreground": "#8b9eb5", + "ConstraintSet.background": "#393f4c", + "CSPanel.SelectedFocusBackground": "#8888FF", + "CSPanel.SelectedBackground": "#08507C70", + "cs_FocusText.infoForeground": "#8b9eb5", + "CursorTextColor.foreground": "#D3DAE3", + "HoverColor.disabledBackground": "#D3DAE3", + "motionGraph.background": "#2f343f", + "Notification.background": "#262a33", + "ourAvg.background": "#393f4c", + "ourCS.background": "#393f4c", + "ourCS_Border.borderColor": "#404552", + "ourCS_TextColor.foreground": "#8b9eb5", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#41416A", + "ourCS_SelectedBorder.pressedBorderColor": "#3F3F46", + "ourML_BarColor.separatorColor": "#404552", + "PrimaryPanel.background": "#262b33", + "SecondaryPanel.background": "#2f343f", + "SecondaryPanel.header.foreground": "#8b9eb5", + "SecondaryPanel.header.background": "#262b33", + "timeLine.disabledBorderColor": "#404552" + }, + "Panel": { + "borderColor": "#404552", + "background": "#2f343f" + }, "percent.foreground": "#D3DAE3", - "Placeholder.background": "#2f343f", - "Placeholder.borderColor": "#404552", - "Placeholder.foreground": "#D3DAE3", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#2f343f", + "borderColor": "#404552", + "foreground": "#D3DAE3", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#2f343f", "stroke.acceleratorForeground": "#8b9eb5" }, @@ -809,7 +895,7 @@ "selectedBranchBackground": "#2f343f" }, "GitCommits": { - "graphColor": "#08507C" + "graphColor": "#3F3F46" }, "GitLog": { "localBranchIconColor": "#42A5F5", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#8b9eb5", - "Commit.currentBranchBackground": "#393f4c" + "Commit.currentBranchBackground": "#393f4c", + "Commit.hoveredBackground": "#08507C70" }, "RefLabel": { "foreground": "#FFFFFF", - "backgroundBase": "#08507C" + "backgroundBase": "#3F3F46" } }, "Viewport": { @@ -840,16 +927,22 @@ "foreground": "#D3DAE3" }, "WelcomeScreen": { + "AssociatedComponent.background": "#2f343f", "background": "#2f343f", "borderColor": "#2f343f", "captionBackground": "#262b33", "captionForeground": "#D3DAE3", + "Details.background": "#2f343f", "footerBackground": "#262b33", "footerForeground": "#D3DAE3", "headerBackground": "#2f343f", "headerForeground": "#D3DAE3", + "List.background": "#262b33", "separatorColor": "#404552", + "SidePanel.background": "#393f4c", "Projects": { + "actions.background": "#262b33", + "actions.selectionBackground": "#3F3F46", "background": "#393f4c", "selectionBackground": "#8888FF", "selectionInactiveBackground": "#393f4c" @@ -881,8 +974,8 @@ "Actions.Yellow": "#F9EE98", "Checkbox.Background.Default": "#262b33", "Checkbox.Background.Default.Dark": "#262b33", - "Checkbox.Background.Disabled": "#37373d", - "Checkbox.Background.Disabled.Dark": "#37373d", + "Checkbox.Background.Disabled": "#474B57", + "Checkbox.Background.Disabled.Dark": "#474B57", "Checkbox.Border.Default": "#404552", "Checkbox.Border.Default.Dark": "#404552", "Checkbox.Border.Disabled": "#D3DAE3", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark.theme.json index ad9510f4..21780d61 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Arc Dark.theme.json @@ -3,18 +3,24 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Arc Dark.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/arcdark.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#8b9eb5", "background": "#2f343f", "borderColor": "#404552", - "disabledBackground": "#37373d", + "disabledBackground": "#474B57", "disabledForeground": "#D3DAE3", "disabledText": "#D3DAE3", - "focusColor": "#08507C", + "focusColor": "#3F3F46", "focusedBorderColor": "#42A5F5", "foreground": "#D3DAE3", - "inactiveBackground": "#37373d", + "inactiveBackground": "#474B57", "inactiveForeground": "#8b9eb5", "infoForeground": "#8b9eb5", "selectionBackground": "#8888FF", @@ -54,7 +60,7 @@ "disabledText": "#D3DAE3", "endBackground": "#383C4A", "endBorderColor": "#383C4A", - "focus": "#08507C", + "focus": "#3F3F46", "focusedBorderColor": "#42A5F5", "foreground": "#8b9eb5", "highlight": "#FFFFFF", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#404552", "Tooltip.background": "#262a33" }, - "Content.background": "#262b33", + "Content": { + "background": "#262b33", + "selectionBackground": "#8888FF" + }, "CheckBox": { "background": "#2f343f", "disabledText": "#D3DAE3", @@ -89,6 +98,14 @@ "selectionBackground": "#8888FF", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#D3DAE3", + "AccessEnabled": { + "accessDot": "#42A5F5", + "dropdownBorder": "#393f4c", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#2f343f", "foreground": "#D3DAE3", @@ -104,6 +121,7 @@ }, "background": "#2f343f", "buttonBackground": "#383C4A", + "darcula.hoveredArrowButtonForeground": "#42A5F5", "disabledForeground": "#D3DAE3", "foreground": "#D3DAE3", "modifiedItemForeground": "#42A5F5", @@ -130,7 +148,7 @@ }, "Component": { "arc": 4, - "borderColor": "#08507C", + "borderColor": "#3F3F46", "disabledBorderColor": "#383C4A", "focusColor": "#42A5F5", "focusedBorderColor": "#42A5F5", @@ -156,23 +174,25 @@ } }, "DebuggerTabs": { - "selectedBackground": "#08507C", - "underlinedTabBackground": "#08507C" + "selectedBackground": "#3F3F46", + "underlinedTabBackground": "#3F3F46" }, "DebuggerPopup": { - "borderColor": "#08507C" + "borderColor": "#3F3F46" }, "DefaultTabs": { "background": "#2f343f", "borderColor": "#2f343f", "hoverBackground": "#41416A", "hoverColor": "#2f343f", - "hoverMaskColor": "#08507C", + "hoverMaskColor": "#3F3F46", + "inactiveColoredTabBackground": "#2f343f", "inactiveColoredFileBackground": "#383C4A", - "inactiveUnderlineColor": "#D3DAE3", + "inactiveUnderlineColor": "#42A5F5", "inactiveMaskColor": "#2f343f", "underlineColor": "#42A5F5", - "underlinedTabBackground": "#41416A" + "underlinedTabBackground": "#41416A", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#2f343f", "DialogWrapper.southPanelBackground": "#2f343f", @@ -198,21 +218,23 @@ }, "EditorTabs": { "borderColor": "#393f4c", - "hoverColor": "#08507C", - "hoverMaskColor": "#08507C", + "hoverBackground": "#3F3F46", + "hoverColor": "#3F3F46", + "hoverMaskColor": "#3F3F46", "inactiveMaskColor": "#2f343f", - "inactiveColoredFileBackground": "#2f343f2", + "inactiveColoredFileBackground": "#2f343f", "inactiveUnderlineColor": "#D3DAE3", "selectedForeground": "#D3DAE3", "selectedBackground": "#41416A", "underlineColor": "#42A5F5", - "underlinedTabBackground": "#41416A" + "underlinedTabBackground": "#41416A", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#2f343f", "borderColor": "#393f4c", - "hoverBackground": "#08507C", - "hoverColor": "#08507C", + "hoverBackground": "#3F3F46", + "hoverColor": "#3F3F46", "inactiveUnderlineColor": "#42A5F5", "underlineColor": "#42A5F5", "underlinedTabBackground": "#41416A", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#37373d", + "Yellow": "#474B57", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#41416A" }, + "GotItTooltip.borderColor": "#262a33", "Group": { "disabledSeparatorColor": "#404552", "separatorColor": "#404552" }, "GutterTooltip": { - "infoForeground": "#D3DAE3", + "infoForeground": "#8b9eb5", "lineSeparatorColor": "#2f343f" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#D3DAE3", "foreground": "#D3DAE3", "infoForeground": "#8b9eb5", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#D3DAE3" }, "Link": { "activeForeground": "#42A5F5", @@ -301,10 +325,12 @@ "List": { "background": "#393f4c", "foreground": "#D3DAE3", + "hoverBackground": "#08507C70", + "hoverInactiveBackground": "#41416A", "selectionBackground": "#8888FF50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#09477170" + "selectionInactiveBackground": "#08507C70" }, "material": { "background": "#2f343f", @@ -320,8 +346,8 @@ }, "MemoryIndicator": { "allocatedBackground": "#393f4c", - "usedColor": "#08507C", - "usedBackground": "#08507C" + "usedColor": "#3F3F46", + "usedBackground": "#3F3F46" }, "Menu": { "acceleratorForeground": "#8b9eb5", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#393f4c", "borderColor": "#41416A", - "currentOverloadBackground": "#41416A", + "currentOverloadBackground": "#3F3F46", "currentParameterForeground": "#42A5F5", "disabledForeground": "#D3DAE3", "foreground": "#D3DAE3", @@ -428,21 +454,22 @@ "Plugins": { "background": "#2f343f", "disabledForeground": "#D3DAE3", - "eapTagBackground": "#08507C", - "lightSelectionBackground": "#8888FF", - "paidTagBackground": "#08507C", + "eapTagBackground": "#3F3F46", + "hoverBackground": "#08507C70", + "lightSelectionBackground": "#41416A", + "paidTagBackground": "#3F3F46", "selectionBackground": "#8888FF", "tagForeground": "#42A5F5", - "tagBackground": "#08507C", - "trialTagBackground": "#08507C", + "tagBackground": "#3F3F46", + "trialTagBackground": "#3F3F46", "Button": { "installBackground": "#383C4A", "installBorderColor": "#383C4A", "installForeground": "#D3DAE3", - "installFocusedBackground": "#08507C", + "installFocusedBackground": "#3F3F46", "installFillForeground": "#D3DAE3", "installFillBackground": "#383C4A", - "updateBackground": "#383C4A", + "updateBackground": "#42A5F5", "updateBorderColor": "#383C4A", "updateForeground": "#D3DAE3" }, @@ -496,8 +523,8 @@ "indeterminateEndColor": "#42A5F5", "indeterminateStartColor": "#42A5F5", "progressColor": "#42A5F5", - "selectionBackground": "#08507C", - "trackColor": "#08507C" + "selectionBackground": "#3F3F46", + "trackColor": "#3F3F46" }, "PsiViewer": { "referenceHighlightColor": "#42A5F5" @@ -517,6 +544,7 @@ "selectionBackground": "#8888FF", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#404552", "ScrollBar": { "background": "#2f343f", "hoverThumbBorderColor": "#42A5F5", @@ -538,7 +566,7 @@ "trackColor": "#2f343f30" } }, - "thumb": "#08507C", + "thumb": "#3F3F46", "thumbBorderColor": "#42A5F570", "thumbColor": "#42A5F570", "trackColor": "#2f343f30", @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#FFFFFF", "selectedForeground": "#FFFFFF", - "selectedBackground": "#08507C" + "selectedBackground": "#3F3F46" } }, "SearchMatch": { "endBackground": "#42A5F5", - "startBackground": "#42A5F5" + "startBackground": "#42A5F5", + "endColor": "#42A5F5", + "startColor": "#42A5F5" }, "SearchField.errorBackground": "#262a33", + "SearchOption": { + "selectedBackground": "#41416A" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#8b9eb5", + "Repeated.File.Foreground": "#D3DAE3" + }, "Separator": { "background": "#393f4c", "foreground": "#393f4c", @@ -599,7 +636,7 @@ "thumb": "#42A5F5" }, "SpeedSearch": { - "background": "#08507C", + "background": "#3F3F46", "borderColor": "#404552", "foreground": "#D3DAE3", "errorForeground": "#D3DAE3" @@ -616,11 +653,13 @@ }, "SplitPaneDivider.draggingColor": "#393f4c", "StatusBar": { - "borderColor": "#2f343f" + "borderColor": "#2f343f", + "hoverBackground": "#3F3F46", + "LightEditBackground": "#41416A" }, "TabbedPane": { "background": "#2f343f", - "contentAreaColor": "#08507C", + "contentAreaColor": "#3F3F46", "contentBorderInsets": "3,1,1,1", "darkShadow": "#404552", "disabledForeground": "#D3DAE3", @@ -630,7 +669,7 @@ "fontSizeOffset": 0, "foreground": "#D3DAE3", "highlight": "#404552", - "hoverColor": "#08507C", + "hoverColor": "#3F3F46", "labelShift": 0, "selectedForeground": "#FFFFFF", "selectedLabelShift": 0, @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#2f343f", "Table": { + "alternativeRowBackground": "#262b33", "background": "#2f343f", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#D3DAE3", "dropLineColor": "#42A5F5", "dropLineShortColor": "#42A5F5", "focusCellBackground": "#41416A", @@ -653,6 +694,8 @@ "foreground": "#D3DAE3", "gridColor": "#2f343f", "highlightOuter": "#41416A", + "hoverBackground": "#08507C70", + "hoverInactiveBackground": "#41416A", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#8b9eb5", "lightSelectionInactiveBackground": "#393f4c", @@ -704,7 +747,7 @@ }, "TitlePane": { "background": "#262b33", - "Button.hoverBackground": "#08507C", + "Button.hoverBackground": "#3F3F46", "inactiveBackground": "#2f343f", "infoForeground": "#8b9eb5", "inactiveInfoForeground": "#8b9eb5" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#2f343f", "Actions.infoForeground": "#8b9eb5", - "background": "#2f343f", - "borderColor": "#08507C", + "background": "#262a33", + "borderColor": "#404552", "foreground": "#D3DAE3", "infoForeground": "#8b9eb5", "separatorColor": "#404552", @@ -751,50 +794,93 @@ "background": "#2f343f" }, "HeaderTab": { - "hoverBackground": "#08507C", - "hoverInactiveBackground": "#393f4c", + "borderColor": "#3F3F46", + "hoverBackground": "#3F3F46", + "hoverInactiveBackground": "#3F3F46", "inactiveUnderlineColor": "#42A5F5", "selectedBackground": "#262b33", "selectedInactiveBackground": "#262b33", "underlineColor": "#42A5F5", - "underlinedTabBackground": "#08507C", - "underlinedTabInactiveBackground": "#393f4c" + "underlinedTabBackground": "#41416A", + "underlinedTabInactiveBackground": "#393f4c", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#D3DAE3" } }, "Tree": { "background": "#2f343f", "foreground": "#8b9eb5", "hash": "#404552", + "hoverBackground": "#08507C70", + "hoverInactiveBackground": "#41416A", "modifiedItemForeground": "#42A5F5", "rowHeight": 28, - "selectionBackground": "#09477170", + "selectionBackground": "#08507C70", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#09477170", + "selectionInactiveBackground": "#08507C70", "textBackground": "#2f343f" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#404552", - "ColorPicker.background": "#2f343f", - "ColorPicker.foreground": "#D3DAE3", - "Component.borderColor": "#404552", - "Component.background": "#2f343f", - "Component.foreground": "#D3DAE3", - "Connector.borderColor": "#404552", - "Connector.hoverBorderColor": "#08507C", + "Canvas.background": "#262b33", + "ColorPicker": { + "background": "#2f343f", + "foreground": "#D3DAE3" + }, + "Component": { + "borderColor": "#404552", + "background": "#2f343f", + "foreground": "#D3DAE3", + "hoverBorderColor": "#3F3F46" + }, + "Connector": { + "borderColor": "#404552", + "hoverBorderColor": "#3F3F46" + }, "Canvas.background": "#262b33", "highStroke.foreground": "#D3DAE3", "Label.foreground": "#8b9eb5", - "List.selectionBackground": "#09477170", - "Panel.borderColor": "#404552", - "Panel.background": "#2f343f", + "List.selectionBackground": "#08507C70", + "motion": { + "borderColor": "#404552", + "Component.foreground": "#D3DAE3", + "ConstraintSetText.foreground": "#8b9eb5", + "ConstraintSet.background": "#393f4c", + "CSPanel.SelectedFocusBackground": "#8888FF", + "CSPanel.SelectedBackground": "#08507C70", + "cs_FocusText.infoForeground": "#8b9eb5", + "CursorTextColor.foreground": "#D3DAE3", + "HoverColor.disabledBackground": "#D3DAE3", + "motionGraph.background": "#2f343f", + "Notification.background": "#262a33", + "ourAvg.background": "#393f4c", + "ourCS.background": "#393f4c", + "ourCS_Border.borderColor": "#404552", + "ourCS_TextColor.foreground": "#8b9eb5", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#41416A", + "ourCS_SelectedBorder.pressedBorderColor": "#3F3F46", + "ourML_BarColor.separatorColor": "#404552", + "PrimaryPanel.background": "#262b33", + "SecondaryPanel.background": "#2f343f", + "SecondaryPanel.header.foreground": "#8b9eb5", + "SecondaryPanel.header.background": "#262b33", + "timeLine.disabledBorderColor": "#404552" + }, + "Panel": { + "borderColor": "#404552", + "background": "#2f343f" + }, "percent.foreground": "#D3DAE3", - "Placeholder.background": "#2f343f", - "Placeholder.borderColor": "#404552", - "Placeholder.foreground": "#D3DAE3", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#2f343f", + "borderColor": "#404552", + "foreground": "#D3DAE3", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#2f343f", "stroke.acceleratorForeground": "#8b9eb5" }, @@ -809,7 +895,7 @@ "selectedBranchBackground": "#2f343f" }, "GitCommits": { - "graphColor": "#08507C" + "graphColor": "#3F3F46" }, "GitLog": { "localBranchIconColor": "#42A5F5", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#8b9eb5", - "Commit.currentBranchBackground": "#393f4c" + "Commit.currentBranchBackground": "#393f4c", + "Commit.hoveredBackground": "#08507C70" }, "RefLabel": { "foreground": "#FFFFFF", - "backgroundBase": "#08507C" + "backgroundBase": "#3F3F46" } }, "Viewport": { @@ -840,16 +927,22 @@ "foreground": "#D3DAE3" }, "WelcomeScreen": { + "AssociatedComponent.background": "#2f343f", "background": "#2f343f", "borderColor": "#2f343f", "captionBackground": "#262b33", "captionForeground": "#D3DAE3", + "Details.background": "#2f343f", "footerBackground": "#262b33", "footerForeground": "#D3DAE3", "headerBackground": "#2f343f", "headerForeground": "#D3DAE3", + "List.background": "#262b33", "separatorColor": "#404552", + "SidePanel.background": "#393f4c", "Projects": { + "actions.background": "#262b33", + "actions.selectionBackground": "#3F3F46", "background": "#393f4c", "selectionBackground": "#8888FF", "selectionInactiveBackground": "#393f4c" @@ -881,8 +974,8 @@ "Actions.Yellow": "#F9EE98", "Checkbox.Background.Default": "#262b33", "Checkbox.Background.Default.Dark": "#262b33", - "Checkbox.Background.Disabled": "#37373d", - "Checkbox.Background.Disabled.Dark": "#37373d", + "Checkbox.Background.Disabled": "#474B57", + "Checkbox.Background.Disabled.Dark": "#474B57", "Checkbox.Border.Default": "#404552", "Checkbox.Border.Default.Dark": "#404552", "Checkbox.Border.Disabled": "#D3DAE3", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark Contrast.theme.json index 97f50d4d..957ed9e9 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark Contrast.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Atom One Dark.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/onedark.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#979FAD", @@ -17,7 +23,7 @@ "inactiveBackground": "#3c4150", "inactiveForeground": "#979FAD", "infoForeground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionBackgroundInactive": "#2F333D", "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#2F333D", @@ -33,7 +39,7 @@ "pressedBorderColor": "#2979ff50" }, "Autocomplete": { - "selectionBackground": "#4D515D" + "selectionBackground": "#3A3F4B" }, "Borders.ContrastBorderColor": "#282C34", "Borders.color": "#282C34", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#282C34", "Tooltip.background": "#282C34" }, - "Content.background": "#21252B", + "Content": { + "background": "#21252B", + "selectionBackground": "#3A3F4B" + }, "CheckBox": { "background": "#282C34", "disabledText": "#6B727D", @@ -86,9 +95,17 @@ "disabledBackground": "#282C34", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#979FAD", + "AccessEnabled": { + "accessDot": "#2979ff", + "dropdownBorder": "#2F333D", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#282C34", "foreground": "#979FAD", @@ -104,6 +121,7 @@ }, "background": "#21252B", "buttonBackground": "#3A3F4B", + "darcula.hoveredArrowButtonForeground": "#2979ff", "disabledForeground": "#6B727D", "foreground": "#979FAD", "modifiedItemForeground": "#2979ff", @@ -123,8 +141,8 @@ "selectedGrayedForeground": "#FFFFFF", "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#979FAD", - "selectionInactiveBackground": "#4D515D50", - "selectionBackground": "#4D515D80", + "selectionInactiveBackground": "#3A3F4B50", + "selectionBackground": "#3A3F4B80", "selectionForeground": "#FFFFFF", "selectionInfoForeground": "#FFFFFF" }, @@ -168,11 +186,13 @@ "hoverBackground": "#383E49", "hoverColor": "#21252B", "hoverMaskColor": "#383D48", + "inactiveColoredTabBackground": "#282C34", "inactiveColoredFileBackground": "#3A3F4B", - "inactiveUnderlineColor": "#6B727D", + "inactiveUnderlineColor": "#2979ff", "inactiveMaskColor": "#21252B", "underlineColor": "#2979ff", - "underlinedTabBackground": "#383E49" + "underlinedTabBackground": "#383E49", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#282C34", "DialogWrapper.southPanelBackground": "#282C34", @@ -193,20 +213,22 @@ "foreground": "#979FAD", "inactiveBackground": "#282C34", "inactiveForeground": "#6B727D", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, "EditorTabs": { "borderColor": "#2F333D", + "hoverBackground": "#383D48", "hoverColor": "#383D48", "hoverMaskColor": "#383D48", "inactiveMaskColor": "#282C34", - "inactiveColoredFileBackground": "#282C342", + "inactiveColoredFileBackground": "#282C34", "inactiveUnderlineColor": "#6B727D", "selectedForeground": "#979FAD", "selectedBackground": "#383E49", "underlineColor": "#2979ff", - "underlinedTabBackground": "#383E49" + "underlinedTabBackground": "#383E49", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#282C34", @@ -246,6 +268,7 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#383E49" }, + "GotItTooltip.borderColor": "#282C34", "Group": { "disabledSeparatorColor": "#282C34", "separatorColor": "#282C34" @@ -288,7 +311,8 @@ "disabledText": "#6B727D", "foreground": "#979FAD", "infoForeground": "#979FAD", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#979FAD" }, "Link": { "activeForeground": "#2979ff", @@ -301,10 +325,12 @@ "List": { "background": "#2F333D", "foreground": "#979FAD", - "selectionBackground": "#4D515D50", + "hoverBackground": "#3A3F4B70", + "hoverInactiveBackground": "#383E49", + "selectionBackground": "#3A3F4B50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#3A3F4B80" + "selectionInactiveBackground": "#3A3F4B70" }, "material": { "background": "#282C34", @@ -332,7 +358,7 @@ "disabledBackground": "#2F333D", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF", "separatorColor": "#282C34" }, @@ -343,7 +369,7 @@ "disabledForeground": "#6B727D", "foreground": "#979FAD", "highlight": "#282C34", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF", "shadow": "#21252B" }, @@ -355,7 +381,7 @@ "disabledBackground": "#282C34", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, "NavBar": { @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#2F333D", "borderColor": "#383E49", - "currentOverloadBackground": "#383E49", + "currentOverloadBackground": "#383D48", "currentParameterForeground": "#2979ff", "disabledForeground": "#6B727D", "foreground": "#979FAD", @@ -429,9 +455,10 @@ "background": "#282C34", "disabledForeground": "#6B727D", "eapTagBackground": "#383D48", - "lightSelectionBackground": "#4D515D", + "hoverBackground": "#3A3F4B70", + "lightSelectionBackground": "#383E49", "paidTagBackground": "#383D48", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "tagForeground": "#2979ff", "tagBackground": "#383D48", "trialTagBackground": "#383D48", @@ -442,7 +469,7 @@ "installFocusedBackground": "#383D48", "installFillForeground": "#6B727D", "installFillBackground": "#3A3F4B", - "updateBackground": "#3A3F4B", + "updateBackground": "#2979ff", "updateBorderColor": "#3A3F4B", "updateForeground": "#979FAD" }, @@ -514,9 +541,10 @@ "disabledBackground": "#282C34", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#282C34", "ScrollBar": { "background": "#282C34", "hoverThumbBorderColor": "#2979ff", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#2979ff", - "startBackground": "#2979ff" + "startBackground": "#2979ff", + "endColor": "#2979ff", + "startColor": "#2979ff" }, "SearchField.errorBackground": "#282C34", + "SearchOption": { + "selectedBackground": "#383E49" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#979FAD", + "Repeated.File.Foreground": "#979FAD" + }, "Separator": { "background": "#2F333D", "foreground": "#2F333D", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#2F333D", "StatusBar": { - "borderColor": "#282C34" + "borderColor": "#282C34", + "hoverBackground": "#383D48", + "LightEditBackground": "#383E49" }, "TabbedPane": { "background": "#282C34", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#21252B", "Table": { + "alternativeRowBackground": "#21252B", "background": "#282C34", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#6B727D", "dropLineColor": "#2979ff", "dropLineShortColor": "#2979ff", "focusCellBackground": "#383E49", @@ -653,6 +694,8 @@ "foreground": "#979FAD", "gridColor": "#282C34", "highlightOuter": "#383E49", + "hoverBackground": "#3A3F4B70", + "hoverInactiveBackground": "#383E49", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#979FAD", "lightSelectionInactiveBackground": "#2F333D", @@ -730,7 +773,7 @@ "Actions.background": "#282C34", "Actions.infoForeground": "#979FAD", "background": "#282C34", - "borderColor": "#383D48", + "borderColor": "#282C34", "foreground": "#979FAD", "infoForeground": "#979FAD", "separatorColor": "#282C34", @@ -751,50 +794,93 @@ "background": "#282C34" }, "HeaderTab": { + "borderColor": "#383D48", "hoverBackground": "#383D48", - "hoverInactiveBackground": "#2F333D", + "hoverInactiveBackground": "#383D48", "inactiveUnderlineColor": "#2979ff", "selectedBackground": "#21252B", "selectedInactiveBackground": "#21252B", "underlineColor": "#2979ff", - "underlinedTabBackground": "#383D48", - "underlinedTabInactiveBackground": "#2F333D" + "underlinedTabBackground": "#383E49", + "underlinedTabInactiveBackground": "#2F333D", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#979FAD" } }, "Tree": { "background": "#21252B", "foreground": "#979FAD", "hash": "#282C34", + "hoverBackground": "#3A3F4B70", + "hoverInactiveBackground": "#383E49", "modifiedItemForeground": "#2979ff", "rowHeight": 28, - "selectionBackground": "#3A3F4B80", + "selectionBackground": "#3A3F4B70", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#3A3F4B80", + "selectionInactiveBackground": "#3A3F4B70", "textBackground": "#21252B" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#282C34", - "ColorPicker.background": "#282C34", - "ColorPicker.foreground": "#979FAD", - "Component.borderColor": "#282C34", - "Component.background": "#282C34", - "Component.foreground": "#979FAD", - "Connector.borderColor": "#282C34", - "Connector.hoverBorderColor": "#383D48", + "Canvas.background": "#21252B", + "ColorPicker": { + "background": "#282C34", + "foreground": "#979FAD" + }, + "Component": { + "borderColor": "#282C34", + "background": "#282C34", + "foreground": "#979FAD", + "hoverBorderColor": "#383D48" + }, + "Connector": { + "borderColor": "#282C34", + "hoverBorderColor": "#383D48" + }, "Canvas.background": "#21252B", "highStroke.foreground": "#979FAD", "Label.foreground": "#979FAD", - "List.selectionBackground": "#3A3F4B80", - "Panel.borderColor": "#282C34", - "Panel.background": "#282C34", + "List.selectionBackground": "#3A3F4B70", + "motion": { + "borderColor": "#282C34", + "Component.foreground": "#979FAD", + "ConstraintSetText.foreground": "#979FAD", + "ConstraintSet.background": "#2F333D", + "CSPanel.SelectedFocusBackground": "#3A3F4B", + "CSPanel.SelectedBackground": "#3A3F4B70", + "cs_FocusText.infoForeground": "#979FAD", + "CursorTextColor.foreground": "#979FAD", + "HoverColor.disabledBackground": "#6B727D", + "motionGraph.background": "#282C34", + "Notification.background": "#282C34", + "ourAvg.background": "#2F333D", + "ourCS.background": "#2F333D", + "ourCS_Border.borderColor": "#282C34", + "ourCS_TextColor.foreground": "#979FAD", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#383E49", + "ourCS_SelectedBorder.pressedBorderColor": "#383D48", + "ourML_BarColor.separatorColor": "#282C34", + "PrimaryPanel.background": "#21252B", + "SecondaryPanel.background": "#282C34", + "SecondaryPanel.header.foreground": "#979FAD", + "SecondaryPanel.header.background": "#21252B", + "timeLine.disabledBorderColor": "#282C34" + }, + "Panel": { + "borderColor": "#282C34", + "background": "#282C34" + }, "percent.foreground": "#979FAD", - "Placeholder.background": "#282C34", - "Placeholder.borderColor": "#282C34", - "Placeholder.foreground": "#979FAD", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#282C34", + "borderColor": "#282C34", + "foreground": "#979FAD", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#282C34", "stroke.acceleratorForeground": "#979FAD" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#979FAD", - "Commit.currentBranchBackground": "#2F333D" + "Commit.currentBranchBackground": "#2F333D", + "Commit.hoveredBackground": "#3A3F4B70" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,18 +927,24 @@ "foreground": "#979FAD" }, "WelcomeScreen": { + "AssociatedComponent.background": "#282C34", "background": "#282C34", "borderColor": "#282C34", "captionBackground": "#21252B", "captionForeground": "#979FAD", + "Details.background": "#282C34", "footerBackground": "#21252B", "footerForeground": "#979FAD", "headerBackground": "#282C34", "headerForeground": "#979FAD", + "List.background": "#21252B", "separatorColor": "#282C34", + "SidePanel.background": "#2F333D", "Projects": { + "actions.background": "#21252B", + "actions.selectionBackground": "#383D48", "background": "#2F333D", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionInactiveBackground": "#2F333D" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark.theme.json index e1407de6..be20805f 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Dark.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Atom One Dark.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/onedark.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#979FAD", @@ -17,7 +23,7 @@ "inactiveBackground": "#3c4150", "inactiveForeground": "#979FAD", "infoForeground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionBackgroundInactive": "#2F333D", "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#2F333D", @@ -33,7 +39,7 @@ "pressedBorderColor": "#2979ff50" }, "Autocomplete": { - "selectionBackground": "#4D515D" + "selectionBackground": "#3A3F4B" }, "Borders.ContrastBorderColor": "#282C34", "Borders.color": "#282C34", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#282C34", "Tooltip.background": "#282C34" }, - "Content.background": "#21252B", + "Content": { + "background": "#21252B", + "selectionBackground": "#3A3F4B" + }, "CheckBox": { "background": "#282C34", "disabledText": "#6B727D", @@ -86,9 +95,17 @@ "disabledBackground": "#282C34", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#979FAD", + "AccessEnabled": { + "accessDot": "#2979ff", + "dropdownBorder": "#2F333D", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#282C34", "foreground": "#979FAD", @@ -104,6 +121,7 @@ }, "background": "#282C34", "buttonBackground": "#3A3F4B", + "darcula.hoveredArrowButtonForeground": "#2979ff", "disabledForeground": "#6B727D", "foreground": "#979FAD", "modifiedItemForeground": "#2979ff", @@ -123,8 +141,8 @@ "selectedGrayedForeground": "#FFFFFF", "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#979FAD", - "selectionInactiveBackground": "#4D515D50", - "selectionBackground": "#4D515D80", + "selectionInactiveBackground": "#3A3F4B50", + "selectionBackground": "#3A3F4B80", "selectionForeground": "#FFFFFF", "selectionInfoForeground": "#FFFFFF" }, @@ -168,11 +186,13 @@ "hoverBackground": "#383E49", "hoverColor": "#282C34", "hoverMaskColor": "#383D48", + "inactiveColoredTabBackground": "#282C34", "inactiveColoredFileBackground": "#3A3F4B", - "inactiveUnderlineColor": "#6B727D", + "inactiveUnderlineColor": "#2979ff", "inactiveMaskColor": "#282C34", "underlineColor": "#2979ff", - "underlinedTabBackground": "#383E49" + "underlinedTabBackground": "#383E49", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#282C34", "DialogWrapper.southPanelBackground": "#282C34", @@ -193,20 +213,22 @@ "foreground": "#979FAD", "inactiveBackground": "#282C34", "inactiveForeground": "#6B727D", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, "EditorTabs": { "borderColor": "#2F333D", + "hoverBackground": "#383D48", "hoverColor": "#383D48", "hoverMaskColor": "#383D48", "inactiveMaskColor": "#282C34", - "inactiveColoredFileBackground": "#282C342", + "inactiveColoredFileBackground": "#282C34", "inactiveUnderlineColor": "#6B727D", "selectedForeground": "#979FAD", "selectedBackground": "#383E49", "underlineColor": "#2979ff", - "underlinedTabBackground": "#383E49" + "underlinedTabBackground": "#383E49", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#282C34", @@ -246,6 +268,7 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#383E49" }, + "GotItTooltip.borderColor": "#282C34", "Group": { "disabledSeparatorColor": "#282C34", "separatorColor": "#282C34" @@ -288,7 +311,8 @@ "disabledText": "#6B727D", "foreground": "#979FAD", "infoForeground": "#979FAD", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#979FAD" }, "Link": { "activeForeground": "#2979ff", @@ -301,10 +325,12 @@ "List": { "background": "#2F333D", "foreground": "#979FAD", - "selectionBackground": "#4D515D50", + "hoverBackground": "#3A3F4B70", + "hoverInactiveBackground": "#383E49", + "selectionBackground": "#3A3F4B50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#3A3F4B80" + "selectionInactiveBackground": "#3A3F4B70" }, "material": { "background": "#282C34", @@ -332,7 +358,7 @@ "disabledBackground": "#2F333D", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF", "separatorColor": "#282C34" }, @@ -343,7 +369,7 @@ "disabledForeground": "#6B727D", "foreground": "#979FAD", "highlight": "#282C34", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF", "shadow": "#282C34" }, @@ -355,7 +381,7 @@ "disabledBackground": "#282C34", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, "NavBar": { @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#2F333D", "borderColor": "#383E49", - "currentOverloadBackground": "#383E49", + "currentOverloadBackground": "#383D48", "currentParameterForeground": "#2979ff", "disabledForeground": "#6B727D", "foreground": "#979FAD", @@ -429,9 +455,10 @@ "background": "#282C34", "disabledForeground": "#6B727D", "eapTagBackground": "#383D48", - "lightSelectionBackground": "#4D515D", + "hoverBackground": "#3A3F4B70", + "lightSelectionBackground": "#383E49", "paidTagBackground": "#383D48", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "tagForeground": "#2979ff", "tagBackground": "#383D48", "trialTagBackground": "#383D48", @@ -442,7 +469,7 @@ "installFocusedBackground": "#383D48", "installFillForeground": "#6B727D", "installFillBackground": "#3A3F4B", - "updateBackground": "#3A3F4B", + "updateBackground": "#2979ff", "updateBorderColor": "#3A3F4B", "updateForeground": "#979FAD" }, @@ -514,9 +541,10 @@ "disabledBackground": "#282C34", "disabledForeground": "#6B727D", "foreground": "#979FAD", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#282C34", "ScrollBar": { "background": "#282C34", "hoverThumbBorderColor": "#2979ff", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#2979ff", - "startBackground": "#2979ff" + "startBackground": "#2979ff", + "endColor": "#2979ff", + "startColor": "#2979ff" }, "SearchField.errorBackground": "#282C34", + "SearchOption": { + "selectedBackground": "#383E49" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#979FAD", + "Repeated.File.Foreground": "#979FAD" + }, "Separator": { "background": "#2F333D", "foreground": "#2F333D", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#2F333D", "StatusBar": { - "borderColor": "#282C34" + "borderColor": "#282C34", + "hoverBackground": "#383D48", + "LightEditBackground": "#383E49" }, "TabbedPane": { "background": "#282C34", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#282C34", "Table": { + "alternativeRowBackground": "#21252B", "background": "#282C34", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#6B727D", "dropLineColor": "#2979ff", "dropLineShortColor": "#2979ff", "focusCellBackground": "#383E49", @@ -653,6 +694,8 @@ "foreground": "#979FAD", "gridColor": "#282C34", "highlightOuter": "#383E49", + "hoverBackground": "#3A3F4B70", + "hoverInactiveBackground": "#383E49", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#979FAD", "lightSelectionInactiveBackground": "#2F333D", @@ -730,7 +773,7 @@ "Actions.background": "#282C34", "Actions.infoForeground": "#979FAD", "background": "#282C34", - "borderColor": "#383D48", + "borderColor": "#282C34", "foreground": "#979FAD", "infoForeground": "#979FAD", "separatorColor": "#282C34", @@ -751,50 +794,93 @@ "background": "#282C34" }, "HeaderTab": { + "borderColor": "#383D48", "hoverBackground": "#383D48", - "hoverInactiveBackground": "#2F333D", + "hoverInactiveBackground": "#383D48", "inactiveUnderlineColor": "#2979ff", "selectedBackground": "#21252B", "selectedInactiveBackground": "#21252B", "underlineColor": "#2979ff", - "underlinedTabBackground": "#383D48", - "underlinedTabInactiveBackground": "#2F333D" + "underlinedTabBackground": "#383E49", + "underlinedTabInactiveBackground": "#2F333D", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#979FAD" } }, "Tree": { "background": "#282C34", "foreground": "#979FAD", "hash": "#282C34", + "hoverBackground": "#3A3F4B70", + "hoverInactiveBackground": "#383E49", "modifiedItemForeground": "#2979ff", "rowHeight": 28, - "selectionBackground": "#3A3F4B80", + "selectionBackground": "#3A3F4B70", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#3A3F4B80", + "selectionInactiveBackground": "#3A3F4B70", "textBackground": "#282C34" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#282C34", - "ColorPicker.background": "#282C34", - "ColorPicker.foreground": "#979FAD", - "Component.borderColor": "#282C34", - "Component.background": "#282C34", - "Component.foreground": "#979FAD", - "Connector.borderColor": "#282C34", - "Connector.hoverBorderColor": "#383D48", + "Canvas.background": "#21252B", + "ColorPicker": { + "background": "#282C34", + "foreground": "#979FAD" + }, + "Component": { + "borderColor": "#282C34", + "background": "#282C34", + "foreground": "#979FAD", + "hoverBorderColor": "#383D48" + }, + "Connector": { + "borderColor": "#282C34", + "hoverBorderColor": "#383D48" + }, "Canvas.background": "#21252B", "highStroke.foreground": "#979FAD", "Label.foreground": "#979FAD", - "List.selectionBackground": "#3A3F4B80", - "Panel.borderColor": "#282C34", - "Panel.background": "#282C34", + "List.selectionBackground": "#3A3F4B70", + "motion": { + "borderColor": "#282C34", + "Component.foreground": "#979FAD", + "ConstraintSetText.foreground": "#979FAD", + "ConstraintSet.background": "#2F333D", + "CSPanel.SelectedFocusBackground": "#3A3F4B", + "CSPanel.SelectedBackground": "#3A3F4B70", + "cs_FocusText.infoForeground": "#979FAD", + "CursorTextColor.foreground": "#979FAD", + "HoverColor.disabledBackground": "#6B727D", + "motionGraph.background": "#282C34", + "Notification.background": "#282C34", + "ourAvg.background": "#2F333D", + "ourCS.background": "#2F333D", + "ourCS_Border.borderColor": "#282C34", + "ourCS_TextColor.foreground": "#979FAD", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#383E49", + "ourCS_SelectedBorder.pressedBorderColor": "#383D48", + "ourML_BarColor.separatorColor": "#282C34", + "PrimaryPanel.background": "#21252B", + "SecondaryPanel.background": "#282C34", + "SecondaryPanel.header.foreground": "#979FAD", + "SecondaryPanel.header.background": "#21252B", + "timeLine.disabledBorderColor": "#282C34" + }, + "Panel": { + "borderColor": "#282C34", + "background": "#282C34" + }, "percent.foreground": "#979FAD", - "Placeholder.background": "#282C34", - "Placeholder.borderColor": "#282C34", - "Placeholder.foreground": "#979FAD", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#282C34", + "borderColor": "#282C34", + "foreground": "#979FAD", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#282C34", "stroke.acceleratorForeground": "#979FAD" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#979FAD", - "Commit.currentBranchBackground": "#2F333D" + "Commit.currentBranchBackground": "#2F333D", + "Commit.hoveredBackground": "#3A3F4B70" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,18 +927,24 @@ "foreground": "#979FAD" }, "WelcomeScreen": { + "AssociatedComponent.background": "#282C34", "background": "#282C34", "borderColor": "#282C34", "captionBackground": "#21252B", "captionForeground": "#979FAD", + "Details.background": "#282C34", "footerBackground": "#21252B", "footerForeground": "#979FAD", "headerBackground": "#282C34", "headerForeground": "#979FAD", + "List.background": "#21252B", "separatorColor": "#282C34", + "SidePanel.background": "#2F333D", "Projects": { + "actions.background": "#21252B", + "actions.selectionBackground": "#383D48", "background": "#2F333D", - "selectionBackground": "#4D515D", + "selectionBackground": "#3A3F4B", "selectionInactiveBackground": "#2F333D" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light Contrast.theme.json index fac18fc2..264a0a0b 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light Contrast.theme.json @@ -1,29 +1,35 @@ { - "name": "Atom One Light Contrast", + "name": "Atom One Light", "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Atom One Light.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/onelight.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { - "acceleratorSelectionForeground": "#7f7f7f", - "background": "#F4F4F4", + "acceleratorSelectionForeground": "#9D9D9F", + "background": "#FAFAFA", "borderColor": "#DBDBDC", - "disabledBackground": "#CACACB", - "disabledForeground": "#b8b8b9", - "disabledText": "#b8b8b9", - "focusColor": "#FFFFFF", + "disabledBackground": "#DBDBDC", + "disabledForeground": "#424243", + "disabledText": "#424243", + "focusColor": "#EAEAEB", "focusedBorderColor": "#2979ff", "foreground": "#232324", - "inactiveBackground": "#CACACB", - "inactiveForeground": "#7f7f7f", - "infoForeground": "#7f7f7f", - "selectionBackground": "#FFFFFF", + "inactiveBackground": "#DBDBDC", + "inactiveForeground": "#9D9D9F", + "infoForeground": "#9D9D9F", + "selectionBackground": "#DBDBDC", "selectionBackgroundInactive": "#EAEAEB", "selectionForeground": "#232324", "selectionInactiveBackground": "#EAEAEB", "separatorColor": "#DBDBDC" }, - "activeCaption": "#F4F4F4", + "activeCaption": "#FAFAFA", "ActionButton": { "hoverBackground": "#2979ff50", "hoverBorderColor": "#2979ff50", @@ -33,13 +39,13 @@ "pressedBorderColor": "#2979ff50" }, "Autocomplete": { - "selectionBackground": "#FFFFFF" + "selectionBackground": "#DBDBDC" }, - "Borders.ContrastBorderColor": "#F4F4F4", + "Borders.ContrastBorderColor": "#FAFAFA", "Borders.color": "#DBDBDC", "Button": { "arc": 0, - "background": "#F4F4F4", + "background": "#FAFAFA", "default": { "endBackground": "#DBDBDC", "endBorderColor": "#DBDBDC", @@ -51,15 +57,15 @@ "startBorderColor": "#DBDBDC" }, "disabledBorderColor": "#DBDBDC", - "disabledText": "#b8b8b9", + "disabledText": "#424243", "endBackground": "#DBDBDC", "endBorderColor": "#DBDBDC", - "focus": "#FFFFFF", + "focus": "#EAEAEB", "focusedBorderColor": "#2979ff", - "foreground": "#7f7f7f", + "foreground": "#9D9D9F", "highlight": "#232324", "mt.background": "#DBDBDC", - "mt.foreground": "#7f7f7f", + "mt.foreground": "#9D9D9F", "mt.selectedForeground": "#232324", "mt.selection.color1": "#DBDBDC", "mt.selection.color2": "#DBDBDC", @@ -72,25 +78,36 @@ "Tooltip.borderColor": "#DBDBDC", "Tooltip.background": "#F2F2F2" }, - "Content.background": "#eaeaeb", + "Content": { + "background": "#FFFFFF", + "selectionBackground": "#DBDBDC" + }, "CheckBox": { - "background": "#F4F4F4", - "disabledText": "#b8b8b9", + "background": "#FAFAFA", + "disabledText": "#424243", "foreground": "#232324", "select": "#2979ff" }, "CheckBoxMenuItem": { - "acceleratorForeground": "#7f7f7f", - "acceleratorSelectionForeground": "#7f7f7f", - "background": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "acceleratorForeground": "#9D9D9F", + "acceleratorSelectionForeground": "#9D9D9F", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, + "CodeWithMe": { + "Avatar.foreground": "#232324", + "AccessEnabled": { + "accessDot": "#2979ff", + "dropdownBorder": "#EAEAEB", + "pillBackground": "$second" + } + }, "ColorChooser": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324", "swatchesDefaultRecentColor": "#232324" }, @@ -98,13 +115,14 @@ "ComboBox": { "ArrowButton": { "background": "#DBDBDC", - "disabledIconColor": "#b8b8b9", + "disabledIconColor": "#424243", "iconColor": "#232324", - "nonEditableBackground": "#F4F4F4" + "nonEditableBackground": "#FAFAFA" }, - "background": "#eaeaeb", + "background": "#FFFFFF", "buttonBackground": "#DBDBDC", - "disabledForeground": "#b8b8b9", + "darcula.hoveredArrowButtonForeground": "#2979ff", + "disabledForeground": "#424243", "foreground": "#232324", "modifiedItemForeground": "#2979ff", "nonEditableBackground": "#EAEAEB", @@ -116,103 +134,107 @@ "CompletionPopup": { "background": "#EAEAEB", "foreground": "#232324", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "matchForeground": "#2979ff", "matchSelectionForeground": "#2979ff", "nonFocusedState": "false", "selectedGrayedForeground": "#232324", "selectionGrayForeground": "#232324", - "selectionInactiveInfoForeground": "#7f7f7f", - "selectionInactiveBackground": "#FFFFFF50", - "selectionBackground": "#FFFFFF80", + "selectionInactiveInfoForeground": "#9D9D9F", + "selectionInactiveBackground": "#DBDBDC50", + "selectionBackground": "#DBDBDC80", "selectionForeground": "#232324", "selectionInfoForeground": "#232324" }, "Component": { "arc": 4, - "borderColor": "#FFFFFF", + "borderColor": "#EAEAEB", "disabledBorderColor": "#DBDBDC", "focusColor": "#2979ff", "focusedBorderColor": "#2979ff", "hoverIconColor": "#2979ff", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "iconColor": "#232324" }, - "control": "#F4F4F4", - "controlText": "#7f7f7f", + "control": "#FAFAFA", + "controlText": "#9D9D9F", "Counter": { "background": "#2979ff", "foreground": "#232324" }, "Debugger": { "Variables": { - "collectingDataForeground": "#7f7f7f", + "collectingDataForeground": "#9D9D9F", "changedValueForeground": "#2979ff", "errorMessageForeground": "#E4564A", - "evaluatingExpressionForeground": "#7f7f7f", + "evaluatingExpressionForeground": "#9D9D9F", "exceptionForeground": "#C18401", "modifyingValueForeground": "#2979ff", "valueForeground": "#2979ff" } }, "DebuggerTabs": { - "selectedBackground": "#FFFFFF", - "underlinedTabBackground": "#FFFFFF" + "selectedBackground": "#EAEAEB", + "underlinedTabBackground": "#EAEAEB" }, "DebuggerPopup": { - "borderColor": "#FFFFFF" + "borderColor": "#EAEAEB" }, "DefaultTabs": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", "hoverBackground": "#DBDBDC", - "hoverColor": "#eaeaeb", - "hoverMaskColor": "#FFFFFF", + "hoverColor": "#FFFFFF", + "hoverMaskColor": "#EAEAEB", + "inactiveColoredTabBackground": "#FAFAFA", "inactiveColoredFileBackground": "#DBDBDC", - "inactiveUnderlineColor": "#b8b8b9", - "inactiveMaskColor": "#eaeaeb", + "inactiveUnderlineColor": "#2979ff", + "inactiveMaskColor": "#FFFFFF", "underlineColor": "#2979ff", - "underlinedTabBackground": "#DBDBDC" + "underlinedTabBackground": "#DBDBDC", + "underlinedTabForeground": "#232324" }, - "Desktop.background": "#F4F4F4", - "DialogWrapper.southPanelBackground": "#F4F4F4", - "DialogWrapper.southPanelDivider": "#F4F4F4", + "Desktop.background": "#FAFAFA", + "DialogWrapper.southPanelBackground": "#FAFAFA", + "DialogWrapper.southPanelDivider": "#FAFAFA", "DragAndDrop": { - "areaBackground": "#F4F4F4", - "areaBorderColor": "#F4F4F4", + "areaBackground": "#FAFAFA", + "areaBorderColor": "#FAFAFA", "areaForeground": "#232324" }, "Editor": { - "background": "#eaeaeb", + "background": "#FFFFFF", "foreground": "#232324", - "shortcutForeground": "#7f7f7f" + "shortcutForeground": "#9D9D9F" }, "EditorPane": { - "background": "#eaeaeb", + "background": "#FFFFFF", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveBackground": "#F4F4F4", - "inactiveForeground": "#b8b8b9", - "selectionBackground": "#FFFFFF", + "inactiveBackground": "#FAFAFA", + "inactiveForeground": "#424243", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "EditorTabs": { "borderColor": "#EAEAEB", - "hoverColor": "#FFFFFF", - "hoverMaskColor": "#FFFFFF", - "inactiveMaskColor": "#F4F4F4", - "inactiveColoredFileBackground": "#F4F4F42", - "inactiveUnderlineColor": "#b8b8b9", + "hoverBackground": "#EAEAEB", + "hoverColor": "#EAEAEB", + "hoverMaskColor": "#EAEAEB", + "inactiveMaskColor": "#FAFAFA", + "inactiveColoredFileBackground": "#FAFAFA", + "inactiveUnderlineColor": "#424243", "selectedForeground": "#232324", "selectedBackground": "#DBDBDC", "underlineColor": "#2979ff", - "underlinedTabBackground": "#DBDBDC" + "underlinedTabBackground": "#DBDBDC", + "underlinedTabForeground": "#232324" }, "EditorGroupsTabs": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#EAEAEB", - "hoverBackground": "#FFFFFF", - "hoverColor": "#FFFFFF", + "hoverBackground": "#EAEAEB", + "hoverColor": "#EAEAEB", "inactiveUnderlineColor": "#2979ff", "underlineColor": "#2979ff", "underlinedTabBackground": "#DBDBDC", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#CACACB", + "Yellow": "#DBDBDC", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -238,136 +260,140 @@ }, "Focus.color": "#DBDBDC", "FormattedTextField": { - "background": "#eaeaeb", + "background": "#FFFFFF", "caretForeground": "#2979ff", "foreground": "#232324", "inactiveBackground": "#DBDBDC", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionForeground": "#232324", "selectionBackground": "#DBDBDC" }, + "GotItTooltip.borderColor": "#F2F2F2", "Group": { "disabledSeparatorColor": "#DBDBDC", "separatorColor": "#DBDBDC" }, "GutterTooltip": { - "infoForeground": "#232324", - "lineSeparatorColor": "#F4F4F4" + "infoForeground": "#9D9D9F", + "lineSeparatorColor": "#FAFAFA" }, "HeaderColor": { - "active": "#F4F4F4", - "inactive": "#eaeaeb" + "active": "#FAFAFA", + "inactive": "#FFFFFF" }, "HelpTooltip": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#DBDBDC", "foreground": "#232324", - "infoForeground": "#7f7f7f", - "shortcutForeground": "#7f7f7f" + "infoForeground": "#9D9D9F", + "shortcutForeground": "#9D9D9F" }, "Hyperlink.linkColor": "#2979ff", "inactiveCaption": "#EAEAEB", - "inactiveCaptionBorder": "#F4F4F4", - "inactiveCaptionText": "#7f7f7f", - "info": "#7f7f7f", - "infoText": "#7f7f7f", + "inactiveCaptionBorder": "#FAFAFA", + "inactiveCaptionText": "#9D9D9F", + "info": "#9D9D9F", + "infoText": "#9D9D9F", "IdeStatusBar.border": "4,4,4,4", "InformationHint.borderColor": "#DBDBDC", "InplaceRefactoringPopup": { - "borderColor": "#F4F4F4" + "borderColor": "#FAFAFA" }, "InternalFrame": { "activeTitleForeground": "#232324", - "background": "#F4F4F4", - "inactiveTitleForeground": "#7f7f7f" + "background": "#FAFAFA", + "inactiveTitleForeground": "#9D9D9F" }, "Label": { - "background": "#F4F4F4", - "disabledForeground": "#b8b8b9", - "disabledShadow": "#F4F4F4", - "disabledText": "#b8b8b9", + "background": "#FAFAFA", + "disabledForeground": "#424243", + "disabledShadow": "#FAFAFA", + "disabledText": "#424243", "foreground": "#232324", - "infoForeground": "#7f7f7f", - "selectedForeground": "#232324" + "infoForeground": "#9D9D9F", + "selectedForeground": "#232324", + "selectedDisabledForeground": "#232324" }, "Link": { "activeForeground": "#2979ff", "hoverForeground": "#2979ff", "pressedForeground": "#2979ff", - "secondaryForeground": "#7f7f7f", + "secondaryForeground": "#9D9D9F", "visitedForeground": "#2979ff" }, "link.foreground": "#2979ff", "List": { "background": "#EAEAEB", "foreground": "#232324", - "selectionBackground": "#FFFFFF50", + "hoverBackground": "#DBDBDC80", + "hoverInactiveBackground": "#DBDBDC", + "selectionBackground": "#DBDBDC50", "selectionForeground": "#232324", "selectionInactiveForeground": "#232324", "selectionInactiveBackground": "#DBDBDC80" }, "material": { - "background": "#F4F4F4", + "background": "#FAFAFA", "branchColor": "#232324", - "contrast": "#eaeaeb", + "contrast": "#FFFFFF", "foreground": "#232324", "mergeCommits": "#DBDBDC", - "primaryColor": "#7f7f7f", + "primaryColor": "#9D9D9F", "selectionForeground": "#232324", - "tab.backgroundColor": "#F4F4F4", + "tab.backgroundColor": "#FAFAFA", "tab.borderColor": "#2979ff", - "tagColor": "#7f7f7f" + "tagColor": "#9D9D9F" }, "MemoryIndicator": { "allocatedBackground": "#EAEAEB", - "usedColor": "#FFFFFF", - "usedBackground": "#FFFFFF" + "usedColor": "#EAEAEB", + "usedBackground": "#EAEAEB" }, "Menu": { - "acceleratorForeground": "#7f7f7f", + "acceleratorForeground": "#9D9D9F", "acceleratorSelectionForeground": "#232324", - "background": "#F4F4F4", + "background": "#FAFAFA", "border": "4,2,4,2", "borderColor": "#EAEAEB", "disabledBackground": "#EAEAEB", - "disabledForeground": "#b8b8b9", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324", "separatorColor": "#DBDBDC" }, "MenuBar": { - "background": "#eaeaeb", - "borderColor": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "background": "#FFFFFF", + "borderColor": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "highlight": "#F4F4F4", - "selectionBackground": "#FFFFFF", + "highlight": "#FAFAFA", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324", - "shadow": "#eaeaeb" + "shadow": "#FFFFFF" }, "MenuItem": { - "acceleratorForeground": "#7f7f7f", + "acceleratorForeground": "#9D9D9F", "acceleratorSelectionForeground": "#232324", "border": "4,2,4,2", - "background": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "NavBar": { "arrowColor": "#232324", - "borderColor": "#F4F4F4" + "borderColor": "#FAFAFA" }, "NewClass": { "Panel": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "SearchField": { - "background": "#eaeaeb" + "background": "#FFFFFF" } }, "NewPSD.warning": "#2979ff", @@ -393,61 +419,62 @@ }, "OnePixelDivider.background": "#DBDBDC", "OptionPane": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324", "messageForeground": "#232324" }, "Outline": { "color": "#DBDBDC", "focusedColor": "#2979ff", - "disabledColor": "#b8b8b9" + "disabledColor": "#424243" }, "Panel": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324" }, "ParameterInfo": { "background": "#EAEAEB", "borderColor": "#DBDBDC", - "currentOverloadBackground": "#DBDBDC", + "currentOverloadBackground": "#EAEAEB", "currentParameterForeground": "#2979ff", - "disabledForeground": "#b8b8b9", + "disabledForeground": "#424243", "foreground": "#232324", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "lineSeparatorColor": "#DBDBDC" }, "PasswordField": { - "background": "#eaeaeb", + "background": "#FFFFFF", "capsLockIconColor": "#2979ff", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "Plugins": { - "background": "#F4F4F4", - "disabledForeground": "#b8b8b9", - "eapTagBackground": "#FFFFFF", - "lightSelectionBackground": "#FFFFFF", - "paidTagBackground": "#FFFFFF", - "selectionBackground": "#FFFFFF", + "background": "#FAFAFA", + "disabledForeground": "#424243", + "eapTagBackground": "#EAEAEB", + "hoverBackground": "#DBDBDC80", + "lightSelectionBackground": "#DBDBDC", + "paidTagBackground": "#EAEAEB", + "selectionBackground": "#DBDBDC", "tagForeground": "#2979ff", - "tagBackground": "#FFFFFF", - "trialTagBackground": "#FFFFFF", + "tagBackground": "#EAEAEB", + "trialTagBackground": "#EAEAEB", "Button": { "installBackground": "#DBDBDC", "installBorderColor": "#DBDBDC", "installForeground": "#232324", - "installFocusedBackground": "#FFFFFF", - "installFillForeground": "#b8b8b9", + "installFocusedBackground": "#EAEAEB", + "installFillForeground": "#424243", "installFillBackground": "#DBDBDC", - "updateBackground": "#DBDBDC", + "updateBackground": "#2979ff", "updateBorderColor": "#DBDBDC", "updateForeground": "#232324" }, "SearchField": { - "background": "#eaeaeb", + "background": "#FFFFFF", "borderColor": "#DBDBDC" }, "SectionHeader": { @@ -462,133 +489,143 @@ }, "Popup": { "Advertiser": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", "foreground": "#2979ff" }, - "borderColor": "#eaeaeb", - "inactiveBorderColor": "#F4F4F4", + "borderColor": "#FFFFFF", + "inactiveBorderColor": "#FAFAFA", "innerBorderColor": "#EAEAEB", "Header": { - "activeBackground": "#F4F4F4", - "inactiveBackground": "#eaeaeb" + "activeBackground": "#FAFAFA", + "inactiveBackground": "#FFFFFF" }, "paintBorder": true, "separatorForeground": "#232324", "separatorColor": "#EAEAEB", "Toolbar": { - "Floating.background": "#eaeaeb", - "background": "#eaeaeb", - "borderColor": "#eaeaeb" + "Floating.background": "#FFFFFF", + "background": "#FFFFFF", + "borderColor": "#FFFFFF" } }, "PopupMenu": { - "background": "#F4F4F4", + "background": "#FAFAFA", "border": "2,0,2,0", "foreground": "#232324", - "translucentBackground": "#F4F4F4" + "translucentBackground": "#FAFAFA" }, "PopupMenuSeparator.height": 10, "PopupMenuSeparator.stripeIndent": 5, "ProgressBar": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#2979ff", "indeterminateEndColor": "#2979ff", "indeterminateStartColor": "#2979ff", "progressColor": "#2979ff", - "selectionBackground": "#FFFFFF", - "trackColor": "#FFFFFF" + "selectionBackground": "#EAEAEB", + "trackColor": "#EAEAEB" }, "PsiViewer": { "referenceHighlightColor": "#2979ff" }, "RadioButton": { - "background": "#F4F4F4", - "disabledText": "#b8b8b9", + "background": "#FAFAFA", + "disabledText": "#424243", "foreground": "#232324" }, "RadioButtonMenuItem": { - "acceleratorForeground": "#7f7f7f", - "acceleratorSelectionForeground": "#7f7f7f", - "background": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "acceleratorForeground": "#9D9D9F", + "acceleratorSelectionForeground": "#9D9D9F", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, + "ScreenView.borderColor": "#DBDBDC", "ScrollBar": { - "background": "#F4F4F4", + "background": "#FAFAFA", "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "Mac": { "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430", + "trackColor": "#FAFAFA30", "Transparent": { "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430" + "trackColor": "#FAFAFA30" } }, - "thumb": "#FFFFFF", + "thumb": "#EAEAEB", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430", + "trackColor": "#FAFAFA30", "Transparent": { "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430" + "trackColor": "#FAFAFA30" } }, "SearchEverywhere": { "Advertiser": { - "background": "#eaeaeb", - "foreground": "#7f7f7f" + "background": "#FFFFFF", + "foreground": "#9D9D9F" }, "Header": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "List": { - "separatorForeground": "#7f7f7f", + "separatorForeground": "#9D9D9F", "separatorColor": "#DBDBDC" }, "SearchField": { - "background": "#F4F4F4", - "borderColor": "#eaeaeb", - "infoForeground": "#7f7f7f" + "background": "#FAFAFA", + "borderColor": "#FFFFFF", + "infoForeground": "#9D9D9F" }, "Tab": { "active.foreground": "#232324", "selectedForeground": "#232324", - "selectedBackground": "#FFFFFF" + "selectedBackground": "#EAEAEB" } }, "SearchMatch": { "endBackground": "#2979ff", - "startBackground": "#2979ff" + "startBackground": "#2979ff", + "endColor": "#2979ff", + "startColor": "#2979ff" }, "SearchField.errorBackground": "#F2F2F2", + "SearchOption": { + "selectedBackground": "#DBDBDC" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#9D9D9F", + "Repeated.File.Foreground": "#232324" + }, "Separator": { "background": "#EAEAEB", "foreground": "#EAEAEB", "separatorColor": "#EAEAEB" }, "SidePanel": { - "background": "#eaeaeb" + "background": "#FFFFFF" }, "Slider": { - "background": "#F4F4F4", + "background": "#FAFAFA", "buttonBorderColor": "#2979ff", "buttonColor": "#2979ff", "foreground": "#232324", @@ -599,38 +636,40 @@ "thumb": "#2979ff" }, "SpeedSearch": { - "background": "#FFFFFF", + "background": "#EAEAEB", "borderColor": "#DBDBDC", "foreground": "#232324", "errorForeground": "#232324" }, "Spinner": { - "background": "#F4F4F4", + "background": "#FAFAFA", "border": "3,3,3,3", "foreground": "#232324", "selectionForeground": "#232324" }, "SplitPane": { - "background": "#F4F4F4", - "highlight": "#eaeaeb" + "background": "#FAFAFA", + "highlight": "#FFFFFF" }, "SplitPaneDivider.draggingColor": "#EAEAEB", "StatusBar": { - "borderColor": "#F4F4F4" + "borderColor": "#FAFAFA", + "hoverBackground": "#EAEAEB", + "LightEditBackground": "#DBDBDC" }, "TabbedPane": { - "background": "#F4F4F4", - "contentAreaColor": "#FFFFFF", + "background": "#FAFAFA", + "contentAreaColor": "#EAEAEB", "contentBorderInsets": "3,1,1,1", "darkShadow": "#DBDBDC", - "disabledForeground": "#b8b8b9", - "disabledUnderlineColor": "#b8b8b9", + "disabledForeground": "#424243", + "disabledUnderlineColor": "#424243", "focus": "#DBDBDC", "focusColor": "#DBDBDC", "fontSizeOffset": 0, "foreground": "#232324", "highlight": "#DBDBDC", - "hoverColor": "#FFFFFF", + "hoverColor": "#EAEAEB", "labelShift": 0, "selectedForeground": "#232324", "selectedLabelShift": 0, @@ -641,162 +680,209 @@ "tabSelectionHeight": 2, "underlineColor": "#2979ff" }, - "TabbedPane.mt.tab.background": "#eaeaeb", + "TabbedPane.mt.tab.background": "#FFFFFF", "Table": { - "background": "#F4F4F4", + "alternativeRowBackground": "#FFFFFF", + "background": "#FAFAFA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#424243", "dropLineColor": "#2979ff", "dropLineShortColor": "#2979ff", "focusCellBackground": "#DBDBDC", "focusCellForeground": "#232324", "foreground": "#232324", - "gridColor": "#F4F4F4", + "gridColor": "#FAFAFA", "highlightOuter": "#DBDBDC", + "hoverBackground": "#DBDBDC80", + "hoverInactiveBackground": "#DBDBDC", "lightSelectionForeground": "#232324", - "lightSelectionInactiveForeground": "#7f7f7f", + "lightSelectionInactiveForeground": "#9D9D9F", "lightSelectionInactiveBackground": "#EAEAEB", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324", "selectionInactiveBackground": "#DBDBDC", "selectionInactiveForeground": "#232324", "sortIconColor": "#232324", - "stripeColor": "#eaeaeb" + "stripeColor": "#FFFFFF" }, "TableHeader": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", "bottomSeparatorColor": "#EAEAEB", "cellBorder": "4,0,4,0", - "disabledForeground": "#b8b8b9", + "disabledForeground": "#424243", "foreground": "#232324", "focusCellBackground": "#DBDBDC", "focusCellForeground": "#232324", "height": 25, "separatorColor": "#EAEAEB" }, - "text": "#7f7f7f", - "textInactiveText": "#7f7f7f", - "textText": "#7f7f7f", + "text": "#9D9D9F", + "textInactiveText": "#9D9D9F", + "textText": "#9D9D9F", "TextArea": { - "background": "#eaeaeb", + "background": "#FFFFFF", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "TextField": { - "background": "#eaeaeb", + "background": "#FFFFFF", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "TextPane": { - "background": "#eaeaeb", + "background": "#FFFFFF", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "TitlePane": { - "background": "#eaeaeb", - "Button.hoverBackground": "#FFFFFF", - "inactiveBackground": "#F4F4F4", - "infoForeground": "#7f7f7f", - "inactiveInfoForeground": "#7f7f7f" + "background": "#FFFFFF", + "Button.hoverBackground": "#EAEAEB", + "inactiveBackground": "#FAFAFA", + "infoForeground": "#9D9D9F", + "inactiveInfoForeground": "#9D9D9F" }, "TitledBorder.titleColor": "#232324", "ToggleButton": { "borderColor": "#DBDBDC", "buttonColor": "#232324", - "disabledText": "#b8b8b9", + "disabledText": "#424243", "foreground": "#232324", - "offForeground": "#F4F4F4", - "offBackground": "#F4F4F4", + "offForeground": "#FAFAFA", + "offBackground": "#FAFAFA", "onBackground": "#2979ff", "onForeground": "#2979ff" }, "ToolBar": { - "background": "#eaeaeb", - "borderHandleColor": "#7f7f7f", - "floatingForeground": "#7f7f7f", + "background": "#FFFFFF", + "borderHandleColor": "#9D9D9F", + "floatingForeground": "#9D9D9F", "foreground": "#232324" }, "ToolTip": { - "Actions.background": "#F4F4F4", - "Actions.infoForeground": "#7f7f7f", - "background": "#F4F4F4", - "borderColor": "#FFFFFF", + "Actions.background": "#FAFAFA", + "Actions.infoForeground": "#9D9D9F", + "background": "#F2F2F2", + "borderColor": "#DBDBDC", "foreground": "#232324", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "separatorColor": "#DBDBDC", - "shortcutForeground": "#7f7f7f" + "shortcutForeground": "#9D9D9F" }, "ToolWindow": { "Button": { "hoverBackground": "#DBDBDC", "selectedForeground": "#232324", - "selectedBackground": "#eaeaeb" + "selectedBackground": "#FFFFFF" }, "Header": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#EAEAEB", - "inactiveBackground": "#F4F4F4" + "inactiveBackground": "#FAFAFA" }, "HeaderCloseButton": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "HeaderTab": { - "hoverBackground": "#FFFFFF", + "borderColor": "#EAEAEB", + "hoverBackground": "#EAEAEB", "hoverInactiveBackground": "#EAEAEB", "inactiveUnderlineColor": "#2979ff", - "selectedBackground": "#eaeaeb", - "selectedInactiveBackground": "#eaeaeb", + "selectedBackground": "#FFFFFF", + "selectedInactiveBackground": "#FFFFFF", "underlineColor": "#2979ff", - "underlinedTabBackground": "#FFFFFF", - "underlinedTabInactiveBackground": "#EAEAEB" + "underlinedTabBackground": "#DBDBDC", + "underlinedTabInactiveBackground": "#EAEAEB", + "underlinedTabForeground": "#232324", + "underlinedTabInactiveForeground": "#232324" } }, "Tree": { - "background": "#eaeaeb", - "foreground": "#7f7f7f", + "background": "#FFFFFF", + "foreground": "#9D9D9F", "hash": "#DBDBDC", + "hoverBackground": "#DBDBDC80", + "hoverInactiveBackground": "#DBDBDC", "modifiedItemForeground": "#2979ff", "rowHeight": 28, "selectionBackground": "#DBDBDC80", "selectionForeground": "#232324", "selectionInactiveForeground": "#232324", "selectionInactiveBackground": "#DBDBDC80", - "textBackground": "#eaeaeb" + "textBackground": "#FFFFFF" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#DBDBDC", - "ColorPicker.background": "#F4F4F4", - "ColorPicker.foreground": "#232324", - "Component.borderColor": "#DBDBDC", - "Component.background": "#F4F4F4", - "Component.foreground": "#232324", - "Connector.borderColor": "#DBDBDC", - "Connector.hoverBorderColor": "#FFFFFF", - "Canvas.background": "#eaeaeb", + "Canvas.background": "#FFFFFF", + "ColorPicker": { + "background": "#FAFAFA", + "foreground": "#232324" + }, + "Component": { + "borderColor": "#DBDBDC", + "background": "#FAFAFA", + "foreground": "#232324", + "hoverBorderColor": "#EAEAEB" + }, + "Connector": { + "borderColor": "#DBDBDC", + "hoverBorderColor": "#EAEAEB" + }, + "Canvas.background": "#FFFFFF", "highStroke.foreground": "#232324", - "Label.foreground": "#7f7f7f", + "Label.foreground": "#9D9D9F", "List.selectionBackground": "#DBDBDC80", - "Panel.borderColor": "#DBDBDC", - "Panel.background": "#F4F4F4", + "motion": { + "borderColor": "#DBDBDC", + "Component.foreground": "#232324", + "ConstraintSetText.foreground": "#9D9D9F", + "ConstraintSet.background": "#EAEAEB", + "CSPanel.SelectedFocusBackground": "#DBDBDC", + "CSPanel.SelectedBackground": "#DBDBDC80", + "cs_FocusText.infoForeground": "#9D9D9F", + "CursorTextColor.foreground": "#232324", + "HoverColor.disabledBackground": "#424243", + "motionGraph.background": "#FAFAFA", + "Notification.background": "#F2F2F2", + "ourAvg.background": "#EAEAEB", + "ourCS.background": "#EAEAEB", + "ourCS_Border.borderColor": "#DBDBDC", + "ourCS_TextColor.foreground": "#9D9D9F", + "ourCS_SelectedFocusBackground.selectionForeground": "#232324", + "ourCS_SelectedBackground.selectionInactiveBackground": "#DBDBDC", + "ourCS_SelectedBorder.pressedBorderColor": "#EAEAEB", + "ourML_BarColor.separatorColor": "#DBDBDC", + "PrimaryPanel.background": "#FFFFFF", + "SecondaryPanel.background": "#FAFAFA", + "SecondaryPanel.header.foreground": "#9D9D9F", + "SecondaryPanel.header.background": "#FFFFFF", + "timeLine.disabledBorderColor": "#DBDBDC" + }, + "Panel": { + "borderColor": "#DBDBDC", + "background": "#FAFAFA" + }, "percent.foreground": "#232324", - "Placeholder.background": "#F4F4F4", - "Placeholder.borderColor": "#DBDBDC", - "Placeholder.foreground": "#232324", - "Placeholder.selectedForeground": "#232324", - "Preview.background": "#F4F4F4", - "stroke.acceleratorForeground": "#7f7f7f" + "Placeholder": { + "background": "#FAFAFA", + "borderColor": "#DBDBDC", + "foreground": "#232324", + "selectedForeground": "#232324" + }, + "Preview.background": "#FAFAFA", + "stroke.acceleratorForeground": "#9D9D9F" }, "ValidationTooltip": { "errorBackground": "#F2F2F2", @@ -806,95 +892,102 @@ }, "VersionControl": { "FileHistory.Commit": { - "selectedBranchBackground": "#F4F4F4" + "selectedBranchBackground": "#FAFAFA" }, "GitCommits": { - "graphColor": "#FFFFFF" + "graphColor": "#EAEAEB" }, "GitLog": { "localBranchIconColor": "#2979ff", - "otherIconColor": "#7f7f7f", + "otherIconColor": "#9D9D9F", "remoteBranchIconColor": "#232324", - "tagIconColor": "#7f7f7f" + "tagIconColor": "#9D9D9F" }, "HgLog": { "branchIconColor": "#2979ff", "bookmarkIconColor": "#232324", - "closedBranchIconColor": "#b8b8b9", - "localTagIconColor": "#7f7f7f", - "mqTagIconColor": "#7f7f7f", - "tagIconColor": "#7f7f7f", - "tipIconColor": "#7f7f7f" + "closedBranchIconColor": "#424243", + "localTagIconColor": "#9D9D9F", + "mqTagIconColor": "#9D9D9F", + "tagIconColor": "#9D9D9F", + "tipIconColor": "#9D9D9F" }, "Log": { - "Commit.unmatchedForeground": "#7f7f7f", - "Commit.currentBranchBackground": "#EAEAEB" + "Commit.unmatchedForeground": "#9D9D9F", + "Commit.currentBranchBackground": "#EAEAEB", + "Commit.hoveredBackground": "#DBDBDC80" }, "RefLabel": { "foreground": "#232324", - "backgroundBase": "#FFFFFF" + "backgroundBase": "#EAEAEB" } }, "Viewport": { - "background": "#eaeaeb", + "background": "#FFFFFF", "foreground": "#232324" }, "WelcomeScreen": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", - "captionBackground": "#eaeaeb", + "AssociatedComponent.background": "#FAFAFA", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "captionBackground": "#FFFFFF", "captionForeground": "#232324", - "footerBackground": "#eaeaeb", + "Details.background": "#FAFAFA", + "footerBackground": "#FFFFFF", "footerForeground": "#232324", - "headerBackground": "#F4F4F4", + "headerBackground": "#FAFAFA", "headerForeground": "#232324", + "List.background": "#FFFFFF", "separatorColor": "#DBDBDC", + "SidePanel.background": "#EAEAEB", "Projects": { + "actions.background": "#FFFFFF", + "actions.selectionBackground": "#EAEAEB", "background": "#EAEAEB", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionInactiveBackground": "#EAEAEB" } }, - "window": "#eaeaeb", + "window": "#FFFFFF", "windowBorder": "#DBDBDC", - "windowText": "#7f7f7f", + "windowText": "#9D9D9F", "Window.border": "#DBDBDC" }, "icons": { "ColorPalette": { - "#43494A": "#eaeaeb", - "#6B6B6B": "#7f7f7f", - "#A7A7A7": "#F4F4F4", + "#43494A": "#FFFFFF", + "#6B6B6B": "#9D9D9F", + "#A7A7A7": "#FAFAFA", "#3D6185": "#2979ff", "#466D94": "#2979ff", - "#3C3F41": "#F4F4F4", - "#545556": "#b8b8b9", - "#606060": "#b8b8b9", + "#3C3F41": "#FAFAFA", + "#545556": "#424243", + "#606060": "#424243", "#9AA7B0": "#232324", "#675133": "#2979ff", "Actions.Blue": "#4078F2", "Actions.Green": "#50A14E", - "Actions.Grey": "#7f7f7f", + "Actions.Grey": "#9D9D9F", "Actions.GreyInline": "#A0A1A7", "Actions.GreyInline.Dark": "#232324", "Actions.Red": "#E4564A", "Actions.Yellow": "#C18401", - "Checkbox.Background.Default": "#eaeaeb", - "Checkbox.Background.Default.Dark": "#eaeaeb", - "Checkbox.Background.Disabled": "#CACACB", - "Checkbox.Background.Disabled.Dark": "#CACACB", + "Checkbox.Background.Default": "#FFFFFF", + "Checkbox.Background.Default.Dark": "#FFFFFF", + "Checkbox.Background.Disabled": "#DBDBDC", + "Checkbox.Background.Disabled.Dark": "#DBDBDC", "Checkbox.Border.Default": "#DBDBDC", "Checkbox.Border.Default.Dark": "#DBDBDC", - "Checkbox.Border.Disabled": "#b8b8b9", - "Checkbox.Border.Disabled.Dark": "#b8b8b9", + "Checkbox.Border.Disabled": "#424243", + "Checkbox.Border.Disabled.Dark": "#424243", "Checkbox.Focus.Thin.Default": "#2979ff", "Checkbox.Focus.Thin.Default.Dark": "#2979ff", "Checkbox.Focus.Wide": "#2979ff", "Checkbox.Focus.Wide.Dark": "#2979ff", - "Checkbox.Foreground.Disabled": "#b8b8b9", - "Checkbox.Foreground.Disabled.Dark": "#b8b8b9", + "Checkbox.Foreground.Disabled": "#424243", + "Checkbox.Foreground.Disabled.Dark": "#424243", "Checkbox.Background.Selected": "#2979ff", - "Checkbox.Background.Selected.Dark": "#F4F4F4", + "Checkbox.Background.Selected.Dark": "#FAFAFA", "Checkbox.Border.Selected": "#2979ff", "Checkbox.Border.Selected.Dark": "#2979ff", "Checkbox.Foreground.Selected": "#2979ff", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light.theme.json index e916dc36..ada213dc 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Atom One Light.theme.json @@ -3,27 +3,33 @@ "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Atom One Light.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/onelight.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { - "acceleratorSelectionForeground": "#7f7f7f", - "background": "#F4F4F4", + "acceleratorSelectionForeground": "#9D9D9F", + "background": "#FAFAFA", "borderColor": "#DBDBDC", - "disabledBackground": "#CACACB", - "disabledForeground": "#b8b8b9", - "disabledText": "#b8b8b9", - "focusColor": "#FFFFFF", + "disabledBackground": "#DBDBDC", + "disabledForeground": "#424243", + "disabledText": "#424243", + "focusColor": "#EAEAEB", "focusedBorderColor": "#2979ff", "foreground": "#232324", - "inactiveBackground": "#CACACB", - "inactiveForeground": "#7f7f7f", - "infoForeground": "#7f7f7f", - "selectionBackground": "#FFFFFF", + "inactiveBackground": "#DBDBDC", + "inactiveForeground": "#9D9D9F", + "infoForeground": "#9D9D9F", + "selectionBackground": "#DBDBDC", "selectionBackgroundInactive": "#EAEAEB", "selectionForeground": "#232324", "selectionInactiveBackground": "#EAEAEB", "separatorColor": "#DBDBDC" }, - "activeCaption": "#F4F4F4", + "activeCaption": "#FAFAFA", "ActionButton": { "hoverBackground": "#2979ff50", "hoverBorderColor": "#2979ff50", @@ -33,13 +39,13 @@ "pressedBorderColor": "#2979ff50" }, "Autocomplete": { - "selectionBackground": "#FFFFFF" + "selectionBackground": "#DBDBDC" }, - "Borders.ContrastBorderColor": "#F4F4F4", + "Borders.ContrastBorderColor": "#FAFAFA", "Borders.color": "#DBDBDC", "Button": { "arc": 0, - "background": "#F4F4F4", + "background": "#FAFAFA", "default": { "endBackground": "#DBDBDC", "endBorderColor": "#DBDBDC", @@ -51,15 +57,15 @@ "startBorderColor": "#DBDBDC" }, "disabledBorderColor": "#DBDBDC", - "disabledText": "#b8b8b9", + "disabledText": "#424243", "endBackground": "#DBDBDC", "endBorderColor": "#DBDBDC", - "focus": "#FFFFFF", + "focus": "#EAEAEB", "focusedBorderColor": "#2979ff", - "foreground": "#7f7f7f", + "foreground": "#9D9D9F", "highlight": "#232324", "mt.background": "#DBDBDC", - "mt.foreground": "#7f7f7f", + "mt.foreground": "#9D9D9F", "mt.selectedForeground": "#232324", "mt.selection.color1": "#DBDBDC", "mt.selection.color2": "#DBDBDC", @@ -72,25 +78,36 @@ "Tooltip.borderColor": "#DBDBDC", "Tooltip.background": "#F2F2F2" }, - "Content.background": "#eaeaeb", + "Content": { + "background": "#FFFFFF", + "selectionBackground": "#DBDBDC" + }, "CheckBox": { - "background": "#F4F4F4", - "disabledText": "#b8b8b9", + "background": "#FAFAFA", + "disabledText": "#424243", "foreground": "#232324", "select": "#2979ff" }, "CheckBoxMenuItem": { - "acceleratorForeground": "#7f7f7f", - "acceleratorSelectionForeground": "#7f7f7f", - "background": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "acceleratorForeground": "#9D9D9F", + "acceleratorSelectionForeground": "#9D9D9F", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, + "CodeWithMe": { + "Avatar.foreground": "#232324", + "AccessEnabled": { + "accessDot": "#2979ff", + "dropdownBorder": "#EAEAEB", + "pillBackground": "$second" + } + }, "ColorChooser": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324", "swatchesDefaultRecentColor": "#232324" }, @@ -98,13 +115,14 @@ "ComboBox": { "ArrowButton": { "background": "#DBDBDC", - "disabledIconColor": "#b8b8b9", + "disabledIconColor": "#424243", "iconColor": "#232324", - "nonEditableBackground": "#F4F4F4" + "nonEditableBackground": "#FAFAFA" }, - "background": "#F4F4F4", + "background": "#FAFAFA", "buttonBackground": "#DBDBDC", - "disabledForeground": "#b8b8b9", + "darcula.hoveredArrowButtonForeground": "#2979ff", + "disabledForeground": "#424243", "foreground": "#232324", "modifiedItemForeground": "#2979ff", "nonEditableBackground": "#EAEAEB", @@ -116,103 +134,107 @@ "CompletionPopup": { "background": "#EAEAEB", "foreground": "#232324", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "matchForeground": "#2979ff", "matchSelectionForeground": "#2979ff", "nonFocusedState": "false", "selectedGrayedForeground": "#232324", "selectionGrayForeground": "#232324", - "selectionInactiveInfoForeground": "#7f7f7f", - "selectionInactiveBackground": "#FFFFFF50", - "selectionBackground": "#FFFFFF80", + "selectionInactiveInfoForeground": "#9D9D9F", + "selectionInactiveBackground": "#DBDBDC50", + "selectionBackground": "#DBDBDC80", "selectionForeground": "#232324", "selectionInfoForeground": "#232324" }, "Component": { "arc": 4, - "borderColor": "#FFFFFF", + "borderColor": "#EAEAEB", "disabledBorderColor": "#DBDBDC", "focusColor": "#2979ff", "focusedBorderColor": "#2979ff", "hoverIconColor": "#2979ff", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "iconColor": "#232324" }, - "control": "#F4F4F4", - "controlText": "#7f7f7f", + "control": "#FAFAFA", + "controlText": "#9D9D9F", "Counter": { "background": "#2979ff", "foreground": "#232324" }, "Debugger": { "Variables": { - "collectingDataForeground": "#7f7f7f", + "collectingDataForeground": "#9D9D9F", "changedValueForeground": "#2979ff", "errorMessageForeground": "#E4564A", - "evaluatingExpressionForeground": "#7f7f7f", + "evaluatingExpressionForeground": "#9D9D9F", "exceptionForeground": "#C18401", "modifyingValueForeground": "#2979ff", "valueForeground": "#2979ff" } }, "DebuggerTabs": { - "selectedBackground": "#FFFFFF", - "underlinedTabBackground": "#FFFFFF" + "selectedBackground": "#EAEAEB", + "underlinedTabBackground": "#EAEAEB" }, "DebuggerPopup": { - "borderColor": "#FFFFFF" + "borderColor": "#EAEAEB" }, "DefaultTabs": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", "hoverBackground": "#DBDBDC", - "hoverColor": "#F4F4F4", - "hoverMaskColor": "#FFFFFF", + "hoverColor": "#FAFAFA", + "hoverMaskColor": "#EAEAEB", + "inactiveColoredTabBackground": "#FAFAFA", "inactiveColoredFileBackground": "#DBDBDC", - "inactiveUnderlineColor": "#b8b8b9", - "inactiveMaskColor": "#F4F4F4", + "inactiveUnderlineColor": "#2979ff", + "inactiveMaskColor": "#FAFAFA", "underlineColor": "#2979ff", - "underlinedTabBackground": "#DBDBDC" + "underlinedTabBackground": "#DBDBDC", + "underlinedTabForeground": "#232324" }, - "Desktop.background": "#F4F4F4", - "DialogWrapper.southPanelBackground": "#F4F4F4", - "DialogWrapper.southPanelDivider": "#F4F4F4", + "Desktop.background": "#FAFAFA", + "DialogWrapper.southPanelBackground": "#FAFAFA", + "DialogWrapper.southPanelDivider": "#FAFAFA", "DragAndDrop": { - "areaBackground": "#F4F4F4", - "areaBorderColor": "#F4F4F4", + "areaBackground": "#FAFAFA", + "areaBorderColor": "#FAFAFA", "areaForeground": "#232324" }, "Editor": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324", - "shortcutForeground": "#7f7f7f" + "shortcutForeground": "#9D9D9F" }, "EditorPane": { - "background": "#F4F4F4", + "background": "#FAFAFA", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveBackground": "#F4F4F4", - "inactiveForeground": "#b8b8b9", - "selectionBackground": "#FFFFFF", + "inactiveBackground": "#FAFAFA", + "inactiveForeground": "#424243", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "EditorTabs": { "borderColor": "#EAEAEB", - "hoverColor": "#FFFFFF", - "hoverMaskColor": "#FFFFFF", - "inactiveMaskColor": "#F4F4F4", - "inactiveColoredFileBackground": "#F4F4F42", - "inactiveUnderlineColor": "#b8b8b9", + "hoverBackground": "#EAEAEB", + "hoverColor": "#EAEAEB", + "hoverMaskColor": "#EAEAEB", + "inactiveMaskColor": "#FAFAFA", + "inactiveColoredFileBackground": "#FAFAFA", + "inactiveUnderlineColor": "#424243", "selectedForeground": "#232324", "selectedBackground": "#DBDBDC", "underlineColor": "#2979ff", - "underlinedTabBackground": "#DBDBDC" + "underlinedTabBackground": "#DBDBDC", + "underlinedTabForeground": "#232324" }, "EditorGroupsTabs": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#EAEAEB", - "hoverBackground": "#FFFFFF", - "hoverColor": "#FFFFFF", + "hoverBackground": "#EAEAEB", + "hoverColor": "#EAEAEB", "inactiveUnderlineColor": "#2979ff", "underlineColor": "#2979ff", "underlinedTabBackground": "#DBDBDC", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#CACACB", + "Yellow": "#DBDBDC", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -238,136 +260,140 @@ }, "Focus.color": "#DBDBDC", "FormattedTextField": { - "background": "#F4F4F4", + "background": "#FAFAFA", "caretForeground": "#2979ff", "foreground": "#232324", "inactiveBackground": "#DBDBDC", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionForeground": "#232324", "selectionBackground": "#DBDBDC" }, + "GotItTooltip.borderColor": "#F2F2F2", "Group": { "disabledSeparatorColor": "#DBDBDC", "separatorColor": "#DBDBDC" }, "GutterTooltip": { - "infoForeground": "#232324", - "lineSeparatorColor": "#F4F4F4" + "infoForeground": "#9D9D9F", + "lineSeparatorColor": "#FAFAFA" }, "HeaderColor": { - "active": "#F4F4F4", - "inactive": "#eaeaeb" + "active": "#FAFAFA", + "inactive": "#FFFFFF" }, "HelpTooltip": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#DBDBDC", "foreground": "#232324", - "infoForeground": "#7f7f7f", - "shortcutForeground": "#7f7f7f" + "infoForeground": "#9D9D9F", + "shortcutForeground": "#9D9D9F" }, "Hyperlink.linkColor": "#2979ff", "inactiveCaption": "#EAEAEB", - "inactiveCaptionBorder": "#F4F4F4", - "inactiveCaptionText": "#7f7f7f", - "info": "#7f7f7f", - "infoText": "#7f7f7f", + "inactiveCaptionBorder": "#FAFAFA", + "inactiveCaptionText": "#9D9D9F", + "info": "#9D9D9F", + "infoText": "#9D9D9F", "IdeStatusBar.border": "4,4,4,4", "InformationHint.borderColor": "#DBDBDC", "InplaceRefactoringPopup": { - "borderColor": "#F4F4F4" + "borderColor": "#FAFAFA" }, "InternalFrame": { "activeTitleForeground": "#232324", - "background": "#F4F4F4", - "inactiveTitleForeground": "#7f7f7f" + "background": "#FAFAFA", + "inactiveTitleForeground": "#9D9D9F" }, "Label": { - "background": "#F4F4F4", - "disabledForeground": "#b8b8b9", - "disabledShadow": "#F4F4F4", - "disabledText": "#b8b8b9", + "background": "#FAFAFA", + "disabledForeground": "#424243", + "disabledShadow": "#FAFAFA", + "disabledText": "#424243", "foreground": "#232324", - "infoForeground": "#7f7f7f", - "selectedForeground": "#232324" + "infoForeground": "#9D9D9F", + "selectedForeground": "#232324", + "selectedDisabledForeground": "#232324" }, "Link": { "activeForeground": "#2979ff", "hoverForeground": "#2979ff", "pressedForeground": "#2979ff", - "secondaryForeground": "#7f7f7f", + "secondaryForeground": "#9D9D9F", "visitedForeground": "#2979ff" }, "link.foreground": "#2979ff", "List": { "background": "#EAEAEB", "foreground": "#232324", - "selectionBackground": "#FFFFFF50", + "hoverBackground": "#DBDBDC80", + "hoverInactiveBackground": "#DBDBDC", + "selectionBackground": "#DBDBDC50", "selectionForeground": "#232324", "selectionInactiveForeground": "#232324", "selectionInactiveBackground": "#DBDBDC80" }, "material": { - "background": "#F4F4F4", + "background": "#FAFAFA", "branchColor": "#232324", - "contrast": "#eaeaeb", + "contrast": "#FFFFFF", "foreground": "#232324", "mergeCommits": "#DBDBDC", - "primaryColor": "#7f7f7f", + "primaryColor": "#9D9D9F", "selectionForeground": "#232324", - "tab.backgroundColor": "#F4F4F4", + "tab.backgroundColor": "#FAFAFA", "tab.borderColor": "#2979ff", - "tagColor": "#7f7f7f" + "tagColor": "#9D9D9F" }, "MemoryIndicator": { "allocatedBackground": "#EAEAEB", - "usedColor": "#FFFFFF", - "usedBackground": "#FFFFFF" + "usedColor": "#EAEAEB", + "usedBackground": "#EAEAEB" }, "Menu": { - "acceleratorForeground": "#7f7f7f", + "acceleratorForeground": "#9D9D9F", "acceleratorSelectionForeground": "#232324", - "background": "#F4F4F4", + "background": "#FAFAFA", "border": "4,2,4,2", "borderColor": "#EAEAEB", "disabledBackground": "#EAEAEB", - "disabledForeground": "#b8b8b9", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324", "separatorColor": "#DBDBDC" }, "MenuBar": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "highlight": "#F4F4F4", - "selectionBackground": "#FFFFFF", + "highlight": "#FAFAFA", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324", - "shadow": "#F4F4F4" + "shadow": "#FAFAFA" }, "MenuItem": { - "acceleratorForeground": "#7f7f7f", + "acceleratorForeground": "#9D9D9F", "acceleratorSelectionForeground": "#232324", "border": "4,2,4,2", - "background": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "NavBar": { "arrowColor": "#232324", - "borderColor": "#F4F4F4" + "borderColor": "#FAFAFA" }, "NewClass": { "Panel": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "SearchField": { - "background": "#F4F4F4" + "background": "#FAFAFA" } }, "NewPSD.warning": "#2979ff", @@ -393,61 +419,62 @@ }, "OnePixelDivider.background": "#DBDBDC", "OptionPane": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324", "messageForeground": "#232324" }, "Outline": { "color": "#DBDBDC", "focusedColor": "#2979ff", - "disabledColor": "#b8b8b9" + "disabledColor": "#424243" }, "Panel": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324" }, "ParameterInfo": { "background": "#EAEAEB", "borderColor": "#DBDBDC", - "currentOverloadBackground": "#DBDBDC", + "currentOverloadBackground": "#EAEAEB", "currentParameterForeground": "#2979ff", - "disabledForeground": "#b8b8b9", + "disabledForeground": "#424243", "foreground": "#232324", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "lineSeparatorColor": "#DBDBDC" }, "PasswordField": { - "background": "#F4F4F4", + "background": "#FAFAFA", "capsLockIconColor": "#2979ff", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "Plugins": { - "background": "#F4F4F4", - "disabledForeground": "#b8b8b9", - "eapTagBackground": "#FFFFFF", - "lightSelectionBackground": "#FFFFFF", - "paidTagBackground": "#FFFFFF", - "selectionBackground": "#FFFFFF", + "background": "#FAFAFA", + "disabledForeground": "#424243", + "eapTagBackground": "#EAEAEB", + "hoverBackground": "#DBDBDC80", + "lightSelectionBackground": "#DBDBDC", + "paidTagBackground": "#EAEAEB", + "selectionBackground": "#DBDBDC", "tagForeground": "#2979ff", - "tagBackground": "#FFFFFF", - "trialTagBackground": "#FFFFFF", + "tagBackground": "#EAEAEB", + "trialTagBackground": "#EAEAEB", "Button": { "installBackground": "#DBDBDC", "installBorderColor": "#DBDBDC", "installForeground": "#232324", - "installFocusedBackground": "#FFFFFF", - "installFillForeground": "#b8b8b9", + "installFocusedBackground": "#EAEAEB", + "installFillForeground": "#424243", "installFillBackground": "#DBDBDC", - "updateBackground": "#DBDBDC", + "updateBackground": "#2979ff", "updateBorderColor": "#DBDBDC", "updateForeground": "#232324" }, "SearchField": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#DBDBDC" }, "SectionHeader": { @@ -462,133 +489,143 @@ }, "Popup": { "Advertiser": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", "foreground": "#2979ff" }, - "borderColor": "#eaeaeb", - "inactiveBorderColor": "#F4F4F4", + "borderColor": "#FFFFFF", + "inactiveBorderColor": "#FAFAFA", "innerBorderColor": "#EAEAEB", "Header": { - "activeBackground": "#F4F4F4", - "inactiveBackground": "#eaeaeb" + "activeBackground": "#FAFAFA", + "inactiveBackground": "#FFFFFF" }, "paintBorder": true, "separatorForeground": "#232324", "separatorColor": "#EAEAEB", "Toolbar": { - "Floating.background": "#eaeaeb", - "background": "#eaeaeb", - "borderColor": "#eaeaeb" + "Floating.background": "#FFFFFF", + "background": "#FFFFFF", + "borderColor": "#FFFFFF" } }, "PopupMenu": { - "background": "#F4F4F4", + "background": "#FAFAFA", "border": "2,0,2,0", "foreground": "#232324", - "translucentBackground": "#F4F4F4" + "translucentBackground": "#FAFAFA" }, "PopupMenuSeparator.height": 10, "PopupMenuSeparator.stripeIndent": 5, "ProgressBar": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#2979ff", "indeterminateEndColor": "#2979ff", "indeterminateStartColor": "#2979ff", "progressColor": "#2979ff", - "selectionBackground": "#FFFFFF", - "trackColor": "#FFFFFF" + "selectionBackground": "#EAEAEB", + "trackColor": "#EAEAEB" }, "PsiViewer": { "referenceHighlightColor": "#2979ff" }, "RadioButton": { - "background": "#F4F4F4", - "disabledText": "#b8b8b9", + "background": "#FAFAFA", + "disabledText": "#424243", "foreground": "#232324" }, "RadioButtonMenuItem": { - "acceleratorForeground": "#7f7f7f", - "acceleratorSelectionForeground": "#7f7f7f", - "background": "#F4F4F4", - "disabledBackground": "#F4F4F4", - "disabledForeground": "#b8b8b9", + "acceleratorForeground": "#9D9D9F", + "acceleratorSelectionForeground": "#9D9D9F", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#424243", "foreground": "#232324", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, + "ScreenView.borderColor": "#DBDBDC", "ScrollBar": { - "background": "#F4F4F4", + "background": "#FAFAFA", "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "Mac": { "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430", + "trackColor": "#FAFAFA30", "Transparent": { "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430" + "trackColor": "#FAFAFA30" } }, - "thumb": "#FFFFFF", + "thumb": "#EAEAEB", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430", + "trackColor": "#FAFAFA30", "Transparent": { "hoverThumbBorderColor": "#2979ff", "hoverThumbColor": "#2979ff", - "hoverTrackColor": "#F4F4F430", + "hoverTrackColor": "#FAFAFA30", "thumbBorderColor": "#2979ff70", "thumbColor": "#2979ff70", - "trackColor": "#F4F4F430" + "trackColor": "#FAFAFA30" } }, "SearchEverywhere": { "Advertiser": { - "background": "#eaeaeb", - "foreground": "#7f7f7f" + "background": "#FFFFFF", + "foreground": "#9D9D9F" }, "Header": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "List": { - "separatorForeground": "#7f7f7f", + "separatorForeground": "#9D9D9F", "separatorColor": "#DBDBDC" }, "SearchField": { - "background": "#F4F4F4", - "borderColor": "#eaeaeb", - "infoForeground": "#7f7f7f" + "background": "#FAFAFA", + "borderColor": "#FFFFFF", + "infoForeground": "#9D9D9F" }, "Tab": { "active.foreground": "#232324", "selectedForeground": "#232324", - "selectedBackground": "#FFFFFF" + "selectedBackground": "#EAEAEB" } }, "SearchMatch": { "endBackground": "#2979ff", - "startBackground": "#2979ff" + "startBackground": "#2979ff", + "endColor": "#2979ff", + "startColor": "#2979ff" }, "SearchField.errorBackground": "#F2F2F2", + "SearchOption": { + "selectedBackground": "#DBDBDC" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#9D9D9F", + "Repeated.File.Foreground": "#232324" + }, "Separator": { "background": "#EAEAEB", "foreground": "#EAEAEB", "separatorColor": "#EAEAEB" }, "SidePanel": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "Slider": { - "background": "#F4F4F4", + "background": "#FAFAFA", "buttonBorderColor": "#2979ff", "buttonColor": "#2979ff", "foreground": "#232324", @@ -599,38 +636,40 @@ "thumb": "#2979ff" }, "SpeedSearch": { - "background": "#FFFFFF", + "background": "#EAEAEB", "borderColor": "#DBDBDC", "foreground": "#232324", "errorForeground": "#232324" }, "Spinner": { - "background": "#F4F4F4", + "background": "#FAFAFA", "border": "3,3,3,3", "foreground": "#232324", "selectionForeground": "#232324" }, "SplitPane": { - "background": "#F4F4F4", - "highlight": "#F4F4F4" + "background": "#FAFAFA", + "highlight": "#FAFAFA" }, "SplitPaneDivider.draggingColor": "#EAEAEB", "StatusBar": { - "borderColor": "#F4F4F4" + "borderColor": "#FAFAFA", + "hoverBackground": "#EAEAEB", + "LightEditBackground": "#DBDBDC" }, "TabbedPane": { - "background": "#F4F4F4", - "contentAreaColor": "#FFFFFF", + "background": "#FAFAFA", + "contentAreaColor": "#EAEAEB", "contentBorderInsets": "3,1,1,1", "darkShadow": "#DBDBDC", - "disabledForeground": "#b8b8b9", - "disabledUnderlineColor": "#b8b8b9", + "disabledForeground": "#424243", + "disabledUnderlineColor": "#424243", "focus": "#DBDBDC", "focusColor": "#DBDBDC", "fontSizeOffset": 0, "foreground": "#232324", "highlight": "#DBDBDC", - "hoverColor": "#FFFFFF", + "hoverColor": "#EAEAEB", "labelShift": 0, "selectedForeground": "#232324", "selectedLabelShift": 0, @@ -641,162 +680,209 @@ "tabSelectionHeight": 2, "underlineColor": "#2979ff" }, - "TabbedPane.mt.tab.background": "#F4F4F4", + "TabbedPane.mt.tab.background": "#FAFAFA", "Table": { - "background": "#F4F4F4", + "alternativeRowBackground": "#FFFFFF", + "background": "#FAFAFA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#424243", "dropLineColor": "#2979ff", "dropLineShortColor": "#2979ff", "focusCellBackground": "#DBDBDC", "focusCellForeground": "#232324", "foreground": "#232324", - "gridColor": "#F4F4F4", + "gridColor": "#FAFAFA", "highlightOuter": "#DBDBDC", + "hoverBackground": "#DBDBDC80", + "hoverInactiveBackground": "#DBDBDC", "lightSelectionForeground": "#232324", - "lightSelectionInactiveForeground": "#7f7f7f", + "lightSelectionInactiveForeground": "#9D9D9F", "lightSelectionInactiveBackground": "#EAEAEB", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324", "selectionInactiveBackground": "#DBDBDC", "selectionInactiveForeground": "#232324", "sortIconColor": "#232324", - "stripeColor": "#eaeaeb" + "stripeColor": "#FFFFFF" }, "TableHeader": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", "bottomSeparatorColor": "#EAEAEB", "cellBorder": "4,0,4,0", - "disabledForeground": "#b8b8b9", + "disabledForeground": "#424243", "foreground": "#232324", "focusCellBackground": "#DBDBDC", "focusCellForeground": "#232324", "height": 25, "separatorColor": "#EAEAEB" }, - "text": "#7f7f7f", - "textInactiveText": "#7f7f7f", - "textText": "#7f7f7f", + "text": "#9D9D9F", + "textInactiveText": "#9D9D9F", + "textText": "#9D9D9F", "TextArea": { - "background": "#F4F4F4", + "background": "#FAFAFA", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "TextField": { - "background": "#F4F4F4", + "background": "#FAFAFA", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "TextPane": { - "background": "#F4F4F4", + "background": "#FAFAFA", "caretForeground": "#2979ff", "foreground": "#232324", - "inactiveForeground": "#b8b8b9", + "inactiveForeground": "#424243", "selectionBackground": "#DBDBDC", "selectionForeground": "#232324" }, "TitlePane": { - "background": "#eaeaeb", - "Button.hoverBackground": "#FFFFFF", - "inactiveBackground": "#F4F4F4", - "infoForeground": "#7f7f7f", - "inactiveInfoForeground": "#7f7f7f" + "background": "#FFFFFF", + "Button.hoverBackground": "#EAEAEB", + "inactiveBackground": "#FAFAFA", + "infoForeground": "#9D9D9F", + "inactiveInfoForeground": "#9D9D9F" }, "TitledBorder.titleColor": "#232324", "ToggleButton": { "borderColor": "#DBDBDC", "buttonColor": "#232324", - "disabledText": "#b8b8b9", + "disabledText": "#424243", "foreground": "#232324", - "offForeground": "#F4F4F4", - "offBackground": "#F4F4F4", + "offForeground": "#FAFAFA", + "offBackground": "#FAFAFA", "onBackground": "#2979ff", "onForeground": "#2979ff" }, "ToolBar": { - "background": "#F4F4F4", - "borderHandleColor": "#7f7f7f", - "floatingForeground": "#7f7f7f", + "background": "#FAFAFA", + "borderHandleColor": "#9D9D9F", + "floatingForeground": "#9D9D9F", "foreground": "#232324" }, "ToolTip": { - "Actions.background": "#F4F4F4", - "Actions.infoForeground": "#7f7f7f", - "background": "#F4F4F4", - "borderColor": "#FFFFFF", + "Actions.background": "#FAFAFA", + "Actions.infoForeground": "#9D9D9F", + "background": "#F2F2F2", + "borderColor": "#DBDBDC", "foreground": "#232324", - "infoForeground": "#7f7f7f", + "infoForeground": "#9D9D9F", "separatorColor": "#DBDBDC", - "shortcutForeground": "#7f7f7f" + "shortcutForeground": "#9D9D9F" }, "ToolWindow": { "Button": { "hoverBackground": "#DBDBDC", "selectedForeground": "#232324", - "selectedBackground": "#eaeaeb" + "selectedBackground": "#FFFFFF" }, "Header": { - "background": "#F4F4F4", + "background": "#FAFAFA", "borderColor": "#EAEAEB", - "inactiveBackground": "#F4F4F4" + "inactiveBackground": "#FAFAFA" }, "HeaderCloseButton": { - "background": "#F4F4F4" + "background": "#FAFAFA" }, "HeaderTab": { - "hoverBackground": "#FFFFFF", + "borderColor": "#EAEAEB", + "hoverBackground": "#EAEAEB", "hoverInactiveBackground": "#EAEAEB", "inactiveUnderlineColor": "#2979ff", - "selectedBackground": "#eaeaeb", - "selectedInactiveBackground": "#eaeaeb", + "selectedBackground": "#FFFFFF", + "selectedInactiveBackground": "#FFFFFF", "underlineColor": "#2979ff", - "underlinedTabBackground": "#FFFFFF", - "underlinedTabInactiveBackground": "#EAEAEB" + "underlinedTabBackground": "#DBDBDC", + "underlinedTabInactiveBackground": "#EAEAEB", + "underlinedTabForeground": "#232324", + "underlinedTabInactiveForeground": "#232324" } }, "Tree": { - "background": "#F4F4F4", - "foreground": "#7f7f7f", + "background": "#FAFAFA", + "foreground": "#9D9D9F", "hash": "#DBDBDC", + "hoverBackground": "#DBDBDC80", + "hoverInactiveBackground": "#DBDBDC", "modifiedItemForeground": "#2979ff", "rowHeight": 28, "selectionBackground": "#DBDBDC80", "selectionForeground": "#232324", "selectionInactiveForeground": "#232324", "selectionInactiveBackground": "#DBDBDC80", - "textBackground": "#F4F4F4" + "textBackground": "#FAFAFA" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#DBDBDC", - "ColorPicker.background": "#F4F4F4", - "ColorPicker.foreground": "#232324", - "Component.borderColor": "#DBDBDC", - "Component.background": "#F4F4F4", - "Component.foreground": "#232324", - "Connector.borderColor": "#DBDBDC", - "Connector.hoverBorderColor": "#FFFFFF", - "Canvas.background": "#eaeaeb", + "Canvas.background": "#FFFFFF", + "ColorPicker": { + "background": "#FAFAFA", + "foreground": "#232324" + }, + "Component": { + "borderColor": "#DBDBDC", + "background": "#FAFAFA", + "foreground": "#232324", + "hoverBorderColor": "#EAEAEB" + }, + "Connector": { + "borderColor": "#DBDBDC", + "hoverBorderColor": "#EAEAEB" + }, + "Canvas.background": "#FFFFFF", "highStroke.foreground": "#232324", - "Label.foreground": "#7f7f7f", + "Label.foreground": "#9D9D9F", "List.selectionBackground": "#DBDBDC80", - "Panel.borderColor": "#DBDBDC", - "Panel.background": "#F4F4F4", + "motion": { + "borderColor": "#DBDBDC", + "Component.foreground": "#232324", + "ConstraintSetText.foreground": "#9D9D9F", + "ConstraintSet.background": "#EAEAEB", + "CSPanel.SelectedFocusBackground": "#DBDBDC", + "CSPanel.SelectedBackground": "#DBDBDC80", + "cs_FocusText.infoForeground": "#9D9D9F", + "CursorTextColor.foreground": "#232324", + "HoverColor.disabledBackground": "#424243", + "motionGraph.background": "#FAFAFA", + "Notification.background": "#F2F2F2", + "ourAvg.background": "#EAEAEB", + "ourCS.background": "#EAEAEB", + "ourCS_Border.borderColor": "#DBDBDC", + "ourCS_TextColor.foreground": "#9D9D9F", + "ourCS_SelectedFocusBackground.selectionForeground": "#232324", + "ourCS_SelectedBackground.selectionInactiveBackground": "#DBDBDC", + "ourCS_SelectedBorder.pressedBorderColor": "#EAEAEB", + "ourML_BarColor.separatorColor": "#DBDBDC", + "PrimaryPanel.background": "#FFFFFF", + "SecondaryPanel.background": "#FAFAFA", + "SecondaryPanel.header.foreground": "#9D9D9F", + "SecondaryPanel.header.background": "#FFFFFF", + "timeLine.disabledBorderColor": "#DBDBDC" + }, + "Panel": { + "borderColor": "#DBDBDC", + "background": "#FAFAFA" + }, "percent.foreground": "#232324", - "Placeholder.background": "#F4F4F4", - "Placeholder.borderColor": "#DBDBDC", - "Placeholder.foreground": "#232324", - "Placeholder.selectedForeground": "#232324", - "Preview.background": "#F4F4F4", - "stroke.acceleratorForeground": "#7f7f7f" + "Placeholder": { + "background": "#FAFAFA", + "borderColor": "#DBDBDC", + "foreground": "#232324", + "selectedForeground": "#232324" + }, + "Preview.background": "#FAFAFA", + "stroke.acceleratorForeground": "#9D9D9F" }, "ValidationTooltip": { "errorBackground": "#F2F2F2", @@ -806,95 +892,102 @@ }, "VersionControl": { "FileHistory.Commit": { - "selectedBranchBackground": "#F4F4F4" + "selectedBranchBackground": "#FAFAFA" }, "GitCommits": { - "graphColor": "#FFFFFF" + "graphColor": "#EAEAEB" }, "GitLog": { "localBranchIconColor": "#2979ff", - "otherIconColor": "#7f7f7f", + "otherIconColor": "#9D9D9F", "remoteBranchIconColor": "#232324", - "tagIconColor": "#7f7f7f" + "tagIconColor": "#9D9D9F" }, "HgLog": { "branchIconColor": "#2979ff", "bookmarkIconColor": "#232324", - "closedBranchIconColor": "#b8b8b9", - "localTagIconColor": "#7f7f7f", - "mqTagIconColor": "#7f7f7f", - "tagIconColor": "#7f7f7f", - "tipIconColor": "#7f7f7f" + "closedBranchIconColor": "#424243", + "localTagIconColor": "#9D9D9F", + "mqTagIconColor": "#9D9D9F", + "tagIconColor": "#9D9D9F", + "tipIconColor": "#9D9D9F" }, "Log": { - "Commit.unmatchedForeground": "#7f7f7f", - "Commit.currentBranchBackground": "#EAEAEB" + "Commit.unmatchedForeground": "#9D9D9F", + "Commit.currentBranchBackground": "#EAEAEB", + "Commit.hoveredBackground": "#DBDBDC80" }, "RefLabel": { "foreground": "#232324", - "backgroundBase": "#FFFFFF" + "backgroundBase": "#EAEAEB" } }, "Viewport": { - "background": "#F4F4F4", + "background": "#FAFAFA", "foreground": "#232324" }, "WelcomeScreen": { - "background": "#F4F4F4", - "borderColor": "#F4F4F4", - "captionBackground": "#eaeaeb", + "AssociatedComponent.background": "#FAFAFA", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "captionBackground": "#FFFFFF", "captionForeground": "#232324", - "footerBackground": "#eaeaeb", + "Details.background": "#FAFAFA", + "footerBackground": "#FFFFFF", "footerForeground": "#232324", - "headerBackground": "#F4F4F4", + "headerBackground": "#FAFAFA", "headerForeground": "#232324", + "List.background": "#FFFFFF", "separatorColor": "#DBDBDC", + "SidePanel.background": "#EAEAEB", "Projects": { + "actions.background": "#FFFFFF", + "actions.selectionBackground": "#EAEAEB", "background": "#EAEAEB", - "selectionBackground": "#FFFFFF", + "selectionBackground": "#DBDBDC", "selectionInactiveBackground": "#EAEAEB" } }, - "window": "#F4F4F4", + "window": "#FAFAFA", "windowBorder": "#DBDBDC", - "windowText": "#7f7f7f", + "windowText": "#9D9D9F", "Window.border": "#DBDBDC" }, "icons": { "ColorPalette": { - "#43494A": "#eaeaeb", - "#6B6B6B": "#7f7f7f", - "#A7A7A7": "#F4F4F4", + "#43494A": "#FFFFFF", + "#6B6B6B": "#9D9D9F", + "#A7A7A7": "#FAFAFA", "#3D6185": "#2979ff", "#466D94": "#2979ff", - "#3C3F41": "#F4F4F4", - "#545556": "#b8b8b9", - "#606060": "#b8b8b9", + "#3C3F41": "#FAFAFA", + "#545556": "#424243", + "#606060": "#424243", "#9AA7B0": "#232324", "#675133": "#2979ff", "Actions.Blue": "#4078F2", "Actions.Green": "#50A14E", - "Actions.Grey": "#7f7f7f", + "Actions.Grey": "#9D9D9F", "Actions.GreyInline": "#A0A1A7", "Actions.GreyInline.Dark": "#232324", "Actions.Red": "#E4564A", "Actions.Yellow": "#C18401", - "Checkbox.Background.Default": "#eaeaeb", - "Checkbox.Background.Default.Dark": "#eaeaeb", - "Checkbox.Background.Disabled": "#CACACB", - "Checkbox.Background.Disabled.Dark": "#CACACB", + "Checkbox.Background.Default": "#FFFFFF", + "Checkbox.Background.Default.Dark": "#FFFFFF", + "Checkbox.Background.Disabled": "#DBDBDC", + "Checkbox.Background.Disabled.Dark": "#DBDBDC", "Checkbox.Border.Default": "#DBDBDC", "Checkbox.Border.Default.Dark": "#DBDBDC", - "Checkbox.Border.Disabled": "#b8b8b9", - "Checkbox.Border.Disabled.Dark": "#b8b8b9", + "Checkbox.Border.Disabled": "#424243", + "Checkbox.Border.Disabled.Dark": "#424243", "Checkbox.Focus.Thin.Default": "#2979ff", "Checkbox.Focus.Thin.Default.Dark": "#2979ff", "Checkbox.Focus.Wide": "#2979ff", "Checkbox.Focus.Wide.Dark": "#2979ff", - "Checkbox.Foreground.Disabled": "#b8b8b9", - "Checkbox.Foreground.Disabled.Dark": "#b8b8b9", + "Checkbox.Foreground.Disabled": "#424243", + "Checkbox.Foreground.Disabled.Dark": "#424243", "Checkbox.Background.Selected": "#2979ff", - "Checkbox.Background.Selected.Dark": "#F4F4F4", + "Checkbox.Background.Selected.Dark": "#FAFAFA", "Checkbox.Border.Selected": "#2979ff", "Checkbox.Border.Selected.Dark": "#2979ff", "Checkbox.Foreground.Selected": "#2979ff", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula Contrast.theme.json index 43655460..557e007c 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula Contrast.theme.json @@ -3,34 +3,40 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Dracula.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/dracula.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#6272A4", "background": "#282A36", "borderColor": "#21222C", - "disabledBackground": "#313341", + "disabledBackground": "#34353D", "disabledForeground": "#6272A4", "disabledText": "#6272A4", - "focusColor": "#6272A4", - "focusedBorderColor": "#FF79C5", + "focusColor": "#44475a", + "focusedBorderColor": "#9580ff", "foreground": "#F8F8F2", - "inactiveBackground": "#313341", + "inactiveBackground": "#34353D", "inactiveForeground": "#6272A4", "infoForeground": "#6272A4", "selectionBackground": "#44475A", "selectionBackgroundInactive": "#282A36", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#282A36", "separatorColor": "#21222C" }, "activeCaption": "#282A36", "ActionButton": { - "hoverBackground": "#FF79C550", - "hoverBorderColor": "#FF79C550", + "hoverBackground": "#9580ff50", + "hoverBorderColor": "#9580ff50", "hoverSeparatorColor": "#393C4B", - "focusedBorderColor": "#FF79C550", - "pressedBackground": "#FF79C550", - "pressedBorderColor": "#FF79C550" + "focusedBorderColor": "#9580ff50", + "pressedBackground": "#9580ff50", + "pressedBorderColor": "#9580ff50" }, "Autocomplete": { "selectionBackground": "#44475A" @@ -44,8 +50,8 @@ "endBackground": "#44475A", "endBorderColor": "#44475A", "foreground": "#8BE9FD", - "focusColor": "#FF79C5", - "focusedBorderColor": "#FF79C5", + "focusColor": "#9580ff", + "focusedBorderColor": "#9580ff", "shadowColor": "#44475A", "startBackground": "#44475A", "startBorderColor": "#44475A" @@ -54,13 +60,13 @@ "disabledText": "#6272A4", "endBackground": "#393C4B", "endBorderColor": "#393C4B", - "focus": "#6272A4", - "focusedBorderColor": "#FF79C5", + "focus": "#44475a", + "focusedBorderColor": "#9580ff", "foreground": "#6272A4", - "highlight": "#8BE9FD", + "highlight": "#FFFFFF", "mt.background": "#393C4B", "mt.foreground": "#6272A4", - "mt.selectedForeground": "#8BE9FD", + "mt.selectedForeground": "#FFFFFF", "mt.selection.color1": "#44475A", "mt.selection.color2": "#44475A", "startBackground": "#393C4B", @@ -72,12 +78,15 @@ "Tooltip.borderColor": "#21222C", "Tooltip.background": "#1D2228" }, - "Content.background": "#191A21", + "Content": { + "background": "#191A21", + "selectionBackground": "#44475A" + }, "CheckBox": { "background": "#282A36", "disabledText": "#6272A4", "foreground": "#F8F8F2", - "select": "#FF79C5" + "select": "#9580ff" }, "CheckBoxMenuItem": { "acceleratorForeground": "#6272A4", @@ -89,6 +98,14 @@ "selectionBackground": "#44475A", "selectionForeground": "#8BE9FD" }, + "CodeWithMe": { + "Avatar.foreground": "#F8F8F2", + "AccessEnabled": { + "accessDot": "#9580ff", + "dropdownBorder": "#282A36", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#282A36", "foreground": "#F8F8F2", @@ -104,9 +121,10 @@ }, "background": "#191A21", "buttonBackground": "#393C4B", + "darcula.hoveredArrowButtonForeground": "#9580ff", "disabledForeground": "#6272A4", "foreground": "#F8F8F2", - "modifiedItemForeground": "#FF79C5", + "modifiedItemForeground": "#9580ff", "nonEditableBackground": "#282A36", "padding": "5,5,5,5", "selectionBackground": "#44475A", @@ -117,62 +135,64 @@ "background": "#282A36", "foreground": "#F8F8F2", "infoForeground": "#6272A4", - "matchForeground": "#FF79C5", - "matchSelectionForeground": "#FF79C5", + "matchForeground": "#9580ff", + "matchSelectionForeground": "#9580ff", "nonFocusedState": "false", - "selectedGrayedForeground": "#8BE9FD", - "selectionGrayForeground": "#8BE9FD", + "selectedGrayedForeground": "#FFFFFF", + "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#6272A4", "selectionInactiveBackground": "#44475A50", "selectionBackground": "#44475A80", - "selectionForeground": "#8BE9FD", - "selectionInfoForeground": "#8BE9FD" + "selectionForeground": "#FFFFFF", + "selectionInfoForeground": "#FFFFFF" }, "Component": { "arc": 4, - "borderColor": "#6272A4", + "borderColor": "#44475a", "disabledBorderColor": "#393C4B", - "focusColor": "#FF79C5", - "focusedBorderColor": "#FF79C5", - "hoverIconColor": "#FF79C5", + "focusColor": "#9580ff", + "focusedBorderColor": "#9580ff", + "hoverIconColor": "#9580ff", "infoForeground": "#6272A4", "iconColor": "#F8F8F2" }, "control": "#282A36", "controlText": "#6272A4", "Counter": { - "background": "#FF79C5", - "foreground": "#8BE9FD" + "background": "#9580ff", + "foreground": "#FFFFFF" }, "Debugger": { "Variables": { "collectingDataForeground": "#6272A4", - "changedValueForeground": "#FF79C5", - "errorMessageForeground": "#FF79C6", + "changedValueForeground": "#9580ff", + "errorMessageForeground": "#8BE9FD", "evaluatingExpressionForeground": "#6272A4", "exceptionForeground": "#50FA7B", - "modifyingValueForeground": "#FF79C5", - "valueForeground": "#FF79C5" + "modifyingValueForeground": "#9580ff", + "valueForeground": "#9580ff" } }, "DebuggerTabs": { - "selectedBackground": "#6272A4", - "underlinedTabBackground": "#6272A4" + "selectedBackground": "#44475a", + "underlinedTabBackground": "#44475a" }, "DebuggerPopup": { - "borderColor": "#6272A4" + "borderColor": "#44475a" }, "DefaultTabs": { "background": "#282A36", "borderColor": "#282A36", "hoverBackground": "#44475A", "hoverColor": "#191A21", - "hoverMaskColor": "#6272A4", + "hoverMaskColor": "#44475a", + "inactiveColoredTabBackground": "#282A36", "inactiveColoredFileBackground": "#393C4B", - "inactiveUnderlineColor": "#6272A4", + "inactiveUnderlineColor": "#9580ff", "inactiveMaskColor": "#191A21", - "underlineColor": "#FF79C5", - "underlinedTabBackground": "#44475A" + "underlineColor": "#9580ff", + "underlinedTabBackground": "#44475A", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#282A36", "DialogWrapper.southPanelBackground": "#282A36", @@ -189,7 +209,7 @@ }, "EditorPane": { "background": "#191A21", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveBackground": "#282A36", "inactiveForeground": "#6272A4", @@ -198,30 +218,32 @@ }, "EditorTabs": { "borderColor": "#282A36", - "hoverColor": "#6272A4", - "hoverMaskColor": "#6272A4", + "hoverBackground": "#44475a", + "hoverColor": "#44475a", + "hoverMaskColor": "#44475a", "inactiveMaskColor": "#282A36", - "inactiveColoredFileBackground": "#282A362", + "inactiveColoredFileBackground": "#282A36", "inactiveUnderlineColor": "#6272A4", "selectedForeground": "#F8F8F2", "selectedBackground": "#44475A", - "underlineColor": "#FF79C5", - "underlinedTabBackground": "#44475A" + "underlineColor": "#9580ff", + "underlinedTabBackground": "#44475A", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#282A36", "borderColor": "#282A36", - "hoverBackground": "#6272A4", - "hoverColor": "#6272A4", - "inactiveUnderlineColor": "#FF79C5", - "underlineColor": "#FF79C5", + "hoverBackground": "#44475a", + "hoverColor": "#44475a", + "inactiveUnderlineColor": "#9580ff", + "underlineColor": "#9580ff", "underlinedTabBackground": "#44475A", "underlinedTabForeground": "#F8F8F2" }, "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#313341", + "Yellow": "#34353D", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -239,19 +261,20 @@ "Focus.color": "#21222C", "FormattedTextField": { "background": "#191A21", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveBackground": "#393C4B", "inactiveForeground": "#6272A4", "selectionForeground": "#8BE9FD", "selectionBackground": "#44475A" }, + "GotItTooltip.borderColor": "#1D2228", "Group": { "disabledSeparatorColor": "#21222C", "separatorColor": "#21222C" }, "GutterTooltip": { - "infoForeground": "#F8F8F2", + "infoForeground": "#6272A4", "lineSeparatorColor": "#282A36" }, "HeaderColor": { @@ -265,7 +288,7 @@ "infoForeground": "#6272A4", "shortcutForeground": "#6272A4" }, - "Hyperlink.linkColor": "#FF79C5", + "Hyperlink.linkColor": "#9580ff", "inactiveCaption": "#282A36", "inactiveCaptionBorder": "#282A36", "inactiveCaptionText": "#6272A4", @@ -288,23 +311,26 @@ "disabledText": "#6272A4", "foreground": "#F8F8F2", "infoForeground": "#6272A4", - "selectedForeground": "#8BE9FD" + "selectedForeground": "#8BE9FD", + "selectedDisabledForeground": "#F8F8F2" }, "Link": { - "activeForeground": "#FF79C5", - "hoverForeground": "#FF79C5", - "pressedForeground": "#FF79C5", + "activeForeground": "#9580ff", + "hoverForeground": "#9580ff", + "pressedForeground": "#9580ff", "secondaryForeground": "#6272A4", - "visitedForeground": "#FF79C5" + "visitedForeground": "#9580ff" }, - "link.foreground": "#FF79C5", + "link.foreground": "#9580ff", "List": { "background": "#282A36", "foreground": "#F8F8F2", + "hoverBackground": "#44475A70", + "hoverInactiveBackground": "#44475A", "selectionBackground": "#44475A50", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#8BE9FD", - "selectionInactiveBackground": "#44475A50" + "selectionInactiveBackground": "#44475A70" }, "material": { "background": "#282A36", @@ -313,19 +339,19 @@ "foreground": "#F8F8F2", "mergeCommits": "#393C4B", "primaryColor": "#6272A4", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "tab.backgroundColor": "#282A36", - "tab.borderColor": "#FF79C5", + "tab.borderColor": "#9580ff", "tagColor": "#6272A4" }, "MemoryIndicator": { "allocatedBackground": "#282A36", - "usedColor": "#6272A4", - "usedBackground": "#6272A4" + "usedColor": "#44475a", + "usedBackground": "#44475a" }, "Menu": { "acceleratorForeground": "#6272A4", - "acceleratorSelectionForeground": "#8BE9FD", + "acceleratorSelectionForeground": "#FFFFFF", "background": "#282A36", "border": "4,2,4,2", "borderColor": "#282A36", @@ -333,7 +359,7 @@ "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "separatorColor": "#21222C" }, "MenuBar": { @@ -344,19 +370,19 @@ "foreground": "#F8F8F2", "highlight": "#282A36", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "shadow": "#191A21" }, "MenuItem": { "acceleratorForeground": "#6272A4", - "acceleratorSelectionForeground": "#8BE9FD", + "acceleratorSelectionForeground": "#FFFFFF", "border": "4,2,4,2", "background": "#282A36", "disabledBackground": "#282A36", "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD" + "selectionForeground": "#FFFFFF" }, "NavBar": { "arrowColor": "#F8F8F2", @@ -370,7 +396,7 @@ "background": "#191A21" } }, - "NewPSD.warning": "#FF79C5", + "NewPSD.warning": "#9580ff", "Notification": { "background": "#1D2228", "borderColor": "#1D2228", @@ -399,7 +425,7 @@ }, "Outline": { "color": "#393C4B", - "focusedColor": "#FF79C5", + "focusedColor": "#9580ff", "disabledColor": "#6272A4" }, "Panel": { @@ -409,8 +435,8 @@ "ParameterInfo": { "background": "#282A36", "borderColor": "#44475A", - "currentOverloadBackground": "#44475A", - "currentParameterForeground": "#FF79C5", + "currentOverloadBackground": "#44475a", + "currentParameterForeground": "#9580ff", "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "infoForeground": "#6272A4", @@ -418,8 +444,8 @@ }, "PasswordField": { "background": "#191A21", - "capsLockIconColor": "#FF79C5", - "caretForeground": "#FF79C5", + "capsLockIconColor": "#9580ff", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -428,21 +454,22 @@ "Plugins": { "background": "#282A36", "disabledForeground": "#6272A4", - "eapTagBackground": "#6272A4", + "eapTagBackground": "#44475a", + "hoverBackground": "#44475A70", "lightSelectionBackground": "#44475A", - "paidTagBackground": "#6272A4", + "paidTagBackground": "#44475a", "selectionBackground": "#44475A", - "tagForeground": "#FF79C5", - "tagBackground": "#6272A4", - "trialTagBackground": "#6272A4", + "tagForeground": "#9580ff", + "tagBackground": "#44475a", + "trialTagBackground": "#44475a", "Button": { "installBackground": "#393C4B", "installBorderColor": "#393C4B", "installForeground": "#F8F8F2", - "installFocusedBackground": "#6272A4", + "installFocusedBackground": "#44475a", "installFillForeground": "#6272A4", "installFillBackground": "#393C4B", - "updateBackground": "#393C4B", + "updateBackground": "#9580ff", "updateBorderColor": "#393C4B", "updateForeground": "#F8F8F2" }, @@ -456,7 +483,7 @@ }, "Tab": { "hoverBackground": "#44475A", - "selectedForeground": "#8BE9FD", + "selectedForeground": "#FFFFFF", "selectedBackground": "#44475A" } }, @@ -464,7 +491,7 @@ "Advertiser": { "background": "#282A36", "borderColor": "#282A36", - "foreground": "#FF79C5" + "foreground": "#9580ff" }, "borderColor": "#191A21", "inactiveBorderColor": "#282A36", @@ -492,15 +519,15 @@ "PopupMenuSeparator.stripeIndent": 5, "ProgressBar": { "background": "#282A36", - "foreground": "#FF79C5", - "indeterminateEndColor": "#FF79C5", - "indeterminateStartColor": "#FF79C5", - "progressColor": "#FF79C5", - "selectionBackground": "#6272A4", - "trackColor": "#6272A4" + "foreground": "#9580ff", + "indeterminateEndColor": "#9580ff", + "indeterminateStartColor": "#9580ff", + "progressColor": "#9580ff", + "selectionBackground": "#44475a", + "trackColor": "#44475a" }, "PsiViewer": { - "referenceHighlightColor": "#FF79C5" + "referenceHighlightColor": "#9580ff" }, "RadioButton": { "background": "#282A36", @@ -515,39 +542,40 @@ "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD" + "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#21222C", "ScrollBar": { "background": "#282A36", - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", "Mac": { - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630", "Transparent": { - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630" } }, - "thumb": "#6272A4", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumb": "#44475a", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630", "Transparent": { - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630" } }, @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#8BE9FD", "selectedForeground": "#8BE9FD", - "selectedBackground": "#6272A4" + "selectedBackground": "#44475a" } }, "SearchMatch": { - "endBackground": "#FF79C5", - "startBackground": "#FF79C5" + "endBackground": "#9580ff", + "startBackground": "#9580ff", + "endColor": "#9580ff", + "startColor": "#9580ff" }, "SearchField.errorBackground": "#1D2228", + "SearchOption": { + "selectedBackground": "#44475A" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#6272A4", + "Repeated.File.Foreground": "#F8F8F2" + }, "Separator": { "background": "#282A36", "foreground": "#282A36", @@ -589,17 +626,17 @@ }, "Slider": { "background": "#282A36", - "buttonBorderColor": "#FF79C5", - "buttonColor": "#FF79C5", + "buttonBorderColor": "#9580ff", + "buttonColor": "#9580ff", "foreground": "#F8F8F2", "majorTickLength": 6, "tickColor": "#282A36", "trackColor": "#44475A", "trackWidth": 7, - "thumb": "#FF79C5" + "thumb": "#9580ff" }, "SpeedSearch": { - "background": "#6272A4", + "background": "#44475a", "borderColor": "#21222C", "foreground": "#F8F8F2", "errorForeground": "#F8F8F2" @@ -616,11 +653,13 @@ }, "SplitPaneDivider.draggingColor": "#282A36", "StatusBar": { - "borderColor": "#282A36" + "borderColor": "#282A36", + "hoverBackground": "#44475a", + "LightEditBackground": "#44475A" }, "TabbedPane": { "background": "#282A36", - "contentAreaColor": "#6272A4", + "contentAreaColor": "#44475a", "contentBorderInsets": "3,1,1,1", "darkShadow": "#21222C", "disabledForeground": "#6272A4", @@ -630,7 +669,7 @@ "fontSizeOffset": 0, "foreground": "#F8F8F2", "highlight": "#21222C", - "hoverColor": "#6272A4", + "hoverColor": "#44475a", "labelShift": 0, "selectedForeground": "#8BE9FD", "selectedLabelShift": 0, @@ -639,27 +678,31 @@ "tabHeight": 32, "tabInsets": "5,10,5,10", "tabSelectionHeight": 2, - "underlineColor": "#FF79C5" + "underlineColor": "#9580ff" }, "TabbedPane.mt.tab.background": "#191A21", "Table": { + "alternativeRowBackground": "#191A21", "background": "#282A36", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", - "dropLineColor": "#FF79C5", - "dropLineShortColor": "#FF79C5", + "disabledForeground": "#6272A4", + "dropLineColor": "#9580ff", + "dropLineShortColor": "#9580ff", "focusCellBackground": "#44475A", "focusCellForeground": "#8BE9FD", "foreground": "#F8F8F2", "gridColor": "#282A36", "highlightOuter": "#44475A", + "hoverBackground": "#44475A70", + "hoverInactiveBackground": "#44475A", "lightSelectionForeground": "#8BE9FD", "lightSelectionInactiveForeground": "#6272A4", "lightSelectionInactiveBackground": "#282A36", "selectionBackground": "#44475A", "selectionForeground": "#8BE9FD", "selectionInactiveBackground": "#44475A", - "selectionInactiveForeground": "#8BE9FD", + "selectionInactiveForeground": "#FFFFFF", "sortIconColor": "#F8F8F2", "stripeColor": "#191A21" }, @@ -680,7 +723,7 @@ "textText": "#6272A4", "TextArea": { "background": "#191A21", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -688,7 +731,7 @@ }, "TextField": { "background": "#191A21", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -696,7 +739,7 @@ }, "TextPane": { "background": "#191A21", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -704,7 +747,7 @@ }, "TitlePane": { "background": "#191A21", - "Button.hoverBackground": "#6272A4", + "Button.hoverBackground": "#44475a", "inactiveBackground": "#282A36", "infoForeground": "#6272A4", "inactiveInfoForeground": "#6272A4" @@ -717,8 +760,8 @@ "foreground": "#F8F8F2", "offForeground": "#282A36", "offBackground": "#282A36", - "onBackground": "#FF79C5", - "onForeground": "#FF79C5" + "onBackground": "#9580ff", + "onForeground": "#9580ff" }, "ToolBar": { "background": "#191A21", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#282A36", "Actions.infoForeground": "#6272A4", - "background": "#282A36", - "borderColor": "#6272A4", + "background": "#1D2228", + "borderColor": "#21222C", "foreground": "#F8F8F2", "infoForeground": "#6272A4", "separatorColor": "#21222C", @@ -751,50 +794,93 @@ "background": "#282A36" }, "HeaderTab": { - "hoverBackground": "#6272A4", - "hoverInactiveBackground": "#282A36", - "inactiveUnderlineColor": "#FF79C5", + "borderColor": "#44475a", + "hoverBackground": "#44475a", + "hoverInactiveBackground": "#44475a", + "inactiveUnderlineColor": "#9580ff", "selectedBackground": "#191A21", "selectedInactiveBackground": "#191A21", - "underlineColor": "#FF79C5", - "underlinedTabBackground": "#6272A4", - "underlinedTabInactiveBackground": "#282A36" + "underlineColor": "#9580ff", + "underlinedTabBackground": "#44475A", + "underlinedTabInactiveBackground": "#282A36", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#F8F8F2" } }, "Tree": { "background": "#191A21", "foreground": "#6272A4", "hash": "#21222C", - "modifiedItemForeground": "#FF79C5", + "hoverBackground": "#44475A70", + "hoverInactiveBackground": "#44475A", + "modifiedItemForeground": "#9580ff", "rowHeight": 28, - "selectionBackground": "#44475A50", - "selectionForeground": "#8BE9FD", - "selectionInactiveForeground": "#8BE9FD", - "selectionInactiveBackground": "#44475A50", + "selectionBackground": "#44475A70", + "selectionForeground": "#FFFFFF", + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#44475A70", "textBackground": "#191A21" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#21222C", - "ColorPicker.background": "#282A36", - "ColorPicker.foreground": "#F8F8F2", - "Component.borderColor": "#21222C", - "Component.background": "#282A36", - "Component.foreground": "#F8F8F2", - "Connector.borderColor": "#21222C", - "Connector.hoverBorderColor": "#6272A4", + "Canvas.background": "#191A21", + "ColorPicker": { + "background": "#282A36", + "foreground": "#F8F8F2" + }, + "Component": { + "borderColor": "#21222C", + "background": "#282A36", + "foreground": "#F8F8F2", + "hoverBorderColor": "#44475a" + }, + "Connector": { + "borderColor": "#21222C", + "hoverBorderColor": "#44475a" + }, "Canvas.background": "#191A21", "highStroke.foreground": "#F8F8F2", "Label.foreground": "#6272A4", - "List.selectionBackground": "#44475A50", - "Panel.borderColor": "#21222C", - "Panel.background": "#282A36", + "List.selectionBackground": "#44475A70", + "motion": { + "borderColor": "#21222C", + "Component.foreground": "#F8F8F2", + "ConstraintSetText.foreground": "#6272A4", + "ConstraintSet.background": "#282A36", + "CSPanel.SelectedFocusBackground": "#44475A", + "CSPanel.SelectedBackground": "#44475A70", + "cs_FocusText.infoForeground": "#6272A4", + "CursorTextColor.foreground": "#F8F8F2", + "HoverColor.disabledBackground": "#6272A4", + "motionGraph.background": "#282A36", + "Notification.background": "#1D2228", + "ourAvg.background": "#282A36", + "ourCS.background": "#282A36", + "ourCS_Border.borderColor": "#21222C", + "ourCS_TextColor.foreground": "#6272A4", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#44475A", + "ourCS_SelectedBorder.pressedBorderColor": "#44475a", + "ourML_BarColor.separatorColor": "#21222C", + "PrimaryPanel.background": "#191A21", + "SecondaryPanel.background": "#282A36", + "SecondaryPanel.header.foreground": "#6272A4", + "SecondaryPanel.header.background": "#191A21", + "timeLine.disabledBorderColor": "#21222C" + }, + "Panel": { + "borderColor": "#21222C", + "background": "#282A36" + }, "percent.foreground": "#F8F8F2", - "Placeholder.background": "#282A36", - "Placeholder.borderColor": "#21222C", - "Placeholder.foreground": "#F8F8F2", - "Placeholder.selectedForeground": "#8BE9FD", + "Placeholder": { + "background": "#282A36", + "borderColor": "#21222C", + "foreground": "#F8F8F2", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#282A36", "stroke.acceleratorForeground": "#6272A4" }, @@ -809,16 +895,16 @@ "selectedBranchBackground": "#282A36" }, "GitCommits": { - "graphColor": "#6272A4" + "graphColor": "#44475a" }, "GitLog": { - "localBranchIconColor": "#FF79C5", + "localBranchIconColor": "#9580ff", "otherIconColor": "#6272A4", "remoteBranchIconColor": "#F8F8F2", "tagIconColor": "#6272A4" }, "HgLog": { - "branchIconColor": "#FF79C5", + "branchIconColor": "#9580ff", "bookmarkIconColor": "#8BE9FD", "closedBranchIconColor": "#6272A4", "localTagIconColor": "#6272A4", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#6272A4", - "Commit.currentBranchBackground": "#282A36" + "Commit.currentBranchBackground": "#282A36", + "Commit.hoveredBackground": "#44475A70" }, "RefLabel": { "foreground": "#8BE9FD", - "backgroundBase": "#6272A4" + "backgroundBase": "#44475a" } }, "Viewport": { @@ -840,16 +927,22 @@ "foreground": "#F8F8F2" }, "WelcomeScreen": { + "AssociatedComponent.background": "#282A36", "background": "#282A36", "borderColor": "#282A36", "captionBackground": "#191A21", "captionForeground": "#F8F8F2", + "Details.background": "#282A36", "footerBackground": "#191A21", "footerForeground": "#F8F8F2", "headerBackground": "#282A36", "headerForeground": "#F8F8F2", + "List.background": "#191A21", "separatorColor": "#21222C", + "SidePanel.background": "#282A36", "Projects": { + "actions.background": "#191A21", + "actions.selectionBackground": "#44475a", "background": "#282A36", "selectionBackground": "#44475A", "selectionInactiveBackground": "#282A36" @@ -865,46 +958,46 @@ "#43494A": "#191A21", "#6B6B6B": "#6272A4", "#A7A7A7": "#282A36", - "#3D6185": "#FF79C5", - "#466D94": "#FF79C5", + "#3D6185": "#9580ff", + "#466D94": "#9580ff", "#3C3F41": "#282A36", "#545556": "#6272A4", "#606060": "#6272A4", "#9AA7B0": "#F8F8F2", - "#675133": "#FF79C5", + "#675133": "#9580ff", "Actions.Blue": "#50FA78", "Actions.Green": "#F1FA8C", "Actions.Grey": "#6272A4", "Actions.GreyInline": "#6272A4", "Actions.GreyInline.Dark": "#F8F8F2", - "Actions.Red": "#FF79C6", + "Actions.Red": "#8BE9FD", "Actions.Yellow": "#50FA7B", "Checkbox.Background.Default": "#191A21", "Checkbox.Background.Default.Dark": "#191A21", - "Checkbox.Background.Disabled": "#313341", - "Checkbox.Background.Disabled.Dark": "#313341", + "Checkbox.Background.Disabled": "#34353D", + "Checkbox.Background.Disabled.Dark": "#34353D", "Checkbox.Border.Default": "#21222C", "Checkbox.Border.Default.Dark": "#21222C", "Checkbox.Border.Disabled": "#6272A4", "Checkbox.Border.Disabled.Dark": "#6272A4", - "Checkbox.Focus.Thin.Default": "#FF79C5", - "Checkbox.Focus.Thin.Default.Dark": "#FF79C5", - "Checkbox.Focus.Wide": "#FF79C5", - "Checkbox.Focus.Wide.Dark": "#FF79C5", + "Checkbox.Focus.Thin.Default": "#9580ff", + "Checkbox.Focus.Thin.Default.Dark": "#9580ff", + "Checkbox.Focus.Wide": "#9580ff", + "Checkbox.Focus.Wide.Dark": "#9580ff", "Checkbox.Foreground.Disabled": "#6272A4", "Checkbox.Foreground.Disabled.Dark": "#6272A4", - "Checkbox.Background.Selected": "#FF79C5", + "Checkbox.Background.Selected": "#9580ff", "Checkbox.Background.Selected.Dark": "#282A36", - "Checkbox.Border.Selected": "#FF79C5", - "Checkbox.Border.Selected.Dark": "#FF79C5", - "Checkbox.Foreground.Selected": "#FF79C5", - "Checkbox.Foreground.Selected.Dark": "#FF79C5", + "Checkbox.Border.Selected": "#9580ff", + "Checkbox.Border.Selected.Dark": "#9580ff", + "Checkbox.Foreground.Selected": "#9580ff", + "Checkbox.Foreground.Selected.Dark": "#9580ff", "Checkbox.Focus.Thin.Selected": "#F8F8F2", "Checkbox.Focus.Thin.Selected.Dark": "#F8F8F2", "Objects.Grey": "#6272A4", "Objects.Blue": "#50FA78", - "Objects.RedStatus": "#FF79C6", - "Objects.Red": "#FF79C6", + "Objects.RedStatus": "#8BE9FD", + "Objects.Red": "#8BE9FD", "Objects.Pink": "#FF79C6", "Objects.Yellow": "#50FA7B", "Objects.Green": "#F1FA8C", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula.theme.json index f98bc16b..ad3cca1e 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Dracula.theme.json @@ -3,34 +3,40 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Dracula.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/dracula.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#6272A4", "background": "#282A36", "borderColor": "#21222C", - "disabledBackground": "#313341", + "disabledBackground": "#34353D", "disabledForeground": "#6272A4", "disabledText": "#6272A4", - "focusColor": "#6272A4", - "focusedBorderColor": "#FF79C5", + "focusColor": "#44475a", + "focusedBorderColor": "#9580ff", "foreground": "#F8F8F2", - "inactiveBackground": "#313341", + "inactiveBackground": "#34353D", "inactiveForeground": "#6272A4", "infoForeground": "#6272A4", "selectionBackground": "#44475A", "selectionBackgroundInactive": "#282A36", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#282A36", "separatorColor": "#21222C" }, "activeCaption": "#282A36", "ActionButton": { - "hoverBackground": "#FF79C550", - "hoverBorderColor": "#FF79C550", + "hoverBackground": "#9580ff50", + "hoverBorderColor": "#9580ff50", "hoverSeparatorColor": "#393C4B", - "focusedBorderColor": "#FF79C550", - "pressedBackground": "#FF79C550", - "pressedBorderColor": "#FF79C550" + "focusedBorderColor": "#9580ff50", + "pressedBackground": "#9580ff50", + "pressedBorderColor": "#9580ff50" }, "Autocomplete": { "selectionBackground": "#44475A" @@ -44,8 +50,8 @@ "endBackground": "#44475A", "endBorderColor": "#44475A", "foreground": "#8BE9FD", - "focusColor": "#FF79C5", - "focusedBorderColor": "#FF79C5", + "focusColor": "#9580ff", + "focusedBorderColor": "#9580ff", "shadowColor": "#44475A", "startBackground": "#44475A", "startBorderColor": "#44475A" @@ -54,13 +60,13 @@ "disabledText": "#6272A4", "endBackground": "#393C4B", "endBorderColor": "#393C4B", - "focus": "#6272A4", - "focusedBorderColor": "#FF79C5", + "focus": "#44475a", + "focusedBorderColor": "#9580ff", "foreground": "#6272A4", - "highlight": "#8BE9FD", + "highlight": "#FFFFFF", "mt.background": "#393C4B", "mt.foreground": "#6272A4", - "mt.selectedForeground": "#8BE9FD", + "mt.selectedForeground": "#FFFFFF", "mt.selection.color1": "#44475A", "mt.selection.color2": "#44475A", "startBackground": "#393C4B", @@ -72,12 +78,15 @@ "Tooltip.borderColor": "#21222C", "Tooltip.background": "#1D2228" }, - "Content.background": "#191A21", + "Content": { + "background": "#191A21", + "selectionBackground": "#44475A" + }, "CheckBox": { "background": "#282A36", "disabledText": "#6272A4", "foreground": "#F8F8F2", - "select": "#FF79C5" + "select": "#9580ff" }, "CheckBoxMenuItem": { "acceleratorForeground": "#6272A4", @@ -89,6 +98,14 @@ "selectionBackground": "#44475A", "selectionForeground": "#8BE9FD" }, + "CodeWithMe": { + "Avatar.foreground": "#F8F8F2", + "AccessEnabled": { + "accessDot": "#9580ff", + "dropdownBorder": "#282A36", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#282A36", "foreground": "#F8F8F2", @@ -104,9 +121,10 @@ }, "background": "#282A36", "buttonBackground": "#393C4B", + "darcula.hoveredArrowButtonForeground": "#9580ff", "disabledForeground": "#6272A4", "foreground": "#F8F8F2", - "modifiedItemForeground": "#FF79C5", + "modifiedItemForeground": "#9580ff", "nonEditableBackground": "#282A36", "padding": "5,5,5,5", "selectionBackground": "#44475A", @@ -117,62 +135,64 @@ "background": "#282A36", "foreground": "#F8F8F2", "infoForeground": "#6272A4", - "matchForeground": "#FF79C5", - "matchSelectionForeground": "#FF79C5", + "matchForeground": "#9580ff", + "matchSelectionForeground": "#9580ff", "nonFocusedState": "false", - "selectedGrayedForeground": "#8BE9FD", - "selectionGrayForeground": "#8BE9FD", + "selectedGrayedForeground": "#FFFFFF", + "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#6272A4", "selectionInactiveBackground": "#44475A50", "selectionBackground": "#44475A80", - "selectionForeground": "#8BE9FD", - "selectionInfoForeground": "#8BE9FD" + "selectionForeground": "#FFFFFF", + "selectionInfoForeground": "#FFFFFF" }, "Component": { "arc": 4, - "borderColor": "#6272A4", + "borderColor": "#44475a", "disabledBorderColor": "#393C4B", - "focusColor": "#FF79C5", - "focusedBorderColor": "#FF79C5", - "hoverIconColor": "#FF79C5", + "focusColor": "#9580ff", + "focusedBorderColor": "#9580ff", + "hoverIconColor": "#9580ff", "infoForeground": "#6272A4", "iconColor": "#F8F8F2" }, "control": "#282A36", "controlText": "#6272A4", "Counter": { - "background": "#FF79C5", - "foreground": "#8BE9FD" + "background": "#9580ff", + "foreground": "#FFFFFF" }, "Debugger": { "Variables": { "collectingDataForeground": "#6272A4", - "changedValueForeground": "#FF79C5", - "errorMessageForeground": "#FF79C6", + "changedValueForeground": "#9580ff", + "errorMessageForeground": "#8BE9FD", "evaluatingExpressionForeground": "#6272A4", "exceptionForeground": "#50FA7B", - "modifyingValueForeground": "#FF79C5", - "valueForeground": "#FF79C5" + "modifyingValueForeground": "#9580ff", + "valueForeground": "#9580ff" } }, "DebuggerTabs": { - "selectedBackground": "#6272A4", - "underlinedTabBackground": "#6272A4" + "selectedBackground": "#44475a", + "underlinedTabBackground": "#44475a" }, "DebuggerPopup": { - "borderColor": "#6272A4" + "borderColor": "#44475a" }, "DefaultTabs": { "background": "#282A36", "borderColor": "#282A36", "hoverBackground": "#44475A", "hoverColor": "#282A36", - "hoverMaskColor": "#6272A4", + "hoverMaskColor": "#44475a", + "inactiveColoredTabBackground": "#282A36", "inactiveColoredFileBackground": "#393C4B", - "inactiveUnderlineColor": "#6272A4", + "inactiveUnderlineColor": "#9580ff", "inactiveMaskColor": "#282A36", - "underlineColor": "#FF79C5", - "underlinedTabBackground": "#44475A" + "underlineColor": "#9580ff", + "underlinedTabBackground": "#44475A", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#282A36", "DialogWrapper.southPanelBackground": "#282A36", @@ -189,7 +209,7 @@ }, "EditorPane": { "background": "#282A36", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveBackground": "#282A36", "inactiveForeground": "#6272A4", @@ -198,30 +218,32 @@ }, "EditorTabs": { "borderColor": "#282A36", - "hoverColor": "#6272A4", - "hoverMaskColor": "#6272A4", + "hoverBackground": "#44475a", + "hoverColor": "#44475a", + "hoverMaskColor": "#44475a", "inactiveMaskColor": "#282A36", - "inactiveColoredFileBackground": "#282A362", + "inactiveColoredFileBackground": "#282A36", "inactiveUnderlineColor": "#6272A4", "selectedForeground": "#F8F8F2", "selectedBackground": "#44475A", - "underlineColor": "#FF79C5", - "underlinedTabBackground": "#44475A" + "underlineColor": "#9580ff", + "underlinedTabBackground": "#44475A", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#282A36", "borderColor": "#282A36", - "hoverBackground": "#6272A4", - "hoverColor": "#6272A4", - "inactiveUnderlineColor": "#FF79C5", - "underlineColor": "#FF79C5", + "hoverBackground": "#44475a", + "hoverColor": "#44475a", + "inactiveUnderlineColor": "#9580ff", + "underlineColor": "#9580ff", "underlinedTabBackground": "#44475A", "underlinedTabForeground": "#F8F8F2" }, "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#313341", + "Yellow": "#34353D", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -239,19 +261,20 @@ "Focus.color": "#21222C", "FormattedTextField": { "background": "#282A36", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveBackground": "#393C4B", "inactiveForeground": "#6272A4", "selectionForeground": "#8BE9FD", "selectionBackground": "#44475A" }, + "GotItTooltip.borderColor": "#1D2228", "Group": { "disabledSeparatorColor": "#21222C", "separatorColor": "#21222C" }, "GutterTooltip": { - "infoForeground": "#F8F8F2", + "infoForeground": "#6272A4", "lineSeparatorColor": "#282A36" }, "HeaderColor": { @@ -265,7 +288,7 @@ "infoForeground": "#6272A4", "shortcutForeground": "#6272A4" }, - "Hyperlink.linkColor": "#FF79C5", + "Hyperlink.linkColor": "#9580ff", "inactiveCaption": "#282A36", "inactiveCaptionBorder": "#282A36", "inactiveCaptionText": "#6272A4", @@ -288,23 +311,26 @@ "disabledText": "#6272A4", "foreground": "#F8F8F2", "infoForeground": "#6272A4", - "selectedForeground": "#8BE9FD" + "selectedForeground": "#8BE9FD", + "selectedDisabledForeground": "#F8F8F2" }, "Link": { - "activeForeground": "#FF79C5", - "hoverForeground": "#FF79C5", - "pressedForeground": "#FF79C5", + "activeForeground": "#9580ff", + "hoverForeground": "#9580ff", + "pressedForeground": "#9580ff", "secondaryForeground": "#6272A4", - "visitedForeground": "#FF79C5" + "visitedForeground": "#9580ff" }, - "link.foreground": "#FF79C5", + "link.foreground": "#9580ff", "List": { "background": "#282A36", "foreground": "#F8F8F2", + "hoverBackground": "#44475A70", + "hoverInactiveBackground": "#44475A", "selectionBackground": "#44475A50", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#8BE9FD", - "selectionInactiveBackground": "#44475A50" + "selectionInactiveBackground": "#44475A70" }, "material": { "background": "#282A36", @@ -313,19 +339,19 @@ "foreground": "#F8F8F2", "mergeCommits": "#393C4B", "primaryColor": "#6272A4", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "tab.backgroundColor": "#282A36", - "tab.borderColor": "#FF79C5", + "tab.borderColor": "#9580ff", "tagColor": "#6272A4" }, "MemoryIndicator": { "allocatedBackground": "#282A36", - "usedColor": "#6272A4", - "usedBackground": "#6272A4" + "usedColor": "#44475a", + "usedBackground": "#44475a" }, "Menu": { "acceleratorForeground": "#6272A4", - "acceleratorSelectionForeground": "#8BE9FD", + "acceleratorSelectionForeground": "#FFFFFF", "background": "#282A36", "border": "4,2,4,2", "borderColor": "#282A36", @@ -333,7 +359,7 @@ "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "separatorColor": "#21222C" }, "MenuBar": { @@ -344,19 +370,19 @@ "foreground": "#F8F8F2", "highlight": "#282A36", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD", + "selectionForeground": "#FFFFFF", "shadow": "#282A36" }, "MenuItem": { "acceleratorForeground": "#6272A4", - "acceleratorSelectionForeground": "#8BE9FD", + "acceleratorSelectionForeground": "#FFFFFF", "border": "4,2,4,2", "background": "#282A36", "disabledBackground": "#282A36", "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD" + "selectionForeground": "#FFFFFF" }, "NavBar": { "arrowColor": "#F8F8F2", @@ -370,7 +396,7 @@ "background": "#282A36" } }, - "NewPSD.warning": "#FF79C5", + "NewPSD.warning": "#9580ff", "Notification": { "background": "#1D2228", "borderColor": "#1D2228", @@ -399,7 +425,7 @@ }, "Outline": { "color": "#393C4B", - "focusedColor": "#FF79C5", + "focusedColor": "#9580ff", "disabledColor": "#6272A4" }, "Panel": { @@ -409,8 +435,8 @@ "ParameterInfo": { "background": "#282A36", "borderColor": "#44475A", - "currentOverloadBackground": "#44475A", - "currentParameterForeground": "#FF79C5", + "currentOverloadBackground": "#44475a", + "currentParameterForeground": "#9580ff", "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "infoForeground": "#6272A4", @@ -418,8 +444,8 @@ }, "PasswordField": { "background": "#282A36", - "capsLockIconColor": "#FF79C5", - "caretForeground": "#FF79C5", + "capsLockIconColor": "#9580ff", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -428,21 +454,22 @@ "Plugins": { "background": "#282A36", "disabledForeground": "#6272A4", - "eapTagBackground": "#6272A4", + "eapTagBackground": "#44475a", + "hoverBackground": "#44475A70", "lightSelectionBackground": "#44475A", - "paidTagBackground": "#6272A4", + "paidTagBackground": "#44475a", "selectionBackground": "#44475A", - "tagForeground": "#FF79C5", - "tagBackground": "#6272A4", - "trialTagBackground": "#6272A4", + "tagForeground": "#9580ff", + "tagBackground": "#44475a", + "trialTagBackground": "#44475a", "Button": { "installBackground": "#393C4B", "installBorderColor": "#393C4B", "installForeground": "#F8F8F2", - "installFocusedBackground": "#6272A4", + "installFocusedBackground": "#44475a", "installFillForeground": "#6272A4", "installFillBackground": "#393C4B", - "updateBackground": "#393C4B", + "updateBackground": "#9580ff", "updateBorderColor": "#393C4B", "updateForeground": "#F8F8F2" }, @@ -456,7 +483,7 @@ }, "Tab": { "hoverBackground": "#44475A", - "selectedForeground": "#8BE9FD", + "selectedForeground": "#FFFFFF", "selectedBackground": "#44475A" } }, @@ -464,7 +491,7 @@ "Advertiser": { "background": "#282A36", "borderColor": "#282A36", - "foreground": "#FF79C5" + "foreground": "#9580ff" }, "borderColor": "#191A21", "inactiveBorderColor": "#282A36", @@ -492,15 +519,15 @@ "PopupMenuSeparator.stripeIndent": 5, "ProgressBar": { "background": "#282A36", - "foreground": "#FF79C5", - "indeterminateEndColor": "#FF79C5", - "indeterminateStartColor": "#FF79C5", - "progressColor": "#FF79C5", - "selectionBackground": "#6272A4", - "trackColor": "#6272A4" + "foreground": "#9580ff", + "indeterminateEndColor": "#9580ff", + "indeterminateStartColor": "#9580ff", + "progressColor": "#9580ff", + "selectionBackground": "#44475a", + "trackColor": "#44475a" }, "PsiViewer": { - "referenceHighlightColor": "#FF79C5" + "referenceHighlightColor": "#9580ff" }, "RadioButton": { "background": "#282A36", @@ -515,39 +542,40 @@ "disabledForeground": "#6272A4", "foreground": "#F8F8F2", "selectionBackground": "#44475A", - "selectionForeground": "#8BE9FD" + "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#21222C", "ScrollBar": { "background": "#282A36", - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", "Mac": { - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630", "Transparent": { - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630" } }, - "thumb": "#6272A4", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumb": "#44475a", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630", "Transparent": { - "hoverThumbBorderColor": "#FF79C5", - "hoverThumbColor": "#FF79C5", + "hoverThumbBorderColor": "#9580ff", + "hoverThumbColor": "#9580ff", "hoverTrackColor": "#282A3630", - "thumbBorderColor": "#FF79C570", - "thumbColor": "#FF79C570", + "thumbBorderColor": "#9580ff70", + "thumbColor": "#9580ff70", "trackColor": "#282A3630" } }, @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#8BE9FD", "selectedForeground": "#8BE9FD", - "selectedBackground": "#6272A4" + "selectedBackground": "#44475a" } }, "SearchMatch": { - "endBackground": "#FF79C5", - "startBackground": "#FF79C5" + "endBackground": "#9580ff", + "startBackground": "#9580ff", + "endColor": "#9580ff", + "startColor": "#9580ff" }, "SearchField.errorBackground": "#1D2228", + "SearchOption": { + "selectedBackground": "#44475A" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#6272A4", + "Repeated.File.Foreground": "#F8F8F2" + }, "Separator": { "background": "#282A36", "foreground": "#282A36", @@ -589,17 +626,17 @@ }, "Slider": { "background": "#282A36", - "buttonBorderColor": "#FF79C5", - "buttonColor": "#FF79C5", + "buttonBorderColor": "#9580ff", + "buttonColor": "#9580ff", "foreground": "#F8F8F2", "majorTickLength": 6, "tickColor": "#282A36", "trackColor": "#44475A", "trackWidth": 7, - "thumb": "#FF79C5" + "thumb": "#9580ff" }, "SpeedSearch": { - "background": "#6272A4", + "background": "#44475a", "borderColor": "#21222C", "foreground": "#F8F8F2", "errorForeground": "#F8F8F2" @@ -616,11 +653,13 @@ }, "SplitPaneDivider.draggingColor": "#282A36", "StatusBar": { - "borderColor": "#282A36" + "borderColor": "#282A36", + "hoverBackground": "#44475a", + "LightEditBackground": "#44475A" }, "TabbedPane": { "background": "#282A36", - "contentAreaColor": "#6272A4", + "contentAreaColor": "#44475a", "contentBorderInsets": "3,1,1,1", "darkShadow": "#21222C", "disabledForeground": "#6272A4", @@ -630,7 +669,7 @@ "fontSizeOffset": 0, "foreground": "#F8F8F2", "highlight": "#21222C", - "hoverColor": "#6272A4", + "hoverColor": "#44475a", "labelShift": 0, "selectedForeground": "#8BE9FD", "selectedLabelShift": 0, @@ -639,27 +678,31 @@ "tabHeight": 32, "tabInsets": "5,10,5,10", "tabSelectionHeight": 2, - "underlineColor": "#FF79C5" + "underlineColor": "#9580ff" }, "TabbedPane.mt.tab.background": "#282A36", "Table": { + "alternativeRowBackground": "#191A21", "background": "#282A36", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", - "dropLineColor": "#FF79C5", - "dropLineShortColor": "#FF79C5", + "disabledForeground": "#6272A4", + "dropLineColor": "#9580ff", + "dropLineShortColor": "#9580ff", "focusCellBackground": "#44475A", "focusCellForeground": "#8BE9FD", "foreground": "#F8F8F2", "gridColor": "#282A36", "highlightOuter": "#44475A", + "hoverBackground": "#44475A70", + "hoverInactiveBackground": "#44475A", "lightSelectionForeground": "#8BE9FD", "lightSelectionInactiveForeground": "#6272A4", "lightSelectionInactiveBackground": "#282A36", "selectionBackground": "#44475A", "selectionForeground": "#8BE9FD", "selectionInactiveBackground": "#44475A", - "selectionInactiveForeground": "#8BE9FD", + "selectionInactiveForeground": "#FFFFFF", "sortIconColor": "#F8F8F2", "stripeColor": "#191A21" }, @@ -680,7 +723,7 @@ "textText": "#6272A4", "TextArea": { "background": "#282A36", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -688,7 +731,7 @@ }, "TextField": { "background": "#282A36", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -696,7 +739,7 @@ }, "TextPane": { "background": "#282A36", - "caretForeground": "#FF79C5", + "caretForeground": "#9580ff", "foreground": "#F8F8F2", "inactiveForeground": "#6272A4", "selectionBackground": "#44475A", @@ -704,7 +747,7 @@ }, "TitlePane": { "background": "#191A21", - "Button.hoverBackground": "#6272A4", + "Button.hoverBackground": "#44475a", "inactiveBackground": "#282A36", "infoForeground": "#6272A4", "inactiveInfoForeground": "#6272A4" @@ -717,8 +760,8 @@ "foreground": "#F8F8F2", "offForeground": "#282A36", "offBackground": "#282A36", - "onBackground": "#FF79C5", - "onForeground": "#FF79C5" + "onBackground": "#9580ff", + "onForeground": "#9580ff" }, "ToolBar": { "background": "#282A36", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#282A36", "Actions.infoForeground": "#6272A4", - "background": "#282A36", - "borderColor": "#6272A4", + "background": "#1D2228", + "borderColor": "#21222C", "foreground": "#F8F8F2", "infoForeground": "#6272A4", "separatorColor": "#21222C", @@ -751,50 +794,93 @@ "background": "#282A36" }, "HeaderTab": { - "hoverBackground": "#6272A4", - "hoverInactiveBackground": "#282A36", - "inactiveUnderlineColor": "#FF79C5", + "borderColor": "#44475a", + "hoverBackground": "#44475a", + "hoverInactiveBackground": "#44475a", + "inactiveUnderlineColor": "#9580ff", "selectedBackground": "#191A21", "selectedInactiveBackground": "#191A21", - "underlineColor": "#FF79C5", - "underlinedTabBackground": "#6272A4", - "underlinedTabInactiveBackground": "#282A36" + "underlineColor": "#9580ff", + "underlinedTabBackground": "#44475A", + "underlinedTabInactiveBackground": "#282A36", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#F8F8F2" } }, "Tree": { "background": "#282A36", "foreground": "#6272A4", "hash": "#21222C", - "modifiedItemForeground": "#FF79C5", + "hoverBackground": "#44475A70", + "hoverInactiveBackground": "#44475A", + "modifiedItemForeground": "#9580ff", "rowHeight": 28, - "selectionBackground": "#44475A50", - "selectionForeground": "#8BE9FD", - "selectionInactiveForeground": "#8BE9FD", - "selectionInactiveBackground": "#44475A50", + "selectionBackground": "#44475A70", + "selectionForeground": "#FFFFFF", + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#44475A70", "textBackground": "#282A36" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#21222C", - "ColorPicker.background": "#282A36", - "ColorPicker.foreground": "#F8F8F2", - "Component.borderColor": "#21222C", - "Component.background": "#282A36", - "Component.foreground": "#F8F8F2", - "Connector.borderColor": "#21222C", - "Connector.hoverBorderColor": "#6272A4", + "Canvas.background": "#191A21", + "ColorPicker": { + "background": "#282A36", + "foreground": "#F8F8F2" + }, + "Component": { + "borderColor": "#21222C", + "background": "#282A36", + "foreground": "#F8F8F2", + "hoverBorderColor": "#44475a" + }, + "Connector": { + "borderColor": "#21222C", + "hoverBorderColor": "#44475a" + }, "Canvas.background": "#191A21", "highStroke.foreground": "#F8F8F2", "Label.foreground": "#6272A4", - "List.selectionBackground": "#44475A50", - "Panel.borderColor": "#21222C", - "Panel.background": "#282A36", + "List.selectionBackground": "#44475A70", + "motion": { + "borderColor": "#21222C", + "Component.foreground": "#F8F8F2", + "ConstraintSetText.foreground": "#6272A4", + "ConstraintSet.background": "#282A36", + "CSPanel.SelectedFocusBackground": "#44475A", + "CSPanel.SelectedBackground": "#44475A70", + "cs_FocusText.infoForeground": "#6272A4", + "CursorTextColor.foreground": "#F8F8F2", + "HoverColor.disabledBackground": "#6272A4", + "motionGraph.background": "#282A36", + "Notification.background": "#1D2228", + "ourAvg.background": "#282A36", + "ourCS.background": "#282A36", + "ourCS_Border.borderColor": "#21222C", + "ourCS_TextColor.foreground": "#6272A4", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#44475A", + "ourCS_SelectedBorder.pressedBorderColor": "#44475a", + "ourML_BarColor.separatorColor": "#21222C", + "PrimaryPanel.background": "#191A21", + "SecondaryPanel.background": "#282A36", + "SecondaryPanel.header.foreground": "#6272A4", + "SecondaryPanel.header.background": "#191A21", + "timeLine.disabledBorderColor": "#21222C" + }, + "Panel": { + "borderColor": "#21222C", + "background": "#282A36" + }, "percent.foreground": "#F8F8F2", - "Placeholder.background": "#282A36", - "Placeholder.borderColor": "#21222C", - "Placeholder.foreground": "#F8F8F2", - "Placeholder.selectedForeground": "#8BE9FD", + "Placeholder": { + "background": "#282A36", + "borderColor": "#21222C", + "foreground": "#F8F8F2", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#282A36", "stroke.acceleratorForeground": "#6272A4" }, @@ -809,16 +895,16 @@ "selectedBranchBackground": "#282A36" }, "GitCommits": { - "graphColor": "#6272A4" + "graphColor": "#44475a" }, "GitLog": { - "localBranchIconColor": "#FF79C5", + "localBranchIconColor": "#9580ff", "otherIconColor": "#6272A4", "remoteBranchIconColor": "#F8F8F2", "tagIconColor": "#6272A4" }, "HgLog": { - "branchIconColor": "#FF79C5", + "branchIconColor": "#9580ff", "bookmarkIconColor": "#8BE9FD", "closedBranchIconColor": "#6272A4", "localTagIconColor": "#6272A4", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#6272A4", - "Commit.currentBranchBackground": "#282A36" + "Commit.currentBranchBackground": "#282A36", + "Commit.hoveredBackground": "#44475A70" }, "RefLabel": { "foreground": "#8BE9FD", - "backgroundBase": "#6272A4" + "backgroundBase": "#44475a" } }, "Viewport": { @@ -840,16 +927,22 @@ "foreground": "#F8F8F2" }, "WelcomeScreen": { + "AssociatedComponent.background": "#282A36", "background": "#282A36", "borderColor": "#282A36", "captionBackground": "#191A21", "captionForeground": "#F8F8F2", + "Details.background": "#282A36", "footerBackground": "#191A21", "footerForeground": "#F8F8F2", "headerBackground": "#282A36", "headerForeground": "#F8F8F2", + "List.background": "#191A21", "separatorColor": "#21222C", + "SidePanel.background": "#282A36", "Projects": { + "actions.background": "#191A21", + "actions.selectionBackground": "#44475a", "background": "#282A36", "selectionBackground": "#44475A", "selectionInactiveBackground": "#282A36" @@ -865,46 +958,46 @@ "#43494A": "#191A21", "#6B6B6B": "#6272A4", "#A7A7A7": "#282A36", - "#3D6185": "#FF79C5", - "#466D94": "#FF79C5", + "#3D6185": "#9580ff", + "#466D94": "#9580ff", "#3C3F41": "#282A36", "#545556": "#6272A4", "#606060": "#6272A4", "#9AA7B0": "#F8F8F2", - "#675133": "#FF79C5", + "#675133": "#9580ff", "Actions.Blue": "#50FA78", "Actions.Green": "#F1FA8C", "Actions.Grey": "#6272A4", "Actions.GreyInline": "#6272A4", "Actions.GreyInline.Dark": "#F8F8F2", - "Actions.Red": "#FF79C6", + "Actions.Red": "#8BE9FD", "Actions.Yellow": "#50FA7B", "Checkbox.Background.Default": "#191A21", "Checkbox.Background.Default.Dark": "#191A21", - "Checkbox.Background.Disabled": "#313341", - "Checkbox.Background.Disabled.Dark": "#313341", + "Checkbox.Background.Disabled": "#34353D", + "Checkbox.Background.Disabled.Dark": "#34353D", "Checkbox.Border.Default": "#21222C", "Checkbox.Border.Default.Dark": "#21222C", "Checkbox.Border.Disabled": "#6272A4", "Checkbox.Border.Disabled.Dark": "#6272A4", - "Checkbox.Focus.Thin.Default": "#FF79C5", - "Checkbox.Focus.Thin.Default.Dark": "#FF79C5", - "Checkbox.Focus.Wide": "#FF79C5", - "Checkbox.Focus.Wide.Dark": "#FF79C5", + "Checkbox.Focus.Thin.Default": "#9580ff", + "Checkbox.Focus.Thin.Default.Dark": "#9580ff", + "Checkbox.Focus.Wide": "#9580ff", + "Checkbox.Focus.Wide.Dark": "#9580ff", "Checkbox.Foreground.Disabled": "#6272A4", "Checkbox.Foreground.Disabled.Dark": "#6272A4", - "Checkbox.Background.Selected": "#FF79C5", + "Checkbox.Background.Selected": "#9580ff", "Checkbox.Background.Selected.Dark": "#282A36", - "Checkbox.Border.Selected": "#FF79C5", - "Checkbox.Border.Selected.Dark": "#FF79C5", - "Checkbox.Foreground.Selected": "#FF79C5", - "Checkbox.Foreground.Selected.Dark": "#FF79C5", + "Checkbox.Border.Selected": "#9580ff", + "Checkbox.Border.Selected.Dark": "#9580ff", + "Checkbox.Foreground.Selected": "#9580ff", + "Checkbox.Foreground.Selected.Dark": "#9580ff", "Checkbox.Focus.Thin.Selected": "#F8F8F2", "Checkbox.Focus.Thin.Selected.Dark": "#F8F8F2", "Objects.Grey": "#6272A4", "Objects.Blue": "#50FA78", - "Objects.RedStatus": "#FF79C6", - "Objects.Red": "#FF79C6", + "Objects.RedStatus": "#8BE9FD", + "Objects.Red": "#8BE9FD", "Objects.Pink": "#FF79C6", "Objects.Yellow": "#50FA7B", "Objects.Green": "#F1FA8C", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub Contrast.theme.json index 8cba9e36..53d3bddc 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub Contrast.theme.json @@ -2,32 +2,38 @@ "name": "GitHub Contrast", "dark": false, "author": "Mallowigi", - "editorScheme": "/colors/Github.xml", + "editorScheme": "/colors/GitHub (Material).xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/github.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#292D31", "background": "#F7F8FA", "borderColor": "#DFE1E4", - "disabledBackground": "#dcdcdc", - "disabledForeground": "#9ba0a3", - "disabledText": "#9ba0a3", + "disabledBackground": "#FDFDFD", + "disabledForeground": "#6C737C", + "disabledText": "#6C737C", "focusColor": "#CCE5FF", "focusedBorderColor": "#79CB60", "foreground": "#5B6168", - "inactiveBackground": "#dcdcdc", + "inactiveBackground": "#FDFDFD", "inactiveForeground": "#292D31", "infoForeground": "#292D31", "selectionBackground": "#3A66D1", - "selectionBackgroundInactive": "#f3f3f3", - "selectionForeground": "#FFFFFF", - "selectionInactiveBackground": "#f3f3f3", + "selectionBackgroundInactive": "#F7F8FA", + "selectionForeground": "#111111", + "selectionInactiveBackground": "#F7F8FA", "separatorColor": "#DFE1E4" }, "activeCaption": "#F7F8FA", "ActionButton": { "hoverBackground": "#79CB6050", "hoverBorderColor": "#79CB6050", - "hoverSeparatorColor": "#edf1f5", + "hoverSeparatorColor": "#F1F3F6", "focusedBorderColor": "#79CB6050", "pressedBackground": "#79CB6050", "pressedBorderColor": "#79CB6050" @@ -50,32 +56,35 @@ "startBackground": "#cce5ff", "startBorderColor": "#cce5ff" }, - "disabledBorderColor": "#edf1f5", - "disabledText": "#9ba0a3", - "endBackground": "#edf1f5", - "endBorderColor": "#edf1f5", + "disabledBorderColor": "#F1F3F6", + "disabledText": "#6C737C", + "endBackground": "#F1F3F6", + "endBorderColor": "#F1F3F6", "focus": "#CCE5FF", "focusedBorderColor": "#79CB60", "foreground": "#292D31", - "highlight": "#FFFFFF", - "mt.background": "#edf1f5", + "highlight": "#111111", + "mt.background": "#F1F3F6", "mt.foreground": "#292D31", - "mt.selectedForeground": "#FFFFFF", + "mt.selectedForeground": "#111111", "mt.selection.color1": "#cce5ff", "mt.selection.color2": "#cce5ff", - "startBackground": "#edf1f5", - "startBorderColor": "#edf1f5", - "shadowColor": "#edf1f5", + "startBackground": "#F1F3F6", + "startBorderColor": "#F1F3F6", + "shadowColor": "#F1F3F6", "shadowWidth": 0 }, "Canvas": { "Tooltip.borderColor": "#DFE1E4", "Tooltip.background": "#DFECFE" }, - "Content.background": "#fafbfc", + "Content": { + "background": "#FFFFFF", + "selectionBackground": "#3A66D1" + }, "CheckBox": { "background": "#F7F8FA", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168", "select": "#79CB60" }, @@ -84,54 +93,63 @@ "acceleratorSelectionForeground": "#292D31", "background": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", "selectionForeground": "#111111" }, + "CodeWithMe": { + "Avatar.foreground": "#5B6168", + "AccessEnabled": { + "accessDot": "#79CB60", + "dropdownBorder": "#F7F8FA", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#F7F8FA", "foreground": "#5B6168", "swatchesDefaultRecentColor": "#5B6168" }, - "ComboBoxButton.background": "#edf1f5", + "ComboBoxButton.background": "#F1F3F6", "ComboBox": { "ArrowButton": { - "background": "#edf1f5", - "disabledIconColor": "#9ba0a3", + "background": "#F1F3F6", + "disabledIconColor": "#6C737C", "iconColor": "#5B6168", "nonEditableBackground": "#F7F8FA" }, - "background": "#fafbfc", - "buttonBackground": "#edf1f5", - "disabledForeground": "#9ba0a3", + "background": "#FFFFFF", + "buttonBackground": "#F1F3F6", + "darcula.hoveredArrowButtonForeground": "#79CB60", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "modifiedItemForeground": "#79CB60", - "nonEditableBackground": "#f3f3f3", + "nonEditableBackground": "#F7F8FA", "padding": "5,5,5,5", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "ComboPopup.border": "#DFE1E4", "CompletionPopup": { - "background": "#f3f3f3", + "background": "#F7F8FA", "foreground": "#5B6168", "infoForeground": "#292D31", "matchForeground": "#79CB60", "matchSelectionForeground": "#79CB60", "nonFocusedState": "false", - "selectedGrayedForeground": "#FFFFFF", - "selectionGrayForeground": "#FFFFFF", + "selectedGrayedForeground": "#111111", + "selectionGrayForeground": "#111111", "selectionInactiveInfoForeground": "#292D31", "selectionInactiveBackground": "#3A66D150", "selectionBackground": "#3A66D180", - "selectionForeground": "#FFFFFF", - "selectionInfoForeground": "#FFFFFF" + "selectionForeground": "#111111", + "selectionInfoForeground": "#111111" }, "Component": { "arc": 4, "borderColor": "#CCE5FF", - "disabledBorderColor": "#edf1f5", + "disabledBorderColor": "#F1F3F6", "focusColor": "#79CB60", "focusedBorderColor": "#79CB60", "hoverIconColor": "#79CB60", @@ -142,7 +160,7 @@ "controlText": "#292D31", "Counter": { "background": "#79CB60", - "foreground": "#FFFFFF" + "foreground": "#111111" }, "Debugger": { "Variables": { @@ -166,13 +184,15 @@ "background": "#F7F8FA", "borderColor": "#F7F8FA", "hoverBackground": "#cce5ff", - "hoverColor": "#fafbfc", + "hoverColor": "#FFFFFF", "hoverMaskColor": "#CCE5FF", - "inactiveColoredFileBackground": "#edf1f5", - "inactiveUnderlineColor": "#9ba0a3", - "inactiveMaskColor": "#fafbfc", + "inactiveColoredTabBackground": "#F7F8FA", + "inactiveColoredFileBackground": "#F1F3F6", + "inactiveUnderlineColor": "#79CB60", + "inactiveMaskColor": "#FFFFFF", "underlineColor": "#79CB60", - "underlinedTabBackground": "#cce5ff" + "underlinedTabBackground": "#cce5ff", + "underlinedTabForeground": "#111111" }, "Desktop.background": "#F7F8FA", "DialogWrapper.southPanelBackground": "#F7F8FA", @@ -183,34 +203,36 @@ "areaForeground": "#5B6168" }, "Editor": { - "background": "#fafbfc", + "background": "#FFFFFF", "foreground": "#5B6168", "shortcutForeground": "#292D31" }, "EditorPane": { - "background": "#fafbfc", + "background": "#FFFFFF", "caretForeground": "#79CB60", "foreground": "#5B6168", "inactiveBackground": "#F7F8FA", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#3A66D1", "selectionForeground": "#111111" }, "EditorTabs": { - "borderColor": "#f3f3f3", + "borderColor": "#F7F8FA", + "hoverBackground": "#CCE5FF", "hoverColor": "#CCE5FF", "hoverMaskColor": "#CCE5FF", "inactiveMaskColor": "#F7F8FA", - "inactiveColoredFileBackground": "#F7F8FA2", - "inactiveUnderlineColor": "#9ba0a3", + "inactiveColoredFileBackground": "#F7F8FA", + "inactiveUnderlineColor": "#6C737C", "selectedForeground": "#5B6168", "selectedBackground": "#cce5ff", "underlineColor": "#79CB60", - "underlinedTabBackground": "#cce5ff" + "underlinedTabBackground": "#cce5ff", + "underlinedTabForeground": "#111111" }, "EditorGroupsTabs": { "background": "#F7F8FA", - "borderColor": "#f3f3f3", + "borderColor": "#F7F8FA", "hoverBackground": "#CCE5FF", "hoverColor": "#CCE5FF", "inactiveUnderlineColor": "#79CB60", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#dcdcdc", + "Yellow": "#FDFDFD", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -238,25 +260,26 @@ }, "Focus.color": "#DFE1E4", "FormattedTextField": { - "background": "#fafbfc", + "background": "#FFFFFF", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveBackground": "#edf1f5", - "inactiveForeground": "#9ba0a3", + "inactiveBackground": "#F1F3F6", + "inactiveForeground": "#6C737C", "selectionForeground": "#111111", "selectionBackground": "#cce5ff" }, + "GotItTooltip.borderColor": "#DFECFE", "Group": { "disabledSeparatorColor": "#DFE1E4", "separatorColor": "#DFE1E4" }, "GutterTooltip": { - "infoForeground": "#5B6168", + "infoForeground": "#292D31", "lineSeparatorColor": "#F7F8FA" }, "HeaderColor": { "active": "#F7F8FA", - "inactive": "#fafbfc" + "inactive": "#FFFFFF" }, "HelpTooltip": { "background": "#F7F8FA", @@ -266,7 +289,7 @@ "shortcutForeground": "#292D31" }, "Hyperlink.linkColor": "#79CB60", - "inactiveCaption": "#f3f3f3", + "inactiveCaption": "#F7F8FA", "inactiveCaptionBorder": "#F7F8FA", "inactiveCaptionText": "#292D31", "info": "#292D31", @@ -283,12 +306,13 @@ }, "Label": { "background": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "disabledShadow": "#F7F8FA", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168", "infoForeground": "#292D31", - "selectedForeground": "#111111" + "selectedForeground": "#111111", + "selectedDisabledForeground": "#5B6168" }, "Link": { "activeForeground": "#79CB60", @@ -299,64 +323,66 @@ }, "link.foreground": "#79CB60", "List": { - "background": "#f3f3f3", + "background": "#F7F8FA", "foreground": "#5B6168", + "hoverBackground": "#3A66D170", + "hoverInactiveBackground": "#cce5ff", "selectionBackground": "#3A66D150", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "selectionInactiveForeground": "#111111", - "selectionInactiveBackground": "#3A66D1" + "selectionInactiveBackground": "#3A66D170" }, "material": { "background": "#F7F8FA", "branchColor": "#5B6168", - "contrast": "#fafbfc", + "contrast": "#FFFFFF", "foreground": "#5B6168", - "mergeCommits": "#edf1f5", + "mergeCommits": "#F1F3F6", "primaryColor": "#292D31", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "tab.backgroundColor": "#F7F8FA", "tab.borderColor": "#79CB60", "tagColor": "#292D31" }, "MemoryIndicator": { - "allocatedBackground": "#f3f3f3", + "allocatedBackground": "#F7F8FA", "usedColor": "#CCE5FF", "usedBackground": "#CCE5FF" }, "Menu": { "acceleratorForeground": "#292D31", - "acceleratorSelectionForeground": "#FFFFFF", + "acceleratorSelectionForeground": "#111111", "background": "#F7F8FA", "border": "4,2,4,2", - "borderColor": "#f3f3f3", - "disabledBackground": "#f3f3f3", - "disabledForeground": "#9ba0a3", + "borderColor": "#F7F8FA", + "disabledBackground": "#F7F8FA", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "separatorColor": "#DFE1E4" }, "MenuBar": { - "background": "#fafbfc", + "background": "#FFFFFF", "borderColor": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "highlight": "#F7F8FA", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF", - "shadow": "#fafbfc" + "selectionForeground": "#111111", + "shadow": "#FFFFFF" }, "MenuItem": { "acceleratorForeground": "#292D31", - "acceleratorSelectionForeground": "#FFFFFF", + "acceleratorSelectionForeground": "#111111", "border": "4,2,4,2", "background": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF" + "selectionForeground": "#111111" }, "NavBar": { "arrowColor": "#5B6168", @@ -367,7 +393,7 @@ "background": "#F7F8FA" }, "SearchField": { - "background": "#fafbfc" + "background": "#FFFFFF" } }, "NewPSD.warning": "#79CB60", @@ -378,9 +404,9 @@ "errorBorderColor": "#DFECFE", "foreground": "#5B6168", "MoreButton": { - "background": "#edf1f5", + "background": "#F1F3F6", "foreground": "#5B6168", - "innerBorderColor": "#edf1f5" + "innerBorderColor": "#F1F3F6" }, "ToolWindow": { "errorBackground": "#DFECFE", @@ -398,65 +424,66 @@ "messageForeground": "#5B6168" }, "Outline": { - "color": "#edf1f5", + "color": "#F1F3F6", "focusedColor": "#79CB60", - "disabledColor": "#9ba0a3" + "disabledColor": "#6C737C" }, "Panel": { "background": "#F7F8FA", "foreground": "#5B6168" }, "ParameterInfo": { - "background": "#f3f3f3", + "background": "#F7F8FA", "borderColor": "#cce5ff", - "currentOverloadBackground": "#cce5ff", + "currentOverloadBackground": "#CCE5FF", "currentParameterForeground": "#79CB60", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "infoForeground": "#292D31", "lineSeparatorColor": "#cce5ff" }, "PasswordField": { - "background": "#fafbfc", + "background": "#FFFFFF", "capsLockIconColor": "#79CB60", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "Plugins": { "background": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "eapTagBackground": "#CCE5FF", - "lightSelectionBackground": "#3A66D1", + "hoverBackground": "#3A66D170", + "lightSelectionBackground": "#cce5ff", "paidTagBackground": "#CCE5FF", "selectionBackground": "#3A66D1", "tagForeground": "#79CB60", "tagBackground": "#CCE5FF", "trialTagBackground": "#CCE5FF", "Button": { - "installBackground": "#edf1f5", - "installBorderColor": "#edf1f5", + "installBackground": "#F1F3F6", + "installBorderColor": "#F1F3F6", "installForeground": "#5B6168", "installFocusedBackground": "#CCE5FF", - "installFillForeground": "#9ba0a3", - "installFillBackground": "#edf1f5", - "updateBackground": "#edf1f5", - "updateBorderColor": "#edf1f5", + "installFillForeground": "#6C737C", + "installFillBackground": "#F1F3F6", + "updateBackground": "#79CB60", + "updateBorderColor": "#F1F3F6", "updateForeground": "#5B6168" }, "SearchField": { - "background": "#fafbfc", + "background": "#FFFFFF", "borderColor": "#DFE1E4" }, "SectionHeader": { - "background": "#f3f3f3", + "background": "#F7F8FA", "foreground": "#5B6168" }, "Tab": { "hoverBackground": "#cce5ff", - "selectedForeground": "#FFFFFF", + "selectedForeground": "#111111", "selectedBackground": "#cce5ff" } }, @@ -466,20 +493,20 @@ "borderColor": "#F7F8FA", "foreground": "#79CB60" }, - "borderColor": "#fafbfc", + "borderColor": "#FFFFFF", "inactiveBorderColor": "#F7F8FA", - "innerBorderColor": "#f3f3f3", + "innerBorderColor": "#F7F8FA", "Header": { "activeBackground": "#F7F8FA", - "inactiveBackground": "#fafbfc" + "inactiveBackground": "#FFFFFF" }, "paintBorder": true, "separatorForeground": "#5B6168", - "separatorColor": "#f3f3f3", + "separatorColor": "#F7F8FA", "Toolbar": { - "Floating.background": "#fafbfc", - "background": "#fafbfc", - "borderColor": "#fafbfc" + "Floating.background": "#FFFFFF", + "background": "#FFFFFF", + "borderColor": "#FFFFFF" } }, "PopupMenu": { @@ -504,7 +531,7 @@ }, "RadioButton": { "background": "#F7F8FA", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168" }, "RadioButtonMenuItem": { @@ -512,11 +539,12 @@ "acceleratorSelectionForeground": "#292D31", "background": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF" + "selectionForeground": "#111111" }, + "ScreenView.borderColor": "#DFE1E4", "ScrollBar": { "background": "#F7F8FA", "hoverThumbBorderColor": "#79CB60", @@ -553,7 +581,7 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#fafbfc", + "background": "#FFFFFF", "foreground": "#292D31" }, "Header": { @@ -565,7 +593,7 @@ }, "SearchField": { "background": "#F7F8FA", - "borderColor": "#fafbfc", + "borderColor": "#FFFFFF", "infoForeground": "#292D31" }, "Tab": { @@ -576,16 +604,25 @@ }, "SearchMatch": { "endBackground": "#79CB60", - "startBackground": "#79CB60" + "startBackground": "#79CB60", + "endColor": "#79CB60", + "startColor": "#79CB60" }, "SearchField.errorBackground": "#DFECFE", + "SearchOption": { + "selectedBackground": "#cce5ff" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#292D31", + "Repeated.File.Foreground": "#5B6168" + }, "Separator": { - "background": "#f3f3f3", - "foreground": "#f3f3f3", - "separatorColor": "#f3f3f3" + "background": "#F7F8FA", + "foreground": "#F7F8FA", + "separatorColor": "#F7F8FA" }, "SidePanel": { - "background": "#fafbfc" + "background": "#FFFFFF" }, "Slider": { "background": "#F7F8FA", @@ -593,7 +630,7 @@ "buttonColor": "#79CB60", "foreground": "#5B6168", "majorTickLength": 6, - "tickColor": "#f3f3f3", + "tickColor": "#F7F8FA", "trackColor": "#cce5ff", "trackWidth": 7, "thumb": "#79CB60" @@ -612,19 +649,21 @@ }, "SplitPane": { "background": "#F7F8FA", - "highlight": "#fafbfc" + "highlight": "#FFFFFF" }, - "SplitPaneDivider.draggingColor": "#f3f3f3", + "SplitPaneDivider.draggingColor": "#F7F8FA", "StatusBar": { - "borderColor": "#F7F8FA" + "borderColor": "#F7F8FA", + "hoverBackground": "#CCE5FF", + "LightEditBackground": "#cce5ff" }, "TabbedPane": { "background": "#F7F8FA", "contentAreaColor": "#CCE5FF", "contentBorderInsets": "3,1,1,1", "darkShadow": "#DFE1E4", - "disabledForeground": "#9ba0a3", - "disabledUnderlineColor": "#9ba0a3", + "disabledForeground": "#6C737C", + "disabledUnderlineColor": "#6C737C", "focus": "#cce5ff", "focusColor": "#cce5ff", "fontSizeOffset": 0, @@ -641,11 +680,13 @@ "tabSelectionHeight": 2, "underlineColor": "#79CB60" }, - "TabbedPane.mt.tab.background": "#fafbfc", + "TabbedPane.mt.tab.background": "#FFFFFF", "Table": { + "alternativeRowBackground": "#FFFFFF", "background": "#F7F8FA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#6C737C", "dropLineColor": "#79CB60", "dropLineShortColor": "#79CB60", "focusCellBackground": "#cce5ff", @@ -653,57 +694,59 @@ "foreground": "#5B6168", "gridColor": "#F7F8FA", "highlightOuter": "#cce5ff", + "hoverBackground": "#3A66D170", + "hoverInactiveBackground": "#cce5ff", "lightSelectionForeground": "#111111", "lightSelectionInactiveForeground": "#292D31", - "lightSelectionInactiveBackground": "#f3f3f3", + "lightSelectionInactiveBackground": "#F7F8FA", "selectionBackground": "#cce5ff", "selectionForeground": "#111111", "selectionInactiveBackground": "#cce5ff", - "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveForeground": "#111111", "sortIconColor": "#5B6168", - "stripeColor": "#fafbfc" + "stripeColor": "#FFFFFF" }, "TableHeader": { "background": "#F7F8FA", "borderColor": "#F7F8FA", - "bottomSeparatorColor": "#f3f3f3", + "bottomSeparatorColor": "#F7F8FA", "cellBorder": "4,0,4,0", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "focusCellBackground": "#cce5ff", "focusCellForeground": "#111111", "height": 25, - "separatorColor": "#f3f3f3" + "separatorColor": "#F7F8FA" }, "text": "#292D31", "textInactiveText": "#292D31", "textText": "#292D31", "TextArea": { - "background": "#fafbfc", + "background": "#FFFFFF", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "TextField": { - "background": "#fafbfc", + "background": "#FFFFFF", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "TextPane": { - "background": "#fafbfc", + "background": "#FFFFFF", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "TitlePane": { - "background": "#fafbfc", + "background": "#FFFFFF", "Button.hoverBackground": "#CCE5FF", "inactiveBackground": "#F7F8FA", "infoForeground": "#292D31", @@ -711,9 +754,9 @@ }, "TitledBorder.titleColor": "#5B6168", "ToggleButton": { - "borderColor": "#edf1f5", + "borderColor": "#F1F3F6", "buttonColor": "#5B6168", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168", "offForeground": "#F7F8FA", "offBackground": "#F7F8FA", @@ -721,7 +764,7 @@ "onForeground": "#79CB60" }, "ToolBar": { - "background": "#fafbfc", + "background": "#FFFFFF", "borderHandleColor": "#292D31", "floatingForeground": "#292D31", "foreground": "#5B6168" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#F7F8FA", "Actions.infoForeground": "#292D31", - "background": "#F7F8FA", - "borderColor": "#CCE5FF", + "background": "#DFECFE", + "borderColor": "#DFE1E4", "foreground": "#5B6168", "infoForeground": "#292D31", "separatorColor": "#DFE1E4", @@ -740,61 +783,104 @@ "Button": { "hoverBackground": "#cce5ff", "selectedForeground": "#111111", - "selectedBackground": "#fafbfc" + "selectedBackground": "#FFFFFF" }, "Header": { "background": "#F7F8FA", - "borderColor": "#f3f3f3", + "borderColor": "#F7F8FA", "inactiveBackground": "#F7F8FA" }, "HeaderCloseButton": { "background": "#F7F8FA" }, "HeaderTab": { + "borderColor": "#CCE5FF", "hoverBackground": "#CCE5FF", - "hoverInactiveBackground": "#f3f3f3", + "hoverInactiveBackground": "#CCE5FF", "inactiveUnderlineColor": "#79CB60", - "selectedBackground": "#fafbfc", - "selectedInactiveBackground": "#fafbfc", + "selectedBackground": "#FFFFFF", + "selectedInactiveBackground": "#FFFFFF", "underlineColor": "#79CB60", - "underlinedTabBackground": "#CCE5FF", - "underlinedTabInactiveBackground": "#f3f3f3" + "underlinedTabBackground": "#cce5ff", + "underlinedTabInactiveBackground": "#F7F8FA", + "underlinedTabForeground": "#111111", + "underlinedTabInactiveForeground": "#5B6168" } }, "Tree": { - "background": "#fafbfc", + "background": "#FFFFFF", "foreground": "#292D31", "hash": "#DFE1E4", + "hoverBackground": "#3A66D170", + "hoverInactiveBackground": "#cce5ff", "modifiedItemForeground": "#79CB60", "rowHeight": 28, - "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF", - "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#3A66D1", - "textBackground": "#fafbfc" + "selectionBackground": "#3A66D170", + "selectionForeground": "#111111", + "selectionInactiveForeground": "#111111", + "selectionInactiveBackground": "#3A66D170", + "textBackground": "#FFFFFF" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#DFE1E4", - "ColorPicker.background": "#F7F8FA", - "ColorPicker.foreground": "#5B6168", - "Component.borderColor": "#DFE1E4", - "Component.background": "#F7F8FA", - "Component.foreground": "#5B6168", - "Connector.borderColor": "#DFE1E4", - "Connector.hoverBorderColor": "#CCE5FF", - "Canvas.background": "#fafbfc", + "Canvas.background": "#FFFFFF", + "ColorPicker": { + "background": "#F7F8FA", + "foreground": "#5B6168" + }, + "Component": { + "borderColor": "#DFE1E4", + "background": "#F7F8FA", + "foreground": "#5B6168", + "hoverBorderColor": "#CCE5FF" + }, + "Connector": { + "borderColor": "#DFE1E4", + "hoverBorderColor": "#CCE5FF" + }, + "Canvas.background": "#FFFFFF", "highStroke.foreground": "#5B6168", "Label.foreground": "#292D31", - "List.selectionBackground": "#3A66D1", - "Panel.borderColor": "#DFE1E4", - "Panel.background": "#F7F8FA", + "List.selectionBackground": "#3A66D170", + "motion": { + "borderColor": "#DFE1E4", + "Component.foreground": "#5B6168", + "ConstraintSetText.foreground": "#292D31", + "ConstraintSet.background": "#F7F8FA", + "CSPanel.SelectedFocusBackground": "#3A66D1", + "CSPanel.SelectedBackground": "#3A66D170", + "cs_FocusText.infoForeground": "#292D31", + "CursorTextColor.foreground": "#5B6168", + "HoverColor.disabledBackground": "#6C737C", + "motionGraph.background": "#F7F8FA", + "Notification.background": "#DFECFE", + "ourAvg.background": "#F7F8FA", + "ourCS.background": "#F7F8FA", + "ourCS_Border.borderColor": "#DFE1E4", + "ourCS_TextColor.foreground": "#292D31", + "ourCS_SelectedFocusBackground.selectionForeground": "#111111", + "ourCS_SelectedBackground.selectionInactiveBackground": "#cce5ff", + "ourCS_SelectedBorder.pressedBorderColor": "#CCE5FF", + "ourML_BarColor.separatorColor": "#DFE1E4", + "PrimaryPanel.background": "#FFFFFF", + "SecondaryPanel.background": "#F7F8FA", + "SecondaryPanel.header.foreground": "#292D31", + "SecondaryPanel.header.background": "#FFFFFF", + "timeLine.disabledBorderColor": "#DFE1E4" + }, + "Panel": { + "borderColor": "#DFE1E4", + "background": "#F7F8FA" + }, "percent.foreground": "#5B6168", - "Placeholder.background": "#F7F8FA", - "Placeholder.borderColor": "#DFE1E4", - "Placeholder.foreground": "#5B6168", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#F7F8FA", + "borderColor": "#DFE1E4", + "foreground": "#5B6168", + "selectedForeground": "#111111" + }, "Preview.background": "#F7F8FA", "stroke.acceleratorForeground": "#292D31" }, @@ -820,7 +906,7 @@ "HgLog": { "branchIconColor": "#79CB60", "bookmarkIconColor": "#111111", - "closedBranchIconColor": "#9ba0a3", + "closedBranchIconColor": "#6C737C", "localTagIconColor": "#292D31", "mqTagIconColor": "#292D31", "tagIconColor": "#292D31", @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#292D31", - "Commit.currentBranchBackground": "#f3f3f3" + "Commit.currentBranchBackground": "#F7F8FA", + "Commit.hoveredBackground": "#3A66D170" }, "RefLabel": { "foreground": "#111111", @@ -836,40 +923,46 @@ } }, "Viewport": { - "background": "#fafbfc", + "background": "#FFFFFF", "foreground": "#5B6168" }, "WelcomeScreen": { + "AssociatedComponent.background": "#F7F8FA", "background": "#F7F8FA", "borderColor": "#F7F8FA", - "captionBackground": "#fafbfc", + "captionBackground": "#FFFFFF", "captionForeground": "#5B6168", - "footerBackground": "#fafbfc", + "Details.background": "#F7F8FA", + "footerBackground": "#FFFFFF", "footerForeground": "#5B6168", "headerBackground": "#F7F8FA", "headerForeground": "#5B6168", + "List.background": "#FFFFFF", "separatorColor": "#DFE1E4", + "SidePanel.background": "#F7F8FA", "Projects": { - "background": "#f3f3f3", + "actions.background": "#FFFFFF", + "actions.selectionBackground": "#CCE5FF", + "background": "#F7F8FA", "selectionBackground": "#3A66D1", - "selectionInactiveBackground": "#f3f3f3" + "selectionInactiveBackground": "#F7F8FA" } }, - "window": "#fafbfc", + "window": "#FFFFFF", "windowBorder": "#DFE1E4", "windowText": "#292D31", "Window.border": "#DFE1E4" }, "icons": { "ColorPalette": { - "#43494A": "#fafbfc", + "#43494A": "#FFFFFF", "#6B6B6B": "#292D31", "#A7A7A7": "#F7F8FA", "#3D6185": "#79CB60", "#466D94": "#79CB60", "#3C3F41": "#F7F8FA", - "#545556": "#9ba0a3", - "#606060": "#9ba0a3", + "#545556": "#6C737C", + "#606060": "#6C737C", "#9AA7B0": "#5B6168", "#675133": "#79CB60", "Actions.Blue": "#6F42C1", @@ -879,20 +972,20 @@ "Actions.GreyInline.Dark": "#5B6168", "Actions.Red": "#22863A", "Actions.Yellow": "#6F42C1", - "Checkbox.Background.Default": "#fafbfc", - "Checkbox.Background.Default.Dark": "#fafbfc", - "Checkbox.Background.Disabled": "#dcdcdc", - "Checkbox.Background.Disabled.Dark": "#dcdcdc", + "Checkbox.Background.Default": "#FFFFFF", + "Checkbox.Background.Default.Dark": "#FFFFFF", + "Checkbox.Background.Disabled": "#FDFDFD", + "Checkbox.Background.Disabled.Dark": "#FDFDFD", "Checkbox.Border.Default": "#DFE1E4", "Checkbox.Border.Default.Dark": "#DFE1E4", - "Checkbox.Border.Disabled": "#9ba0a3", - "Checkbox.Border.Disabled.Dark": "#9ba0a3", + "Checkbox.Border.Disabled": "#6C737C", + "Checkbox.Border.Disabled.Dark": "#6C737C", "Checkbox.Focus.Thin.Default": "#79CB60", "Checkbox.Focus.Thin.Default.Dark": "#79CB60", "Checkbox.Focus.Wide": "#79CB60", "Checkbox.Focus.Wide.Dark": "#79CB60", - "Checkbox.Foreground.Disabled": "#9ba0a3", - "Checkbox.Foreground.Disabled.Dark": "#9ba0a3", + "Checkbox.Foreground.Disabled": "#6C737C", + "Checkbox.Foreground.Disabled.Dark": "#6C737C", "Checkbox.Background.Selected": "#79CB60", "Checkbox.Background.Selected.Dark": "#F7F8FA", "Checkbox.Border.Selected": "#79CB60", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub.theme.json index 6002f77d..f2a07ab2 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/GitHub.theme.json @@ -2,32 +2,38 @@ "name": "GitHub", "dark": false, "author": "Mallowigi", - "editorScheme": "/colors/Github.xml", + "editorScheme": "/colors/GitHub (Material).xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/github.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#292D31", "background": "#F7F8FA", "borderColor": "#DFE1E4", - "disabledBackground": "#dcdcdc", - "disabledForeground": "#9ba0a3", - "disabledText": "#9ba0a3", + "disabledBackground": "#FDFDFD", + "disabledForeground": "#6C737C", + "disabledText": "#6C737C", "focusColor": "#CCE5FF", "focusedBorderColor": "#79CB60", "foreground": "#5B6168", - "inactiveBackground": "#dcdcdc", + "inactiveBackground": "#FDFDFD", "inactiveForeground": "#292D31", "infoForeground": "#292D31", "selectionBackground": "#3A66D1", - "selectionBackgroundInactive": "#f3f3f3", - "selectionForeground": "#FFFFFF", - "selectionInactiveBackground": "#f3f3f3", + "selectionBackgroundInactive": "#F7F8FA", + "selectionForeground": "#111111", + "selectionInactiveBackground": "#F7F8FA", "separatorColor": "#DFE1E4" }, "activeCaption": "#F7F8FA", "ActionButton": { "hoverBackground": "#79CB6050", "hoverBorderColor": "#79CB6050", - "hoverSeparatorColor": "#edf1f5", + "hoverSeparatorColor": "#F1F3F6", "focusedBorderColor": "#79CB6050", "pressedBackground": "#79CB6050", "pressedBorderColor": "#79CB6050" @@ -50,32 +56,35 @@ "startBackground": "#cce5ff", "startBorderColor": "#cce5ff" }, - "disabledBorderColor": "#edf1f5", - "disabledText": "#9ba0a3", - "endBackground": "#edf1f5", - "endBorderColor": "#edf1f5", + "disabledBorderColor": "#F1F3F6", + "disabledText": "#6C737C", + "endBackground": "#F1F3F6", + "endBorderColor": "#F1F3F6", "focus": "#CCE5FF", "focusedBorderColor": "#79CB60", "foreground": "#292D31", - "highlight": "#FFFFFF", - "mt.background": "#edf1f5", + "highlight": "#111111", + "mt.background": "#F1F3F6", "mt.foreground": "#292D31", - "mt.selectedForeground": "#FFFFFF", + "mt.selectedForeground": "#111111", "mt.selection.color1": "#cce5ff", "mt.selection.color2": "#cce5ff", - "startBackground": "#edf1f5", - "startBorderColor": "#edf1f5", - "shadowColor": "#edf1f5", + "startBackground": "#F1F3F6", + "startBorderColor": "#F1F3F6", + "shadowColor": "#F1F3F6", "shadowWidth": 0 }, "Canvas": { "Tooltip.borderColor": "#DFE1E4", "Tooltip.background": "#DFECFE" }, - "Content.background": "#fafbfc", + "Content": { + "background": "#FFFFFF", + "selectionBackground": "#3A66D1" + }, "CheckBox": { "background": "#F7F8FA", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168", "select": "#79CB60" }, @@ -84,54 +93,63 @@ "acceleratorSelectionForeground": "#292D31", "background": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", "selectionForeground": "#111111" }, + "CodeWithMe": { + "Avatar.foreground": "#5B6168", + "AccessEnabled": { + "accessDot": "#79CB60", + "dropdownBorder": "#F7F8FA", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#F7F8FA", "foreground": "#5B6168", "swatchesDefaultRecentColor": "#5B6168" }, - "ComboBoxButton.background": "#edf1f5", + "ComboBoxButton.background": "#F1F3F6", "ComboBox": { "ArrowButton": { - "background": "#edf1f5", - "disabledIconColor": "#9ba0a3", + "background": "#F1F3F6", + "disabledIconColor": "#6C737C", "iconColor": "#5B6168", "nonEditableBackground": "#F7F8FA" }, "background": "#F7F8FA", - "buttonBackground": "#edf1f5", - "disabledForeground": "#9ba0a3", + "buttonBackground": "#F1F3F6", + "darcula.hoveredArrowButtonForeground": "#79CB60", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "modifiedItemForeground": "#79CB60", - "nonEditableBackground": "#f3f3f3", + "nonEditableBackground": "#F7F8FA", "padding": "5,5,5,5", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "ComboPopup.border": "#DFE1E4", "CompletionPopup": { - "background": "#f3f3f3", + "background": "#F7F8FA", "foreground": "#5B6168", "infoForeground": "#292D31", "matchForeground": "#79CB60", "matchSelectionForeground": "#79CB60", "nonFocusedState": "false", - "selectedGrayedForeground": "#FFFFFF", - "selectionGrayForeground": "#FFFFFF", + "selectedGrayedForeground": "#111111", + "selectionGrayForeground": "#111111", "selectionInactiveInfoForeground": "#292D31", "selectionInactiveBackground": "#3A66D150", "selectionBackground": "#3A66D180", - "selectionForeground": "#FFFFFF", - "selectionInfoForeground": "#FFFFFF" + "selectionForeground": "#111111", + "selectionInfoForeground": "#111111" }, "Component": { "arc": 4, "borderColor": "#CCE5FF", - "disabledBorderColor": "#edf1f5", + "disabledBorderColor": "#F1F3F6", "focusColor": "#79CB60", "focusedBorderColor": "#79CB60", "hoverIconColor": "#79CB60", @@ -142,7 +160,7 @@ "controlText": "#292D31", "Counter": { "background": "#79CB60", - "foreground": "#FFFFFF" + "foreground": "#111111" }, "Debugger": { "Variables": { @@ -168,11 +186,13 @@ "hoverBackground": "#cce5ff", "hoverColor": "#F7F8FA", "hoverMaskColor": "#CCE5FF", - "inactiveColoredFileBackground": "#edf1f5", - "inactiveUnderlineColor": "#9ba0a3", + "inactiveColoredTabBackground": "#F7F8FA", + "inactiveColoredFileBackground": "#F1F3F6", + "inactiveUnderlineColor": "#79CB60", "inactiveMaskColor": "#F7F8FA", "underlineColor": "#79CB60", - "underlinedTabBackground": "#cce5ff" + "underlinedTabBackground": "#cce5ff", + "underlinedTabForeground": "#111111" }, "Desktop.background": "#F7F8FA", "DialogWrapper.southPanelBackground": "#F7F8FA", @@ -192,25 +212,27 @@ "caretForeground": "#79CB60", "foreground": "#5B6168", "inactiveBackground": "#F7F8FA", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#3A66D1", "selectionForeground": "#111111" }, "EditorTabs": { - "borderColor": "#f3f3f3", + "borderColor": "#F7F8FA", + "hoverBackground": "#CCE5FF", "hoverColor": "#CCE5FF", "hoverMaskColor": "#CCE5FF", "inactiveMaskColor": "#F7F8FA", - "inactiveColoredFileBackground": "#F7F8FA2", - "inactiveUnderlineColor": "#9ba0a3", + "inactiveColoredFileBackground": "#F7F8FA", + "inactiveUnderlineColor": "#6C737C", "selectedForeground": "#5B6168", "selectedBackground": "#cce5ff", "underlineColor": "#79CB60", - "underlinedTabBackground": "#cce5ff" + "underlinedTabBackground": "#cce5ff", + "underlinedTabForeground": "#111111" }, "EditorGroupsTabs": { "background": "#F7F8FA", - "borderColor": "#f3f3f3", + "borderColor": "#F7F8FA", "hoverBackground": "#CCE5FF", "hoverColor": "#CCE5FF", "inactiveUnderlineColor": "#79CB60", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#dcdcdc", + "Yellow": "#FDFDFD", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -241,22 +263,23 @@ "background": "#F7F8FA", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveBackground": "#edf1f5", - "inactiveForeground": "#9ba0a3", + "inactiveBackground": "#F1F3F6", + "inactiveForeground": "#6C737C", "selectionForeground": "#111111", "selectionBackground": "#cce5ff" }, + "GotItTooltip.borderColor": "#DFECFE", "Group": { "disabledSeparatorColor": "#DFE1E4", "separatorColor": "#DFE1E4" }, "GutterTooltip": { - "infoForeground": "#5B6168", + "infoForeground": "#292D31", "lineSeparatorColor": "#F7F8FA" }, "HeaderColor": { "active": "#F7F8FA", - "inactive": "#fafbfc" + "inactive": "#FFFFFF" }, "HelpTooltip": { "background": "#F7F8FA", @@ -266,7 +289,7 @@ "shortcutForeground": "#292D31" }, "Hyperlink.linkColor": "#79CB60", - "inactiveCaption": "#f3f3f3", + "inactiveCaption": "#F7F8FA", "inactiveCaptionBorder": "#F7F8FA", "inactiveCaptionText": "#292D31", "info": "#292D31", @@ -283,12 +306,13 @@ }, "Label": { "background": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "disabledShadow": "#F7F8FA", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168", "infoForeground": "#292D31", - "selectedForeground": "#111111" + "selectedForeground": "#111111", + "selectedDisabledForeground": "#5B6168" }, "Link": { "activeForeground": "#79CB60", @@ -299,64 +323,66 @@ }, "link.foreground": "#79CB60", "List": { - "background": "#f3f3f3", + "background": "#F7F8FA", "foreground": "#5B6168", + "hoverBackground": "#3A66D170", + "hoverInactiveBackground": "#cce5ff", "selectionBackground": "#3A66D150", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "selectionInactiveForeground": "#111111", - "selectionInactiveBackground": "#3A66D1" + "selectionInactiveBackground": "#3A66D170" }, "material": { "background": "#F7F8FA", "branchColor": "#5B6168", - "contrast": "#fafbfc", + "contrast": "#FFFFFF", "foreground": "#5B6168", - "mergeCommits": "#edf1f5", + "mergeCommits": "#F1F3F6", "primaryColor": "#292D31", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "tab.backgroundColor": "#F7F8FA", "tab.borderColor": "#79CB60", "tagColor": "#292D31" }, "MemoryIndicator": { - "allocatedBackground": "#f3f3f3", + "allocatedBackground": "#F7F8FA", "usedColor": "#CCE5FF", "usedBackground": "#CCE5FF" }, "Menu": { "acceleratorForeground": "#292D31", - "acceleratorSelectionForeground": "#FFFFFF", + "acceleratorSelectionForeground": "#111111", "background": "#F7F8FA", "border": "4,2,4,2", - "borderColor": "#f3f3f3", - "disabledBackground": "#f3f3f3", - "disabledForeground": "#9ba0a3", + "borderColor": "#F7F8FA", + "disabledBackground": "#F7F8FA", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "separatorColor": "#DFE1E4" }, "MenuBar": { "background": "#F7F8FA", "borderColor": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "highlight": "#F7F8FA", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF", + "selectionForeground": "#111111", "shadow": "#F7F8FA" }, "MenuItem": { "acceleratorForeground": "#292D31", - "acceleratorSelectionForeground": "#FFFFFF", + "acceleratorSelectionForeground": "#111111", "border": "4,2,4,2", "background": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF" + "selectionForeground": "#111111" }, "NavBar": { "arrowColor": "#5B6168", @@ -378,9 +404,9 @@ "errorBorderColor": "#DFECFE", "foreground": "#5B6168", "MoreButton": { - "background": "#edf1f5", + "background": "#F1F3F6", "foreground": "#5B6168", - "innerBorderColor": "#edf1f5" + "innerBorderColor": "#F1F3F6" }, "ToolWindow": { "errorBackground": "#DFECFE", @@ -398,20 +424,20 @@ "messageForeground": "#5B6168" }, "Outline": { - "color": "#edf1f5", + "color": "#F1F3F6", "focusedColor": "#79CB60", - "disabledColor": "#9ba0a3" + "disabledColor": "#6C737C" }, "Panel": { "background": "#F7F8FA", "foreground": "#5B6168" }, "ParameterInfo": { - "background": "#f3f3f3", + "background": "#F7F8FA", "borderColor": "#cce5ff", - "currentOverloadBackground": "#cce5ff", + "currentOverloadBackground": "#CCE5FF", "currentParameterForeground": "#79CB60", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "infoForeground": "#292D31", "lineSeparatorColor": "#cce5ff" @@ -421,29 +447,30 @@ "capsLockIconColor": "#79CB60", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "Plugins": { "background": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "eapTagBackground": "#CCE5FF", - "lightSelectionBackground": "#3A66D1", + "hoverBackground": "#3A66D170", + "lightSelectionBackground": "#cce5ff", "paidTagBackground": "#CCE5FF", "selectionBackground": "#3A66D1", "tagForeground": "#79CB60", "tagBackground": "#CCE5FF", "trialTagBackground": "#CCE5FF", "Button": { - "installBackground": "#edf1f5", - "installBorderColor": "#edf1f5", + "installBackground": "#F1F3F6", + "installBorderColor": "#F1F3F6", "installForeground": "#5B6168", "installFocusedBackground": "#CCE5FF", - "installFillForeground": "#9ba0a3", - "installFillBackground": "#edf1f5", - "updateBackground": "#edf1f5", - "updateBorderColor": "#edf1f5", + "installFillForeground": "#6C737C", + "installFillBackground": "#F1F3F6", + "updateBackground": "#79CB60", + "updateBorderColor": "#F1F3F6", "updateForeground": "#5B6168" }, "SearchField": { @@ -451,12 +478,12 @@ "borderColor": "#DFE1E4" }, "SectionHeader": { - "background": "#f3f3f3", + "background": "#F7F8FA", "foreground": "#5B6168" }, "Tab": { "hoverBackground": "#cce5ff", - "selectedForeground": "#FFFFFF", + "selectedForeground": "#111111", "selectedBackground": "#cce5ff" } }, @@ -466,20 +493,20 @@ "borderColor": "#F7F8FA", "foreground": "#79CB60" }, - "borderColor": "#fafbfc", + "borderColor": "#FFFFFF", "inactiveBorderColor": "#F7F8FA", - "innerBorderColor": "#f3f3f3", + "innerBorderColor": "#F7F8FA", "Header": { "activeBackground": "#F7F8FA", - "inactiveBackground": "#fafbfc" + "inactiveBackground": "#FFFFFF" }, "paintBorder": true, "separatorForeground": "#5B6168", - "separatorColor": "#f3f3f3", + "separatorColor": "#F7F8FA", "Toolbar": { - "Floating.background": "#fafbfc", - "background": "#fafbfc", - "borderColor": "#fafbfc" + "Floating.background": "#FFFFFF", + "background": "#FFFFFF", + "borderColor": "#FFFFFF" } }, "PopupMenu": { @@ -504,7 +531,7 @@ }, "RadioButton": { "background": "#F7F8FA", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168" }, "RadioButtonMenuItem": { @@ -512,11 +539,12 @@ "acceleratorSelectionForeground": "#292D31", "background": "#F7F8FA", "disabledBackground": "#F7F8FA", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF" + "selectionForeground": "#111111" }, + "ScreenView.borderColor": "#DFE1E4", "ScrollBar": { "background": "#F7F8FA", "hoverThumbBorderColor": "#79CB60", @@ -553,7 +581,7 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#fafbfc", + "background": "#FFFFFF", "foreground": "#292D31" }, "Header": { @@ -565,7 +593,7 @@ }, "SearchField": { "background": "#F7F8FA", - "borderColor": "#fafbfc", + "borderColor": "#FFFFFF", "infoForeground": "#292D31" }, "Tab": { @@ -576,13 +604,22 @@ }, "SearchMatch": { "endBackground": "#79CB60", - "startBackground": "#79CB60" + "startBackground": "#79CB60", + "endColor": "#79CB60", + "startColor": "#79CB60" }, "SearchField.errorBackground": "#DFECFE", + "SearchOption": { + "selectedBackground": "#cce5ff" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#292D31", + "Repeated.File.Foreground": "#5B6168" + }, "Separator": { - "background": "#f3f3f3", - "foreground": "#f3f3f3", - "separatorColor": "#f3f3f3" + "background": "#F7F8FA", + "foreground": "#F7F8FA", + "separatorColor": "#F7F8FA" }, "SidePanel": { "background": "#F7F8FA" @@ -593,7 +630,7 @@ "buttonColor": "#79CB60", "foreground": "#5B6168", "majorTickLength": 6, - "tickColor": "#f3f3f3", + "tickColor": "#F7F8FA", "trackColor": "#cce5ff", "trackWidth": 7, "thumb": "#79CB60" @@ -614,17 +651,19 @@ "background": "#F7F8FA", "highlight": "#F7F8FA" }, - "SplitPaneDivider.draggingColor": "#f3f3f3", + "SplitPaneDivider.draggingColor": "#F7F8FA", "StatusBar": { - "borderColor": "#F7F8FA" + "borderColor": "#F7F8FA", + "hoverBackground": "#CCE5FF", + "LightEditBackground": "#cce5ff" }, "TabbedPane": { "background": "#F7F8FA", "contentAreaColor": "#CCE5FF", "contentBorderInsets": "3,1,1,1", "darkShadow": "#DFE1E4", - "disabledForeground": "#9ba0a3", - "disabledUnderlineColor": "#9ba0a3", + "disabledForeground": "#6C737C", + "disabledUnderlineColor": "#6C737C", "focus": "#cce5ff", "focusColor": "#cce5ff", "fontSizeOffset": 0, @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#F7F8FA", "Table": { + "alternativeRowBackground": "#FFFFFF", "background": "#F7F8FA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#6C737C", "dropLineColor": "#79CB60", "dropLineShortColor": "#79CB60", "focusCellBackground": "#cce5ff", @@ -653,27 +694,29 @@ "foreground": "#5B6168", "gridColor": "#F7F8FA", "highlightOuter": "#cce5ff", + "hoverBackground": "#3A66D170", + "hoverInactiveBackground": "#cce5ff", "lightSelectionForeground": "#111111", "lightSelectionInactiveForeground": "#292D31", - "lightSelectionInactiveBackground": "#f3f3f3", + "lightSelectionInactiveBackground": "#F7F8FA", "selectionBackground": "#cce5ff", "selectionForeground": "#111111", "selectionInactiveBackground": "#cce5ff", - "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveForeground": "#111111", "sortIconColor": "#5B6168", - "stripeColor": "#fafbfc" + "stripeColor": "#FFFFFF" }, "TableHeader": { "background": "#F7F8FA", "borderColor": "#F7F8FA", - "bottomSeparatorColor": "#f3f3f3", + "bottomSeparatorColor": "#F7F8FA", "cellBorder": "4,0,4,0", - "disabledForeground": "#9ba0a3", + "disabledForeground": "#6C737C", "foreground": "#5B6168", "focusCellBackground": "#cce5ff", "focusCellForeground": "#111111", "height": 25, - "separatorColor": "#f3f3f3" + "separatorColor": "#F7F8FA" }, "text": "#292D31", "textInactiveText": "#292D31", @@ -682,7 +725,7 @@ "background": "#F7F8FA", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, @@ -690,7 +733,7 @@ "background": "#F7F8FA", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, @@ -698,12 +741,12 @@ "background": "#F7F8FA", "caretForeground": "#79CB60", "foreground": "#5B6168", - "inactiveForeground": "#9ba0a3", + "inactiveForeground": "#6C737C", "selectionBackground": "#cce5ff", "selectionForeground": "#111111" }, "TitlePane": { - "background": "#fafbfc", + "background": "#FFFFFF", "Button.hoverBackground": "#CCE5FF", "inactiveBackground": "#F7F8FA", "infoForeground": "#292D31", @@ -711,9 +754,9 @@ }, "TitledBorder.titleColor": "#5B6168", "ToggleButton": { - "borderColor": "#edf1f5", + "borderColor": "#F1F3F6", "buttonColor": "#5B6168", - "disabledText": "#9ba0a3", + "disabledText": "#6C737C", "foreground": "#5B6168", "offForeground": "#F7F8FA", "offBackground": "#F7F8FA", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#F7F8FA", "Actions.infoForeground": "#292D31", - "background": "#F7F8FA", - "borderColor": "#CCE5FF", + "background": "#DFECFE", + "borderColor": "#DFE1E4", "foreground": "#5B6168", "infoForeground": "#292D31", "separatorColor": "#DFE1E4", @@ -740,61 +783,104 @@ "Button": { "hoverBackground": "#cce5ff", "selectedForeground": "#111111", - "selectedBackground": "#fafbfc" + "selectedBackground": "#FFFFFF" }, "Header": { "background": "#F7F8FA", - "borderColor": "#f3f3f3", + "borderColor": "#F7F8FA", "inactiveBackground": "#F7F8FA" }, "HeaderCloseButton": { "background": "#F7F8FA" }, "HeaderTab": { + "borderColor": "#CCE5FF", "hoverBackground": "#CCE5FF", - "hoverInactiveBackground": "#f3f3f3", + "hoverInactiveBackground": "#CCE5FF", "inactiveUnderlineColor": "#79CB60", - "selectedBackground": "#fafbfc", - "selectedInactiveBackground": "#fafbfc", + "selectedBackground": "#FFFFFF", + "selectedInactiveBackground": "#FFFFFF", "underlineColor": "#79CB60", - "underlinedTabBackground": "#CCE5FF", - "underlinedTabInactiveBackground": "#f3f3f3" + "underlinedTabBackground": "#cce5ff", + "underlinedTabInactiveBackground": "#F7F8FA", + "underlinedTabForeground": "#111111", + "underlinedTabInactiveForeground": "#5B6168" } }, "Tree": { "background": "#F7F8FA", "foreground": "#292D31", "hash": "#DFE1E4", + "hoverBackground": "#3A66D170", + "hoverInactiveBackground": "#cce5ff", "modifiedItemForeground": "#79CB60", "rowHeight": 28, - "selectionBackground": "#3A66D1", - "selectionForeground": "#FFFFFF", - "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#3A66D1", + "selectionBackground": "#3A66D170", + "selectionForeground": "#111111", + "selectionInactiveForeground": "#111111", + "selectionInactiveBackground": "#3A66D170", "textBackground": "#F7F8FA" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#DFE1E4", - "ColorPicker.background": "#F7F8FA", - "ColorPicker.foreground": "#5B6168", - "Component.borderColor": "#DFE1E4", - "Component.background": "#F7F8FA", - "Component.foreground": "#5B6168", - "Connector.borderColor": "#DFE1E4", - "Connector.hoverBorderColor": "#CCE5FF", - "Canvas.background": "#fafbfc", + "Canvas.background": "#FFFFFF", + "ColorPicker": { + "background": "#F7F8FA", + "foreground": "#5B6168" + }, + "Component": { + "borderColor": "#DFE1E4", + "background": "#F7F8FA", + "foreground": "#5B6168", + "hoverBorderColor": "#CCE5FF" + }, + "Connector": { + "borderColor": "#DFE1E4", + "hoverBorderColor": "#CCE5FF" + }, + "Canvas.background": "#FFFFFF", "highStroke.foreground": "#5B6168", "Label.foreground": "#292D31", - "List.selectionBackground": "#3A66D1", - "Panel.borderColor": "#DFE1E4", - "Panel.background": "#F7F8FA", + "List.selectionBackground": "#3A66D170", + "motion": { + "borderColor": "#DFE1E4", + "Component.foreground": "#5B6168", + "ConstraintSetText.foreground": "#292D31", + "ConstraintSet.background": "#F7F8FA", + "CSPanel.SelectedFocusBackground": "#3A66D1", + "CSPanel.SelectedBackground": "#3A66D170", + "cs_FocusText.infoForeground": "#292D31", + "CursorTextColor.foreground": "#5B6168", + "HoverColor.disabledBackground": "#6C737C", + "motionGraph.background": "#F7F8FA", + "Notification.background": "#DFECFE", + "ourAvg.background": "#F7F8FA", + "ourCS.background": "#F7F8FA", + "ourCS_Border.borderColor": "#DFE1E4", + "ourCS_TextColor.foreground": "#292D31", + "ourCS_SelectedFocusBackground.selectionForeground": "#111111", + "ourCS_SelectedBackground.selectionInactiveBackground": "#cce5ff", + "ourCS_SelectedBorder.pressedBorderColor": "#CCE5FF", + "ourML_BarColor.separatorColor": "#DFE1E4", + "PrimaryPanel.background": "#FFFFFF", + "SecondaryPanel.background": "#F7F8FA", + "SecondaryPanel.header.foreground": "#292D31", + "SecondaryPanel.header.background": "#FFFFFF", + "timeLine.disabledBorderColor": "#DFE1E4" + }, + "Panel": { + "borderColor": "#DFE1E4", + "background": "#F7F8FA" + }, "percent.foreground": "#5B6168", - "Placeholder.background": "#F7F8FA", - "Placeholder.borderColor": "#DFE1E4", - "Placeholder.foreground": "#5B6168", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#F7F8FA", + "borderColor": "#DFE1E4", + "foreground": "#5B6168", + "selectedForeground": "#111111" + }, "Preview.background": "#F7F8FA", "stroke.acceleratorForeground": "#292D31" }, @@ -820,7 +906,7 @@ "HgLog": { "branchIconColor": "#79CB60", "bookmarkIconColor": "#111111", - "closedBranchIconColor": "#9ba0a3", + "closedBranchIconColor": "#6C737C", "localTagIconColor": "#292D31", "mqTagIconColor": "#292D31", "tagIconColor": "#292D31", @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#292D31", - "Commit.currentBranchBackground": "#f3f3f3" + "Commit.currentBranchBackground": "#F7F8FA", + "Commit.hoveredBackground": "#3A66D170" }, "RefLabel": { "foreground": "#111111", @@ -840,19 +927,25 @@ "foreground": "#5B6168" }, "WelcomeScreen": { + "AssociatedComponent.background": "#F7F8FA", "background": "#F7F8FA", "borderColor": "#F7F8FA", - "captionBackground": "#fafbfc", + "captionBackground": "#FFFFFF", "captionForeground": "#5B6168", - "footerBackground": "#fafbfc", + "Details.background": "#F7F8FA", + "footerBackground": "#FFFFFF", "footerForeground": "#5B6168", "headerBackground": "#F7F8FA", "headerForeground": "#5B6168", + "List.background": "#FFFFFF", "separatorColor": "#DFE1E4", + "SidePanel.background": "#F7F8FA", "Projects": { - "background": "#f3f3f3", + "actions.background": "#FFFFFF", + "actions.selectionBackground": "#CCE5FF", + "background": "#F7F8FA", "selectionBackground": "#3A66D1", - "selectionInactiveBackground": "#f3f3f3" + "selectionInactiveBackground": "#F7F8FA" } }, "window": "#F7F8FA", @@ -862,14 +955,14 @@ }, "icons": { "ColorPalette": { - "#43494A": "#fafbfc", + "#43494A": "#FFFFFF", "#6B6B6B": "#292D31", "#A7A7A7": "#F7F8FA", "#3D6185": "#79CB60", "#466D94": "#79CB60", "#3C3F41": "#F7F8FA", - "#545556": "#9ba0a3", - "#606060": "#9ba0a3", + "#545556": "#6C737C", + "#606060": "#6C737C", "#9AA7B0": "#5B6168", "#675133": "#79CB60", "Actions.Blue": "#6F42C1", @@ -879,20 +972,20 @@ "Actions.GreyInline.Dark": "#5B6168", "Actions.Red": "#22863A", "Actions.Yellow": "#6F42C1", - "Checkbox.Background.Default": "#fafbfc", - "Checkbox.Background.Default.Dark": "#fafbfc", - "Checkbox.Background.Disabled": "#dcdcdc", - "Checkbox.Background.Disabled.Dark": "#dcdcdc", + "Checkbox.Background.Default": "#FFFFFF", + "Checkbox.Background.Default.Dark": "#FFFFFF", + "Checkbox.Background.Disabled": "#FDFDFD", + "Checkbox.Background.Disabled.Dark": "#FDFDFD", "Checkbox.Border.Default": "#DFE1E4", "Checkbox.Border.Default.Dark": "#DFE1E4", - "Checkbox.Border.Disabled": "#9ba0a3", - "Checkbox.Border.Disabled.Dark": "#9ba0a3", + "Checkbox.Border.Disabled": "#6C737C", + "Checkbox.Border.Disabled.Dark": "#6C737C", "Checkbox.Focus.Thin.Default": "#79CB60", "Checkbox.Focus.Thin.Default.Dark": "#79CB60", "Checkbox.Focus.Wide": "#79CB60", "Checkbox.Focus.Wide.Dark": "#79CB60", - "Checkbox.Foreground.Disabled": "#9ba0a3", - "Checkbox.Foreground.Disabled.Dark": "#9ba0a3", + "Checkbox.Foreground.Disabled": "#6C737C", + "Checkbox.Foreground.Disabled.Dark": "#6C737C", "Checkbox.Background.Selected": "#79CB60", "Checkbox.Background.Selected.Dark": "#F7F8FA", "Checkbox.Border.Selected": "#79CB60", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl Contrast.theme.json index ef88efdd..259186d4 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl Contrast.theme.json @@ -3,225 +3,247 @@ "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Light Owl.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/lightowl.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { - "acceleratorSelectionForeground": "#90A7B2", - "background": "#F0F0F0", - "borderColor": "#d9d9d9", - "disabledBackground": "#E0E7EA", - "disabledForeground": "#93A1A1", - "disabledText": "#93A1A1", - "focusColor": "#CCCCCC", - "focusedBorderColor": "#2AA298", - "foreground": "#403f53", - "inactiveBackground": "#E0E7EA", - "inactiveForeground": "#90A7B2", - "infoForeground": "#90A7B2", - "selectionBackground": "#d3e8f8", - "selectionBackgroundInactive": "#FBFBFB", + "acceleratorSelectionForeground": "#403F53", + "background": "#FAFAFA", + "borderColor": "#efefef", + "disabledBackground": "#82AAFF", + "disabledForeground": "#dddddd", + "disabledText": "#dddddd", + "focusColor": "#E0E7EA", + "focusedBorderColor": "#269386", + "foreground": "#546e7a", + "inactiveBackground": "#82AAFF", + "inactiveForeground": "#403F53", + "infoForeground": "#403F53", + "selectionBackground": "#999e9e", + "selectionBackgroundInactive": "#f2f5f7", "selectionForeground": "#403f53", - "selectionInactiveBackground": "#FBFBFB", - "separatorColor": "#d9d9d9" + "selectionInactiveBackground": "#f2f5f7", + "separatorColor": "#efefef" }, - "activeCaption": "#F0F0F0", + "activeCaption": "#FAFAFA", "ActionButton": { - "hoverBackground": "#2AA29850", - "hoverBorderColor": "#2AA29850", - "hoverSeparatorColor": "#d9d9d9", - "focusedBorderColor": "#2AA29850", - "pressedBackground": "#2AA29850", - "pressedBorderColor": "#2AA29850" + "hoverBackground": "#26938650", + "hoverBorderColor": "#26938650", + "hoverSeparatorColor": "#FAFAFA", + "focusedBorderColor": "#26938650", + "pressedBackground": "#26938650", + "pressedBorderColor": "#26938650" }, "Autocomplete": { - "selectionBackground": "#d3e8f8" + "selectionBackground": "#999e9e" }, - "Borders.ContrastBorderColor": "#F0F0F0", - "Borders.color": "#d9d9d9", + "Borders.ContrastBorderColor": "#FAFAFA", + "Borders.color": "#efefef", "Button": { "arc": 0, - "background": "#F0F0F0", + "background": "#FAFAFA", "default": { - "endBackground": "#d3e8f8", - "endBorderColor": "#d3e8f8", + "endBackground": "#FAFAFA", + "endBorderColor": "#FAFAFA", "foreground": "#333333", - "focusColor": "#2AA298", - "focusedBorderColor": "#2AA298", - "shadowColor": "#d3e8f8", - "startBackground": "#d3e8f8", - "startBorderColor": "#d3e8f8" + "focusColor": "#269386", + "focusedBorderColor": "#269386", + "shadowColor": "#FAFAFA", + "startBackground": "#FAFAFA", + "startBorderColor": "#FAFAFA" }, - "disabledBorderColor": "#d9d9d9", - "disabledText": "#93A1A1", - "endBackground": "#d9d9d9", - "endBorderColor": "#d9d9d9", - "focus": "#CCCCCC", - "focusedBorderColor": "#2AA298", - "foreground": "#90A7B2", + "disabledBorderColor": "#FAFAFA", + "disabledText": "#dddddd", + "endBackground": "#FAFAFA", + "endBorderColor": "#FAFAFA", + "focus": "#E0E7EA", + "focusedBorderColor": "#269386", + "foreground": "#403F53", "highlight": "#403f53", - "mt.background": "#d9d9d9", - "mt.foreground": "#90A7B2", + "mt.background": "#FAFAFA", + "mt.foreground": "#403F53", "mt.selectedForeground": "#403f53", - "mt.selection.color1": "#d3e8f8", - "mt.selection.color2": "#d3e8f8", - "startBackground": "#d9d9d9", - "startBorderColor": "#d9d9d9", - "shadowColor": "#d9d9d9", + "mt.selection.color1": "#FAFAFA", + "mt.selection.color2": "#FAFAFA", + "startBackground": "#FAFAFA", + "startBorderColor": "#FAFAFA", + "shadowColor": "#FAFAFA", "shadowWidth": 0 }, "Canvas": { - "Tooltip.borderColor": "#d9d9d9", + "Tooltip.borderColor": "#efefef", "Tooltip.background": "#F0F0F0" }, - "Content.background": "#f0f0f0", + "Content": { + "background": "#FAFAFA", + "selectionBackground": "#999e9e" + }, "CheckBox": { - "background": "#F0F0F0", - "disabledText": "#93A1A1", - "foreground": "#403f53", - "select": "#2AA298" + "background": "#FAFAFA", + "disabledText": "#dddddd", + "foreground": "#546e7a", + "select": "#269386" }, "CheckBoxMenuItem": { - "acceleratorForeground": "#90A7B2", - "acceleratorSelectionForeground": "#90A7B2", - "background": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "acceleratorForeground": "#403F53", + "acceleratorSelectionForeground": "#403F53", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#333333" }, + "CodeWithMe": { + "Avatar.foreground": "#546e7a", + "AccessEnabled": { + "accessDot": "#269386", + "dropdownBorder": "#f2f5f7", + "pillBackground": "$second" + } + }, "ColorChooser": { - "background": "#F0F0F0", - "foreground": "#403f53", - "swatchesDefaultRecentColor": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a", + "swatchesDefaultRecentColor": "#546e7a" }, - "ComboBoxButton.background": "#d9d9d9", + "ComboBoxButton.background": "#FAFAFA", "ComboBox": { "ArrowButton": { - "background": "#d9d9d9", - "disabledIconColor": "#93A1A1", - "iconColor": "#403f53", - "nonEditableBackground": "#F0F0F0" + "background": "#FAFAFA", + "disabledIconColor": "#dddddd", + "iconColor": "#546e7a", + "nonEditableBackground": "#FAFAFA" }, - "background": "#f0f0f0", - "buttonBackground": "#d9d9d9", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "modifiedItemForeground": "#2AA298", - "nonEditableBackground": "#FBFBFB", + "background": "#FAFAFA", + "buttonBackground": "#FAFAFA", + "darcula.hoveredArrowButtonForeground": "#269386", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "modifiedItemForeground": "#269386", + "nonEditableBackground": "#f2f5f7", "padding": "5,5,5,5", - "selectionBackground": "#d3e8f8", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, - "ComboPopup.border": "#d9d9d9", + "ComboPopup.border": "#efefef", "CompletionPopup": { - "background": "#FBFBFB", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "matchForeground": "#2AA298", - "matchSelectionForeground": "#2AA298", + "background": "#f2f5f7", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "matchForeground": "#269386", + "matchSelectionForeground": "#269386", "nonFocusedState": "false", "selectedGrayedForeground": "#403f53", "selectionGrayForeground": "#403f53", - "selectionInactiveInfoForeground": "#90A7B2", - "selectionInactiveBackground": "#d3e8f850", - "selectionBackground": "#d3e8f880", + "selectionInactiveInfoForeground": "#403F53", + "selectionInactiveBackground": "#999e9e50", + "selectionBackground": "#999e9e80", "selectionForeground": "#403f53", "selectionInfoForeground": "#403f53" }, "Component": { "arc": 4, - "borderColor": "#CCCCCC", - "disabledBorderColor": "#d9d9d9", - "focusColor": "#2AA298", - "focusedBorderColor": "#2AA298", - "hoverIconColor": "#2AA298", - "infoForeground": "#90A7B2", - "iconColor": "#403f53" + "borderColor": "#E0E7EA", + "disabledBorderColor": "#FAFAFA", + "focusColor": "#269386", + "focusedBorderColor": "#269386", + "hoverIconColor": "#269386", + "infoForeground": "#403F53", + "iconColor": "#546e7a" }, - "control": "#F0F0F0", - "controlText": "#90A7B2", + "control": "#FAFAFA", + "controlText": "#403F53", "Counter": { - "background": "#2AA298", + "background": "#269386", "foreground": "#403f53" }, "Debugger": { "Variables": { - "collectingDataForeground": "#90A7B2", - "changedValueForeground": "#2AA298", + "collectingDataForeground": "#403F53", + "changedValueForeground": "#269386", "errorMessageForeground": "#994cc3", - "evaluatingExpressionForeground": "#90A7B2", + "evaluatingExpressionForeground": "#403F53", "exceptionForeground": "#4876d6", - "modifyingValueForeground": "#2AA298", - "valueForeground": "#2AA298" + "modifyingValueForeground": "#269386", + "valueForeground": "#269386" } }, "DebuggerTabs": { - "selectedBackground": "#CCCCCC", - "underlinedTabBackground": "#CCCCCC" + "selectedBackground": "#E0E7EA", + "underlinedTabBackground": "#E0E7EA" }, "DebuggerPopup": { - "borderColor": "#CCCCCC" + "borderColor": "#E0E7EA" }, "DefaultTabs": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "hoverBackground": "#d3e8f8", - "hoverColor": "#f0f0f0", - "hoverMaskColor": "#CCCCCC", - "inactiveColoredFileBackground": "#d9d9d9", - "inactiveUnderlineColor": "#93A1A1", - "inactiveMaskColor": "#f0f0f0", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#d3e8f8" + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "hoverBackground": "#FAFAFA", + "hoverColor": "#FAFAFA", + "hoverMaskColor": "#E0E7EA", + "inactiveColoredTabBackground": "#FAFAFA", + "inactiveColoredFileBackground": "#FAFAFA", + "inactiveUnderlineColor": "#269386", + "inactiveMaskColor": "#FAFAFA", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabForeground": "#403f53" }, - "Desktop.background": "#F0F0F0", - "DialogWrapper.southPanelBackground": "#F0F0F0", - "DialogWrapper.southPanelDivider": "#F0F0F0", + "Desktop.background": "#FAFAFA", + "DialogWrapper.southPanelBackground": "#FAFAFA", + "DialogWrapper.southPanelDivider": "#FAFAFA", "DragAndDrop": { - "areaBackground": "#F0F0F0", - "areaBorderColor": "#F0F0F0", - "areaForeground": "#403f53" + "areaBackground": "#FAFAFA", + "areaBorderColor": "#FAFAFA", + "areaForeground": "#546e7a" }, "Editor": { - "background": "#f0f0f0", - "foreground": "#403f53", - "shortcutForeground": "#90A7B2" + "background": "#FAFAFA", + "foreground": "#546e7a", + "shortcutForeground": "#403F53" }, "EditorPane": { - "background": "#f0f0f0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveBackground": "#F0F0F0", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveBackground": "#FAFAFA", + "inactiveForeground": "#dddddd", + "selectionBackground": "#999e9e", "selectionForeground": "#333333" }, "EditorTabs": { - "borderColor": "#FBFBFB", - "hoverColor": "#CCCCCC", - "hoverMaskColor": "#CCCCCC", - "inactiveMaskColor": "#F0F0F0", - "inactiveColoredFileBackground": "#F0F0F02", - "inactiveUnderlineColor": "#93A1A1", - "selectedForeground": "#403f53", - "selectedBackground": "#d3e8f8", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#d3e8f8" + "borderColor": "#f2f5f7", + "hoverBackground": "#E0E7EA", + "hoverColor": "#E0E7EA", + "hoverMaskColor": "#E0E7EA", + "inactiveMaskColor": "#FAFAFA", + "inactiveColoredFileBackground": "#FAFAFA", + "inactiveUnderlineColor": "#dddddd", + "selectedForeground": "#546e7a", + "selectedBackground": "#FAFAFA", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabForeground": "#403f53" }, "EditorGroupsTabs": { - "background": "#F0F0F0", - "borderColor": "#FBFBFB", - "hoverBackground": "#CCCCCC", - "hoverColor": "#CCCCCC", - "inactiveUnderlineColor": "#2AA298", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#d3e8f8", - "underlinedTabForeground": "#403f53" + "background": "#FAFAFA", + "borderColor": "#f2f5f7", + "hoverBackground": "#E0E7EA", + "hoverColor": "#E0E7EA", + "inactiveUnderlineColor": "#269386", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabForeground": "#546e7a" }, "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#E0E7EA", + "Yellow": "#82AAFF", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -236,151 +258,155 @@ "nativeSearchNotMatchedBackground": "#C792EA", "nativeFocusSearchNotMatchedBackground": "#BB80B3" }, - "Focus.color": "#d9d9d9", + "Focus.color": "#efefef", "FormattedTextField": { - "background": "#f0f0f0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveBackground": "#d9d9d9", - "inactiveForeground": "#93A1A1", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveBackground": "#FAFAFA", + "inactiveForeground": "#dddddd", "selectionForeground": "#333333", - "selectionBackground": "#d3e8f8" + "selectionBackground": "#FAFAFA" }, + "GotItTooltip.borderColor": "#F0F0F0", "Group": { - "disabledSeparatorColor": "#d9d9d9", - "separatorColor": "#d9d9d9" + "disabledSeparatorColor": "#efefef", + "separatorColor": "#efefef" }, "GutterTooltip": { - "infoForeground": "#403f53", - "lineSeparatorColor": "#F0F0F0" + "infoForeground": "#403F53", + "lineSeparatorColor": "#FAFAFA" }, "HeaderColor": { - "active": "#F0F0F0", - "inactive": "#f0f0f0" + "active": "#FAFAFA", + "inactive": "#FAFAFA" }, "HelpTooltip": { - "background": "#F0F0F0", - "borderColor": "#d9d9d9", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "shortcutForeground": "#90A7B2" + "background": "#FAFAFA", + "borderColor": "#efefef", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "shortcutForeground": "#403F53" }, - "Hyperlink.linkColor": "#2AA298", - "inactiveCaption": "#FBFBFB", - "inactiveCaptionBorder": "#F0F0F0", - "inactiveCaptionText": "#90A7B2", - "info": "#90A7B2", - "infoText": "#90A7B2", + "Hyperlink.linkColor": "#269386", + "inactiveCaption": "#f2f5f7", + "inactiveCaptionBorder": "#FAFAFA", + "inactiveCaptionText": "#403F53", + "info": "#403F53", + "infoText": "#403F53", "IdeStatusBar.border": "4,4,4,4", - "InformationHint.borderColor": "#d9d9d9", + "InformationHint.borderColor": "#efefef", "InplaceRefactoringPopup": { - "borderColor": "#F0F0F0" + "borderColor": "#FAFAFA" }, "InternalFrame": { - "activeTitleForeground": "#403f53", - "background": "#F0F0F0", - "inactiveTitleForeground": "#90A7B2" + "activeTitleForeground": "#546e7a", + "background": "#FAFAFA", + "inactiveTitleForeground": "#403F53" }, "Label": { - "background": "#F0F0F0", - "disabledForeground": "#93A1A1", - "disabledShadow": "#F0F0F0", - "disabledText": "#93A1A1", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "selectedForeground": "#333333" + "background": "#FAFAFA", + "disabledForeground": "#dddddd", + "disabledShadow": "#FAFAFA", + "disabledText": "#dddddd", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "selectedForeground": "#333333", + "selectedDisabledForeground": "#546e7a" }, "Link": { - "activeForeground": "#2AA298", - "hoverForeground": "#2AA298", - "pressedForeground": "#2AA298", - "secondaryForeground": "#90A7B2", - "visitedForeground": "#2AA298" + "activeForeground": "#269386", + "hoverForeground": "#269386", + "pressedForeground": "#269386", + "secondaryForeground": "#403F53", + "visitedForeground": "#269386" }, - "link.foreground": "#2AA298", + "link.foreground": "#269386", "List": { - "background": "#FBFBFB", - "foreground": "#403f53", - "selectionBackground": "#d3e8f850", + "background": "#f2f5f7", + "foreground": "#546e7a", + "hoverBackground": "#E0E7EA70", + "hoverInactiveBackground": "#FAFAFA", + "selectionBackground": "#999e9e50", "selectionForeground": "#403f53", "selectionInactiveForeground": "#333333", - "selectionInactiveBackground": "#d3e8f87c" + "selectionInactiveBackground": "#E0E7EA70" }, "material": { - "background": "#F0F0F0", - "branchColor": "#403f53", - "contrast": "#f0f0f0", - "foreground": "#403f53", - "mergeCommits": "#d9d9d9", - "primaryColor": "#90A7B2", + "background": "#FAFAFA", + "branchColor": "#546e7a", + "contrast": "#FAFAFA", + "foreground": "#546e7a", + "mergeCommits": "#FAFAFA", + "primaryColor": "#403F53", "selectionForeground": "#403f53", - "tab.backgroundColor": "#F0F0F0", - "tab.borderColor": "#2AA298", - "tagColor": "#90A7B2" + "tab.backgroundColor": "#FAFAFA", + "tab.borderColor": "#269386", + "tagColor": "#403F53" }, "MemoryIndicator": { - "allocatedBackground": "#FBFBFB", - "usedColor": "#CCCCCC", - "usedBackground": "#CCCCCC" + "allocatedBackground": "#f2f5f7", + "usedColor": "#E0E7EA", + "usedBackground": "#E0E7EA" }, "Menu": { - "acceleratorForeground": "#90A7B2", + "acceleratorForeground": "#403F53", "acceleratorSelectionForeground": "#403f53", - "background": "#F0F0F0", + "background": "#FAFAFA", "border": "4,2,4,2", - "borderColor": "#FBFBFB", - "disabledBackground": "#FBFBFB", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "borderColor": "#f2f5f7", + "disabledBackground": "#f2f5f7", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53", - "separatorColor": "#d9d9d9" + "separatorColor": "#efefef" }, "MenuBar": { - "background": "#f0f0f0", - "borderColor": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "highlight": "#F0F0F0", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "highlight": "#FAFAFA", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53", - "shadow": "#f0f0f0" + "shadow": "#FAFAFA" }, "MenuItem": { - "acceleratorForeground": "#90A7B2", + "acceleratorForeground": "#403F53", "acceleratorSelectionForeground": "#403f53", "border": "4,2,4,2", - "background": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53" }, "NavBar": { - "arrowColor": "#403f53", - "borderColor": "#F0F0F0" + "arrowColor": "#546e7a", + "borderColor": "#FAFAFA" }, "NewClass": { "Panel": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "SearchField": { - "background": "#f0f0f0" + "background": "#FAFAFA" } }, - "NewPSD.warning": "#2AA298", + "NewPSD.warning": "#269386", "Notification": { "background": "#F0F0F0", "borderColor": "#F0F0F0", "errorBackground": "#F0F0F0", "errorBorderColor": "#F0F0F0", - "foreground": "#403f53", + "foreground": "#546e7a", "MoreButton": { - "background": "#d9d9d9", - "foreground": "#403f53", - "innerBorderColor": "#d9d9d9" + "background": "#FAFAFA", + "foreground": "#546e7a", + "innerBorderColor": "#FAFAFA" }, "ToolWindow": { "errorBackground": "#F0F0F0", @@ -391,246 +417,259 @@ "warningBorderColor": "#F0F0F0" } }, - "OnePixelDivider.background": "#d9d9d9", + "OnePixelDivider.background": "#efefef", "OptionPane": { - "background": "#F0F0F0", - "foreground": "#403f53", - "messageForeground": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a", + "messageForeground": "#546e7a" }, "Outline": { - "color": "#d9d9d9", - "focusedColor": "#2AA298", - "disabledColor": "#93A1A1" + "color": "#FAFAFA", + "focusedColor": "#269386", + "disabledColor": "#dddddd" }, "Panel": { - "background": "#F0F0F0", - "foreground": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a" }, "ParameterInfo": { - "background": "#FBFBFB", - "borderColor": "#d3e8f8", - "currentOverloadBackground": "#d3e8f8", - "currentParameterForeground": "#2AA298", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "lineSeparatorColor": "#d3e8f8" + "background": "#f2f5f7", + "borderColor": "#FAFAFA", + "currentOverloadBackground": "#E0E7EA", + "currentParameterForeground": "#269386", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "lineSeparatorColor": "#FAFAFA" }, "PasswordField": { - "background": "#f0f0f0", - "capsLockIconColor": "#2AA298", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "capsLockIconColor": "#269386", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "Plugins": { - "background": "#F0F0F0", - "disabledForeground": "#93A1A1", - "eapTagBackground": "#CCCCCC", - "lightSelectionBackground": "#d3e8f8", - "paidTagBackground": "#CCCCCC", - "selectionBackground": "#d3e8f8", - "tagForeground": "#2AA298", - "tagBackground": "#CCCCCC", - "trialTagBackground": "#CCCCCC", + "background": "#FAFAFA", + "disabledForeground": "#dddddd", + "eapTagBackground": "#E0E7EA", + "hoverBackground": "#E0E7EA70", + "lightSelectionBackground": "#FAFAFA", + "paidTagBackground": "#E0E7EA", + "selectionBackground": "#999e9e", + "tagForeground": "#269386", + "tagBackground": "#E0E7EA", + "trialTagBackground": "#E0E7EA", "Button": { - "installBackground": "#d9d9d9", - "installBorderColor": "#d9d9d9", - "installForeground": "#403f53", - "installFocusedBackground": "#CCCCCC", - "installFillForeground": "#93A1A1", - "installFillBackground": "#d9d9d9", - "updateBackground": "#d9d9d9", - "updateBorderColor": "#d9d9d9", - "updateForeground": "#403f53" + "installBackground": "#FAFAFA", + "installBorderColor": "#FAFAFA", + "installForeground": "#546e7a", + "installFocusedBackground": "#E0E7EA", + "installFillForeground": "#dddddd", + "installFillBackground": "#FAFAFA", + "updateBackground": "#269386", + "updateBorderColor": "#FAFAFA", + "updateForeground": "#546e7a" }, "SearchField": { - "background": "#f0f0f0", - "borderColor": "#d9d9d9" + "background": "#FAFAFA", + "borderColor": "#efefef" }, "SectionHeader": { - "background": "#FBFBFB", - "foreground": "#403f53" + "background": "#f2f5f7", + "foreground": "#546e7a" }, "Tab": { - "hoverBackground": "#d3e8f8", + "hoverBackground": "#FAFAFA", "selectedForeground": "#403f53", - "selectedBackground": "#d3e8f8" + "selectedBackground": "#FAFAFA" } }, "Popup": { "Advertiser": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "foreground": "#2AA298" + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "foreground": "#269386" }, - "borderColor": "#f0f0f0", - "inactiveBorderColor": "#F0F0F0", - "innerBorderColor": "#FBFBFB", + "borderColor": "#FAFAFA", + "inactiveBorderColor": "#FAFAFA", + "innerBorderColor": "#f2f5f7", "Header": { - "activeBackground": "#F0F0F0", - "inactiveBackground": "#f0f0f0" + "activeBackground": "#FAFAFA", + "inactiveBackground": "#FAFAFA" }, "paintBorder": true, - "separatorForeground": "#403f53", - "separatorColor": "#FBFBFB", + "separatorForeground": "#546e7a", + "separatorColor": "#f2f5f7", "Toolbar": { - "Floating.background": "#f0f0f0", - "background": "#f0f0f0", - "borderColor": "#f0f0f0" + "Floating.background": "#FAFAFA", + "background": "#FAFAFA", + "borderColor": "#FAFAFA" } }, "PopupMenu": { - "background": "#F0F0F0", + "background": "#FAFAFA", "border": "2,0,2,0", - "foreground": "#403f53", - "translucentBackground": "#F0F0F0" + "foreground": "#546e7a", + "translucentBackground": "#FAFAFA" }, "PopupMenuSeparator.height": 10, "PopupMenuSeparator.stripeIndent": 5, "ProgressBar": { - "background": "#F0F0F0", - "foreground": "#2AA298", - "indeterminateEndColor": "#2AA298", - "indeterminateStartColor": "#2AA298", - "progressColor": "#2AA298", - "selectionBackground": "#CCCCCC", - "trackColor": "#CCCCCC" + "background": "#FAFAFA", + "foreground": "#269386", + "indeterminateEndColor": "#269386", + "indeterminateStartColor": "#269386", + "progressColor": "#269386", + "selectionBackground": "#E0E7EA", + "trackColor": "#E0E7EA" }, "PsiViewer": { - "referenceHighlightColor": "#2AA298" + "referenceHighlightColor": "#269386" }, "RadioButton": { - "background": "#F0F0F0", - "disabledText": "#93A1A1", - "foreground": "#403f53" + "background": "#FAFAFA", + "disabledText": "#dddddd", + "foreground": "#546e7a" }, "RadioButtonMenuItem": { - "acceleratorForeground": "#90A7B2", - "acceleratorSelectionForeground": "#90A7B2", - "background": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "acceleratorForeground": "#403F53", + "acceleratorSelectionForeground": "#403F53", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53" }, + "ScreenView.borderColor": "#efefef", "ScrollBar": { - "background": "#F0F0F0", - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", + "background": "#FAFAFA", + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", "Mac": { - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030", + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30", "Transparent": { - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030" + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30" } }, - "thumb": "#CCCCCC", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030", + "thumb": "#E0E7EA", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30", "Transparent": { - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030" + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30" } }, "SearchEverywhere": { "Advertiser": { - "background": "#f0f0f0", - "foreground": "#90A7B2" + "background": "#FAFAFA", + "foreground": "#403F53" }, "Header": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "List": { - "separatorForeground": "#90A7B2", - "separatorColor": "#d9d9d9" + "separatorForeground": "#403F53", + "separatorColor": "#efefef" }, "SearchField": { - "background": "#F0F0F0", - "borderColor": "#f0f0f0", - "infoForeground": "#90A7B2" + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "infoForeground": "#403F53" }, "Tab": { "active.foreground": "#333333", "selectedForeground": "#333333", - "selectedBackground": "#CCCCCC" + "selectedBackground": "#E0E7EA" } }, "SearchMatch": { - "endBackground": "#2AA298", - "startBackground": "#2AA298" + "endBackground": "#269386", + "startBackground": "#269386", + "endColor": "#269386", + "startColor": "#269386" }, "SearchField.errorBackground": "#F0F0F0", + "SearchOption": { + "selectedBackground": "#FAFAFA" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#403F53", + "Repeated.File.Foreground": "#546e7a" + }, "Separator": { - "background": "#FBFBFB", - "foreground": "#FBFBFB", - "separatorColor": "#FBFBFB" + "background": "#f2f5f7", + "foreground": "#f2f5f7", + "separatorColor": "#f2f5f7" }, "SidePanel": { - "background": "#f0f0f0" + "background": "#FAFAFA" }, "Slider": { - "background": "#F0F0F0", - "buttonBorderColor": "#2AA298", - "buttonColor": "#2AA298", - "foreground": "#403f53", + "background": "#FAFAFA", + "buttonBorderColor": "#269386", + "buttonColor": "#269386", + "foreground": "#546e7a", "majorTickLength": 6, - "tickColor": "#FBFBFB", - "trackColor": "#d3e8f8", + "tickColor": "#f2f5f7", + "trackColor": "#FAFAFA", "trackWidth": 7, - "thumb": "#2AA298" + "thumb": "#269386" }, "SpeedSearch": { - "background": "#CCCCCC", - "borderColor": "#d9d9d9", - "foreground": "#403f53", - "errorForeground": "#403f53" + "background": "#E0E7EA", + "borderColor": "#efefef", + "foreground": "#546e7a", + "errorForeground": "#546e7a" }, "Spinner": { - "background": "#F0F0F0", + "background": "#FAFAFA", "border": "3,3,3,3", - "foreground": "#403f53", + "foreground": "#546e7a", "selectionForeground": "#333333" }, "SplitPane": { - "background": "#F0F0F0", - "highlight": "#f0f0f0" + "background": "#FAFAFA", + "highlight": "#FAFAFA" }, - "SplitPaneDivider.draggingColor": "#FBFBFB", + "SplitPaneDivider.draggingColor": "#f2f5f7", "StatusBar": { - "borderColor": "#F0F0F0" + "borderColor": "#FAFAFA", + "hoverBackground": "#E0E7EA", + "LightEditBackground": "#FAFAFA" }, "TabbedPane": { - "background": "#F0F0F0", - "contentAreaColor": "#CCCCCC", + "background": "#FAFAFA", + "contentAreaColor": "#E0E7EA", "contentBorderInsets": "3,1,1,1", - "darkShadow": "#d9d9d9", - "disabledForeground": "#93A1A1", - "disabledUnderlineColor": "#93A1A1", - "focus": "#d3e8f8", - "focusColor": "#d3e8f8", + "darkShadow": "#efefef", + "disabledForeground": "#dddddd", + "disabledUnderlineColor": "#dddddd", + "focus": "#FAFAFA", + "focusColor": "#FAFAFA", "fontSizeOffset": 0, - "foreground": "#403f53", - "highlight": "#d9d9d9", - "hoverColor": "#CCCCCC", + "foreground": "#546e7a", + "highlight": "#efefef", + "hoverColor": "#E0E7EA", "labelShift": 0, "selectedForeground": "#333333", "selectedLabelShift": 0, @@ -639,164 +678,211 @@ "tabHeight": 32, "tabInsets": "5,10,5,10", "tabSelectionHeight": 2, - "underlineColor": "#2AA298" + "underlineColor": "#269386" }, - "TabbedPane.mt.tab.background": "#f0f0f0", + "TabbedPane.mt.tab.background": "#FAFAFA", "Table": { - "background": "#F0F0F0", + "alternativeRowBackground": "#FAFAFA", + "background": "#FAFAFA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", - "dropLineColor": "#2AA298", - "dropLineShortColor": "#2AA298", - "focusCellBackground": "#d3e8f8", + "disabledForeground": "#dddddd", + "dropLineColor": "#269386", + "dropLineShortColor": "#269386", + "focusCellBackground": "#FAFAFA", "focusCellForeground": "#333333", - "foreground": "#403f53", - "gridColor": "#F0F0F0", - "highlightOuter": "#d3e8f8", + "foreground": "#546e7a", + "gridColor": "#FAFAFA", + "highlightOuter": "#FAFAFA", + "hoverBackground": "#E0E7EA70", + "hoverInactiveBackground": "#FAFAFA", "lightSelectionForeground": "#333333", - "lightSelectionInactiveForeground": "#90A7B2", - "lightSelectionInactiveBackground": "#FBFBFB", - "selectionBackground": "#d3e8f8", + "lightSelectionInactiveForeground": "#403F53", + "lightSelectionInactiveBackground": "#f2f5f7", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333", - "selectionInactiveBackground": "#d3e8f8", + "selectionInactiveBackground": "#FAFAFA", "selectionInactiveForeground": "#403f53", - "sortIconColor": "#403f53", - "stripeColor": "#f0f0f0" + "sortIconColor": "#546e7a", + "stripeColor": "#FAFAFA" }, "TableHeader": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "bottomSeparatorColor": "#FBFBFB", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "bottomSeparatorColor": "#f2f5f7", "cellBorder": "4,0,4,0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "focusCellBackground": "#d3e8f8", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "focusCellBackground": "#FAFAFA", "focusCellForeground": "#333333", "height": 25, - "separatorColor": "#FBFBFB" + "separatorColor": "#f2f5f7" }, - "text": "#90A7B2", - "textInactiveText": "#90A7B2", - "textText": "#90A7B2", + "text": "#403F53", + "textInactiveText": "#403F53", + "textText": "#403F53", "TextArea": { - "background": "#f0f0f0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "TextField": { - "background": "#f0f0f0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "TextPane": { - "background": "#f0f0f0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "TitlePane": { - "background": "#f0f0f0", - "Button.hoverBackground": "#CCCCCC", - "inactiveBackground": "#F0F0F0", - "infoForeground": "#90A7B2", - "inactiveInfoForeground": "#90A7B2" + "background": "#FAFAFA", + "Button.hoverBackground": "#E0E7EA", + "inactiveBackground": "#FAFAFA", + "infoForeground": "#403F53", + "inactiveInfoForeground": "#403F53" }, - "TitledBorder.titleColor": "#403f53", + "TitledBorder.titleColor": "#546e7a", "ToggleButton": { - "borderColor": "#d9d9d9", - "buttonColor": "#403f53", - "disabledText": "#93A1A1", - "foreground": "#403f53", - "offForeground": "#F0F0F0", - "offBackground": "#F0F0F0", - "onBackground": "#2AA298", - "onForeground": "#2AA298" + "borderColor": "#FAFAFA", + "buttonColor": "#546e7a", + "disabledText": "#dddddd", + "foreground": "#546e7a", + "offForeground": "#FAFAFA", + "offBackground": "#FAFAFA", + "onBackground": "#269386", + "onForeground": "#269386" }, "ToolBar": { - "background": "#f0f0f0", - "borderHandleColor": "#90A7B2", - "floatingForeground": "#90A7B2", - "foreground": "#403f53" + "background": "#FAFAFA", + "borderHandleColor": "#403F53", + "floatingForeground": "#403F53", + "foreground": "#546e7a" }, "ToolTip": { - "Actions.background": "#F0F0F0", - "Actions.infoForeground": "#90A7B2", + "Actions.background": "#FAFAFA", + "Actions.infoForeground": "#403F53", "background": "#F0F0F0", - "borderColor": "#CCCCCC", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "separatorColor": "#d9d9d9", - "shortcutForeground": "#90A7B2" + "borderColor": "#efefef", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "separatorColor": "#efefef", + "shortcutForeground": "#403F53" }, "ToolWindow": { "Button": { - "hoverBackground": "#d3e8f8", + "hoverBackground": "#FAFAFA", "selectedForeground": "#333333", - "selectedBackground": "#f0f0f0" + "selectedBackground": "#FAFAFA" }, "Header": { - "background": "#F0F0F0", - "borderColor": "#FBFBFB", - "inactiveBackground": "#F0F0F0" + "background": "#FAFAFA", + "borderColor": "#f2f5f7", + "inactiveBackground": "#FAFAFA" }, "HeaderCloseButton": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "HeaderTab": { - "hoverBackground": "#CCCCCC", - "hoverInactiveBackground": "#FBFBFB", - "inactiveUnderlineColor": "#2AA298", - "selectedBackground": "#f0f0f0", - "selectedInactiveBackground": "#f0f0f0", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#CCCCCC", - "underlinedTabInactiveBackground": "#FBFBFB" + "borderColor": "#E0E7EA", + "hoverBackground": "#E0E7EA", + "hoverInactiveBackground": "#E0E7EA", + "inactiveUnderlineColor": "#269386", + "selectedBackground": "#FAFAFA", + "selectedInactiveBackground": "#FAFAFA", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabInactiveBackground": "#f2f5f7", + "underlinedTabForeground": "#403f53", + "underlinedTabInactiveForeground": "#546e7a" } }, "Tree": { - "background": "#f0f0f0", - "foreground": "#90A7B2", - "hash": "#d9d9d9", - "modifiedItemForeground": "#2AA298", + "background": "#FAFAFA", + "foreground": "#403F53", + "hash": "#efefef", + "hoverBackground": "#E0E7EA70", + "hoverInactiveBackground": "#FAFAFA", + "modifiedItemForeground": "#269386", "rowHeight": 28, - "selectionBackground": "#d3e8f87c", + "selectionBackground": "#E0E7EA70", "selectionForeground": "#403f53", "selectionInactiveForeground": "#403f53", - "selectionInactiveBackground": "#d3e8f87c", - "textBackground": "#f0f0f0" + "selectionInactiveBackground": "#E0E7EA70", + "textBackground": "#FAFAFA" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { - "Activity.borderColor": "#d9d9d9", - "ColorPicker.background": "#F0F0F0", - "ColorPicker.foreground": "#403f53", - "Component.borderColor": "#d9d9d9", - "Component.background": "#F0F0F0", - "Component.foreground": "#403f53", - "Connector.borderColor": "#d9d9d9", - "Connector.hoverBorderColor": "#CCCCCC", - "Canvas.background": "#f0f0f0", - "highStroke.foreground": "#403f53", - "Label.foreground": "#90A7B2", - "List.selectionBackground": "#d3e8f87c", - "Panel.borderColor": "#d9d9d9", - "Panel.background": "#F0F0F0", - "percent.foreground": "#403f53", - "Placeholder.background": "#F0F0F0", - "Placeholder.borderColor": "#d9d9d9", - "Placeholder.foreground": "#403f53", - "Placeholder.selectedForeground": "#403f53", - "Preview.background": "#F0F0F0", - "stroke.acceleratorForeground": "#90A7B2" + "UIDesigner": { + "Activity.borderColor": "#efefef", + "Canvas.background": "#FAFAFA", + "ColorPicker": { + "background": "#FAFAFA", + "foreground": "#546e7a" + }, + "Component": { + "borderColor": "#efefef", + "background": "#FAFAFA", + "foreground": "#546e7a", + "hoverBorderColor": "#E0E7EA" + }, + "Connector": { + "borderColor": "#efefef", + "hoverBorderColor": "#E0E7EA" + }, + "Canvas.background": "#FAFAFA", + "highStroke.foreground": "#546e7a", + "Label.foreground": "#403F53", + "List.selectionBackground": "#E0E7EA70", + "motion": { + "borderColor": "#efefef", + "Component.foreground": "#546e7a", + "ConstraintSetText.foreground": "#403F53", + "ConstraintSet.background": "#f2f5f7", + "CSPanel.SelectedFocusBackground": "#999e9e", + "CSPanel.SelectedBackground": "#E0E7EA70", + "cs_FocusText.infoForeground": "#403F53", + "CursorTextColor.foreground": "#546e7a", + "HoverColor.disabledBackground": "#dddddd", + "motionGraph.background": "#FAFAFA", + "Notification.background": "#F0F0F0", + "ourAvg.background": "#f2f5f7", + "ourCS.background": "#f2f5f7", + "ourCS_Border.borderColor": "#efefef", + "ourCS_TextColor.foreground": "#403F53", + "ourCS_SelectedFocusBackground.selectionForeground": "#403f53", + "ourCS_SelectedBackground.selectionInactiveBackground": "#FAFAFA", + "ourCS_SelectedBorder.pressedBorderColor": "#E0E7EA", + "ourML_BarColor.separatorColor": "#efefef", + "PrimaryPanel.background": "#FAFAFA", + "SecondaryPanel.background": "#FAFAFA", + "SecondaryPanel.header.foreground": "#403F53", + "SecondaryPanel.header.background": "#FAFAFA", + "timeLine.disabledBorderColor": "#efefef" + }, + "Panel": { + "borderColor": "#efefef", + "background": "#FAFAFA" + }, + "percent.foreground": "#546e7a", + "Placeholder": { + "background": "#FAFAFA", + "borderColor": "#efefef", + "foreground": "#546e7a", + "selectedForeground": "#403f53" + }, + "Preview.background": "#FAFAFA", + "stroke.acceleratorForeground": "#403F53" }, "ValidationTooltip": { "errorBackground": "#F0F0F0", @@ -806,101 +892,108 @@ }, "VersionControl": { "FileHistory.Commit": { - "selectedBranchBackground": "#F0F0F0" + "selectedBranchBackground": "#FAFAFA" }, "GitCommits": { - "graphColor": "#CCCCCC" + "graphColor": "#E0E7EA" }, "GitLog": { - "localBranchIconColor": "#2AA298", - "otherIconColor": "#90A7B2", - "remoteBranchIconColor": "#403f53", - "tagIconColor": "#90A7B2" + "localBranchIconColor": "#269386", + "otherIconColor": "#403F53", + "remoteBranchIconColor": "#546e7a", + "tagIconColor": "#403F53" }, "HgLog": { - "branchIconColor": "#2AA298", + "branchIconColor": "#269386", "bookmarkIconColor": "#333333", - "closedBranchIconColor": "#93A1A1", - "localTagIconColor": "#90A7B2", - "mqTagIconColor": "#90A7B2", - "tagIconColor": "#90A7B2", - "tipIconColor": "#90A7B2" + "closedBranchIconColor": "#dddddd", + "localTagIconColor": "#403F53", + "mqTagIconColor": "#403F53", + "tagIconColor": "#403F53", + "tipIconColor": "#403F53" }, "Log": { - "Commit.unmatchedForeground": "#90A7B2", - "Commit.currentBranchBackground": "#FBFBFB" + "Commit.unmatchedForeground": "#403F53", + "Commit.currentBranchBackground": "#f2f5f7", + "Commit.hoveredBackground": "#E0E7EA70" }, "RefLabel": { "foreground": "#333333", - "backgroundBase": "#CCCCCC" + "backgroundBase": "#E0E7EA" } }, "Viewport": { - "background": "#f0f0f0", - "foreground": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a" }, "WelcomeScreen": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "captionBackground": "#f0f0f0", - "captionForeground": "#403f53", - "footerBackground": "#f0f0f0", - "footerForeground": "#403f53", - "headerBackground": "#F0F0F0", - "headerForeground": "#403f53", - "separatorColor": "#d9d9d9", + "AssociatedComponent.background": "#FAFAFA", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "captionBackground": "#FAFAFA", + "captionForeground": "#546e7a", + "Details.background": "#FAFAFA", + "footerBackground": "#FAFAFA", + "footerForeground": "#546e7a", + "headerBackground": "#FAFAFA", + "headerForeground": "#546e7a", + "List.background": "#FAFAFA", + "separatorColor": "#efefef", + "SidePanel.background": "#f2f5f7", "Projects": { - "background": "#FBFBFB", - "selectionBackground": "#d3e8f8", - "selectionInactiveBackground": "#FBFBFB" + "actions.background": "#FAFAFA", + "actions.selectionBackground": "#E0E7EA", + "background": "#f2f5f7", + "selectionBackground": "#999e9e", + "selectionInactiveBackground": "#f2f5f7" } }, - "window": "#f0f0f0", - "windowBorder": "#d9d9d9", - "windowText": "#90A7B2", - "Window.border": "#d9d9d9" + "window": "#FAFAFA", + "windowBorder": "#efefef", + "windowText": "#403F53", + "Window.border": "#efefef" }, "icons": { "ColorPalette": { - "#43494A": "#f0f0f0", - "#6B6B6B": "#90A7B2", - "#A7A7A7": "#F0F0F0", - "#3D6185": "#2AA298", - "#466D94": "#2AA298", - "#3C3F41": "#F0F0F0", - "#545556": "#93A1A1", - "#606060": "#93A1A1", - "#9AA7B0": "#403f53", - "#675133": "#2AA298", + "#43494A": "#FAFAFA", + "#6B6B6B": "#403F53", + "#A7A7A7": "#FAFAFA", + "#3D6185": "#269386", + "#466D94": "#269386", + "#3C3F41": "#FAFAFA", + "#545556": "#dddddd", + "#606060": "#dddddd", + "#9AA7B0": "#546e7a", + "#675133": "#269386", "Actions.Blue": "#4876d6", "Actions.Green": "#c96765", - "Actions.Grey": "#90A7B2", + "Actions.Grey": "#403F53", "Actions.GreyInline": "#637777", - "Actions.GreyInline.Dark": "#403f53", + "Actions.GreyInline.Dark": "#546e7a", "Actions.Red": "#994cc3", "Actions.Yellow": "#4876d6", - "Checkbox.Background.Default": "#f0f0f0", - "Checkbox.Background.Default.Dark": "#f0f0f0", - "Checkbox.Background.Disabled": "#E0E7EA", - "Checkbox.Background.Disabled.Dark": "#E0E7EA", - "Checkbox.Border.Default": "#d9d9d9", - "Checkbox.Border.Default.Dark": "#d9d9d9", - "Checkbox.Border.Disabled": "#93A1A1", - "Checkbox.Border.Disabled.Dark": "#93A1A1", - "Checkbox.Focus.Thin.Default": "#2AA298", - "Checkbox.Focus.Thin.Default.Dark": "#2AA298", - "Checkbox.Focus.Wide": "#2AA298", - "Checkbox.Focus.Wide.Dark": "#2AA298", - "Checkbox.Foreground.Disabled": "#93A1A1", - "Checkbox.Foreground.Disabled.Dark": "#93A1A1", - "Checkbox.Background.Selected": "#2AA298", - "Checkbox.Background.Selected.Dark": "#F0F0F0", - "Checkbox.Border.Selected": "#2AA298", - "Checkbox.Border.Selected.Dark": "#2AA298", - "Checkbox.Foreground.Selected": "#2AA298", - "Checkbox.Foreground.Selected.Dark": "#2AA298", - "Checkbox.Focus.Thin.Selected": "#403f53", - "Checkbox.Focus.Thin.Selected.Dark": "#403f53", + "Checkbox.Background.Default": "#FAFAFA", + "Checkbox.Background.Default.Dark": "#FAFAFA", + "Checkbox.Background.Disabled": "#82AAFF", + "Checkbox.Background.Disabled.Dark": "#82AAFF", + "Checkbox.Border.Default": "#efefef", + "Checkbox.Border.Default.Dark": "#efefef", + "Checkbox.Border.Disabled": "#dddddd", + "Checkbox.Border.Disabled.Dark": "#dddddd", + "Checkbox.Focus.Thin.Default": "#269386", + "Checkbox.Focus.Thin.Default.Dark": "#269386", + "Checkbox.Focus.Wide": "#269386", + "Checkbox.Focus.Wide.Dark": "#269386", + "Checkbox.Foreground.Disabled": "#dddddd", + "Checkbox.Foreground.Disabled.Dark": "#dddddd", + "Checkbox.Background.Selected": "#269386", + "Checkbox.Background.Selected.Dark": "#FAFAFA", + "Checkbox.Border.Selected": "#269386", + "Checkbox.Border.Selected.Dark": "#269386", + "Checkbox.Foreground.Selected": "#269386", + "Checkbox.Foreground.Selected.Dark": "#269386", + "Checkbox.Focus.Thin.Selected": "#546e7a", + "Checkbox.Focus.Thin.Selected.Dark": "#546e7a", "Objects.Grey": "#637777", "Objects.Blue": "#4876d6", "Objects.RedStatus": "#994cc3", @@ -909,7 +1002,7 @@ "Objects.Yellow": "#4876d6", "Objects.Green": "#c96765", "Objects.Purple": "#994cc3", - "Objects.BlackText": "#403f53", + "Objects.BlackText": "#546e7a", "Objects.YellowDark": "#aa0982", "Objects.GreenAndroid": "#c96765" } diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl.theme.json index bfa197d2..bc5564d3 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Light Owl.theme.json @@ -3,225 +3,247 @@ "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Light Owl.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/lightowl.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { - "acceleratorSelectionForeground": "#90A7B2", - "background": "#F0F0F0", - "borderColor": "#d9d9d9", - "disabledBackground": "#E0E7EA", - "disabledForeground": "#93A1A1", - "disabledText": "#93A1A1", - "focusColor": "#CCCCCC", - "focusedBorderColor": "#2AA298", - "foreground": "#403f53", - "inactiveBackground": "#E0E7EA", - "inactiveForeground": "#90A7B2", - "infoForeground": "#90A7B2", - "selectionBackground": "#d3e8f8", - "selectionBackgroundInactive": "#FBFBFB", + "acceleratorSelectionForeground": "#403F53", + "background": "#FAFAFA", + "borderColor": "#efefef", + "disabledBackground": "#82AAFF", + "disabledForeground": "#dddddd", + "disabledText": "#dddddd", + "focusColor": "#E0E7EA", + "focusedBorderColor": "#269386", + "foreground": "#546e7a", + "inactiveBackground": "#82AAFF", + "inactiveForeground": "#403F53", + "infoForeground": "#403F53", + "selectionBackground": "#999e9e", + "selectionBackgroundInactive": "#f2f5f7", "selectionForeground": "#403f53", - "selectionInactiveBackground": "#FBFBFB", - "separatorColor": "#d9d9d9" + "selectionInactiveBackground": "#f2f5f7", + "separatorColor": "#efefef" }, - "activeCaption": "#F0F0F0", + "activeCaption": "#FAFAFA", "ActionButton": { - "hoverBackground": "#2AA29850", - "hoverBorderColor": "#2AA29850", - "hoverSeparatorColor": "#d9d9d9", - "focusedBorderColor": "#2AA29850", - "pressedBackground": "#2AA29850", - "pressedBorderColor": "#2AA29850" + "hoverBackground": "#26938650", + "hoverBorderColor": "#26938650", + "hoverSeparatorColor": "#FAFAFA", + "focusedBorderColor": "#26938650", + "pressedBackground": "#26938650", + "pressedBorderColor": "#26938650" }, "Autocomplete": { - "selectionBackground": "#d3e8f8" + "selectionBackground": "#999e9e" }, - "Borders.ContrastBorderColor": "#F0F0F0", - "Borders.color": "#d9d9d9", + "Borders.ContrastBorderColor": "#FAFAFA", + "Borders.color": "#efefef", "Button": { "arc": 0, - "background": "#F0F0F0", + "background": "#FAFAFA", "default": { - "endBackground": "#d3e8f8", - "endBorderColor": "#d3e8f8", + "endBackground": "#FAFAFA", + "endBorderColor": "#FAFAFA", "foreground": "#333333", - "focusColor": "#2AA298", - "focusedBorderColor": "#2AA298", - "shadowColor": "#d3e8f8", - "startBackground": "#d3e8f8", - "startBorderColor": "#d3e8f8" + "focusColor": "#269386", + "focusedBorderColor": "#269386", + "shadowColor": "#FAFAFA", + "startBackground": "#FAFAFA", + "startBorderColor": "#FAFAFA" }, - "disabledBorderColor": "#d9d9d9", - "disabledText": "#93A1A1", - "endBackground": "#d9d9d9", - "endBorderColor": "#d9d9d9", - "focus": "#CCCCCC", - "focusedBorderColor": "#2AA298", - "foreground": "#90A7B2", + "disabledBorderColor": "#FAFAFA", + "disabledText": "#dddddd", + "endBackground": "#FAFAFA", + "endBorderColor": "#FAFAFA", + "focus": "#E0E7EA", + "focusedBorderColor": "#269386", + "foreground": "#403F53", "highlight": "#403f53", - "mt.background": "#d9d9d9", - "mt.foreground": "#90A7B2", + "mt.background": "#FAFAFA", + "mt.foreground": "#403F53", "mt.selectedForeground": "#403f53", - "mt.selection.color1": "#d3e8f8", - "mt.selection.color2": "#d3e8f8", - "startBackground": "#d9d9d9", - "startBorderColor": "#d9d9d9", - "shadowColor": "#d9d9d9", + "mt.selection.color1": "#FAFAFA", + "mt.selection.color2": "#FAFAFA", + "startBackground": "#FAFAFA", + "startBorderColor": "#FAFAFA", + "shadowColor": "#FAFAFA", "shadowWidth": 0 }, "Canvas": { - "Tooltip.borderColor": "#d9d9d9", + "Tooltip.borderColor": "#efefef", "Tooltip.background": "#F0F0F0" }, - "Content.background": "#f0f0f0", + "Content": { + "background": "#FAFAFA", + "selectionBackground": "#999e9e" + }, "CheckBox": { - "background": "#F0F0F0", - "disabledText": "#93A1A1", - "foreground": "#403f53", - "select": "#2AA298" + "background": "#FAFAFA", + "disabledText": "#dddddd", + "foreground": "#546e7a", + "select": "#269386" }, "CheckBoxMenuItem": { - "acceleratorForeground": "#90A7B2", - "acceleratorSelectionForeground": "#90A7B2", - "background": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "acceleratorForeground": "#403F53", + "acceleratorSelectionForeground": "#403F53", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#333333" }, + "CodeWithMe": { + "Avatar.foreground": "#546e7a", + "AccessEnabled": { + "accessDot": "#269386", + "dropdownBorder": "#f2f5f7", + "pillBackground": "$second" + } + }, "ColorChooser": { - "background": "#F0F0F0", - "foreground": "#403f53", - "swatchesDefaultRecentColor": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a", + "swatchesDefaultRecentColor": "#546e7a" }, - "ComboBoxButton.background": "#d9d9d9", + "ComboBoxButton.background": "#FAFAFA", "ComboBox": { "ArrowButton": { - "background": "#d9d9d9", - "disabledIconColor": "#93A1A1", - "iconColor": "#403f53", - "nonEditableBackground": "#F0F0F0" + "background": "#FAFAFA", + "disabledIconColor": "#dddddd", + "iconColor": "#546e7a", + "nonEditableBackground": "#FAFAFA" }, - "background": "#F0F0F0", - "buttonBackground": "#d9d9d9", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "modifiedItemForeground": "#2AA298", - "nonEditableBackground": "#FBFBFB", + "background": "#FAFAFA", + "buttonBackground": "#FAFAFA", + "darcula.hoveredArrowButtonForeground": "#269386", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "modifiedItemForeground": "#269386", + "nonEditableBackground": "#f2f5f7", "padding": "5,5,5,5", - "selectionBackground": "#d3e8f8", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, - "ComboPopup.border": "#d9d9d9", + "ComboPopup.border": "#efefef", "CompletionPopup": { - "background": "#FBFBFB", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "matchForeground": "#2AA298", - "matchSelectionForeground": "#2AA298", + "background": "#f2f5f7", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "matchForeground": "#269386", + "matchSelectionForeground": "#269386", "nonFocusedState": "false", "selectedGrayedForeground": "#403f53", "selectionGrayForeground": "#403f53", - "selectionInactiveInfoForeground": "#90A7B2", - "selectionInactiveBackground": "#d3e8f850", - "selectionBackground": "#d3e8f880", + "selectionInactiveInfoForeground": "#403F53", + "selectionInactiveBackground": "#999e9e50", + "selectionBackground": "#999e9e80", "selectionForeground": "#403f53", "selectionInfoForeground": "#403f53" }, "Component": { "arc": 4, - "borderColor": "#CCCCCC", - "disabledBorderColor": "#d9d9d9", - "focusColor": "#2AA298", - "focusedBorderColor": "#2AA298", - "hoverIconColor": "#2AA298", - "infoForeground": "#90A7B2", - "iconColor": "#403f53" + "borderColor": "#E0E7EA", + "disabledBorderColor": "#FAFAFA", + "focusColor": "#269386", + "focusedBorderColor": "#269386", + "hoverIconColor": "#269386", + "infoForeground": "#403F53", + "iconColor": "#546e7a" }, - "control": "#F0F0F0", - "controlText": "#90A7B2", + "control": "#FAFAFA", + "controlText": "#403F53", "Counter": { - "background": "#2AA298", + "background": "#269386", "foreground": "#403f53" }, "Debugger": { "Variables": { - "collectingDataForeground": "#90A7B2", - "changedValueForeground": "#2AA298", + "collectingDataForeground": "#403F53", + "changedValueForeground": "#269386", "errorMessageForeground": "#994cc3", - "evaluatingExpressionForeground": "#90A7B2", + "evaluatingExpressionForeground": "#403F53", "exceptionForeground": "#4876d6", - "modifyingValueForeground": "#2AA298", - "valueForeground": "#2AA298" + "modifyingValueForeground": "#269386", + "valueForeground": "#269386" } }, "DebuggerTabs": { - "selectedBackground": "#CCCCCC", - "underlinedTabBackground": "#CCCCCC" + "selectedBackground": "#E0E7EA", + "underlinedTabBackground": "#E0E7EA" }, "DebuggerPopup": { - "borderColor": "#CCCCCC" + "borderColor": "#E0E7EA" }, "DefaultTabs": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "hoverBackground": "#d3e8f8", - "hoverColor": "#F0F0F0", - "hoverMaskColor": "#CCCCCC", - "inactiveColoredFileBackground": "#d9d9d9", - "inactiveUnderlineColor": "#93A1A1", - "inactiveMaskColor": "#F0F0F0", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#d3e8f8" + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "hoverBackground": "#FAFAFA", + "hoverColor": "#FAFAFA", + "hoverMaskColor": "#E0E7EA", + "inactiveColoredTabBackground": "#FAFAFA", + "inactiveColoredFileBackground": "#FAFAFA", + "inactiveUnderlineColor": "#269386", + "inactiveMaskColor": "#FAFAFA", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabForeground": "#403f53" }, - "Desktop.background": "#F0F0F0", - "DialogWrapper.southPanelBackground": "#F0F0F0", - "DialogWrapper.southPanelDivider": "#F0F0F0", + "Desktop.background": "#FAFAFA", + "DialogWrapper.southPanelBackground": "#FAFAFA", + "DialogWrapper.southPanelDivider": "#FAFAFA", "DragAndDrop": { - "areaBackground": "#F0F0F0", - "areaBorderColor": "#F0F0F0", - "areaForeground": "#403f53" + "areaBackground": "#FAFAFA", + "areaBorderColor": "#FAFAFA", + "areaForeground": "#546e7a" }, "Editor": { - "background": "#F0F0F0", - "foreground": "#403f53", - "shortcutForeground": "#90A7B2" + "background": "#FAFAFA", + "foreground": "#546e7a", + "shortcutForeground": "#403F53" }, "EditorPane": { - "background": "#F0F0F0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveBackground": "#F0F0F0", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveBackground": "#FAFAFA", + "inactiveForeground": "#dddddd", + "selectionBackground": "#999e9e", "selectionForeground": "#333333" }, "EditorTabs": { - "borderColor": "#FBFBFB", - "hoverColor": "#CCCCCC", - "hoverMaskColor": "#CCCCCC", - "inactiveMaskColor": "#F0F0F0", - "inactiveColoredFileBackground": "#F0F0F02", - "inactiveUnderlineColor": "#93A1A1", - "selectedForeground": "#403f53", - "selectedBackground": "#d3e8f8", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#d3e8f8" + "borderColor": "#f2f5f7", + "hoverBackground": "#E0E7EA", + "hoverColor": "#E0E7EA", + "hoverMaskColor": "#E0E7EA", + "inactiveMaskColor": "#FAFAFA", + "inactiveColoredFileBackground": "#FAFAFA", + "inactiveUnderlineColor": "#dddddd", + "selectedForeground": "#546e7a", + "selectedBackground": "#FAFAFA", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabForeground": "#403f53" }, "EditorGroupsTabs": { - "background": "#F0F0F0", - "borderColor": "#FBFBFB", - "hoverBackground": "#CCCCCC", - "hoverColor": "#CCCCCC", - "inactiveUnderlineColor": "#2AA298", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#d3e8f8", - "underlinedTabForeground": "#403f53" + "background": "#FAFAFA", + "borderColor": "#f2f5f7", + "hoverBackground": "#E0E7EA", + "hoverColor": "#E0E7EA", + "inactiveUnderlineColor": "#269386", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabForeground": "#546e7a" }, "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#E0E7EA", + "Yellow": "#82AAFF", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -236,151 +258,155 @@ "nativeSearchNotMatchedBackground": "#C792EA", "nativeFocusSearchNotMatchedBackground": "#BB80B3" }, - "Focus.color": "#d9d9d9", + "Focus.color": "#efefef", "FormattedTextField": { - "background": "#F0F0F0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveBackground": "#d9d9d9", - "inactiveForeground": "#93A1A1", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveBackground": "#FAFAFA", + "inactiveForeground": "#dddddd", "selectionForeground": "#333333", - "selectionBackground": "#d3e8f8" + "selectionBackground": "#FAFAFA" }, + "GotItTooltip.borderColor": "#F0F0F0", "Group": { - "disabledSeparatorColor": "#d9d9d9", - "separatorColor": "#d9d9d9" + "disabledSeparatorColor": "#efefef", + "separatorColor": "#efefef" }, "GutterTooltip": { - "infoForeground": "#403f53", - "lineSeparatorColor": "#F0F0F0" + "infoForeground": "#403F53", + "lineSeparatorColor": "#FAFAFA" }, "HeaderColor": { - "active": "#F0F0F0", - "inactive": "#f0f0f0" + "active": "#FAFAFA", + "inactive": "#FAFAFA" }, "HelpTooltip": { - "background": "#F0F0F0", - "borderColor": "#d9d9d9", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "shortcutForeground": "#90A7B2" + "background": "#FAFAFA", + "borderColor": "#efefef", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "shortcutForeground": "#403F53" }, - "Hyperlink.linkColor": "#2AA298", - "inactiveCaption": "#FBFBFB", - "inactiveCaptionBorder": "#F0F0F0", - "inactiveCaptionText": "#90A7B2", - "info": "#90A7B2", - "infoText": "#90A7B2", + "Hyperlink.linkColor": "#269386", + "inactiveCaption": "#f2f5f7", + "inactiveCaptionBorder": "#FAFAFA", + "inactiveCaptionText": "#403F53", + "info": "#403F53", + "infoText": "#403F53", "IdeStatusBar.border": "4,4,4,4", - "InformationHint.borderColor": "#d9d9d9", + "InformationHint.borderColor": "#efefef", "InplaceRefactoringPopup": { - "borderColor": "#F0F0F0" + "borderColor": "#FAFAFA" }, "InternalFrame": { - "activeTitleForeground": "#403f53", - "background": "#F0F0F0", - "inactiveTitleForeground": "#90A7B2" + "activeTitleForeground": "#546e7a", + "background": "#FAFAFA", + "inactiveTitleForeground": "#403F53" }, "Label": { - "background": "#F0F0F0", - "disabledForeground": "#93A1A1", - "disabledShadow": "#F0F0F0", - "disabledText": "#93A1A1", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "selectedForeground": "#333333" + "background": "#FAFAFA", + "disabledForeground": "#dddddd", + "disabledShadow": "#FAFAFA", + "disabledText": "#dddddd", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "selectedForeground": "#333333", + "selectedDisabledForeground": "#546e7a" }, "Link": { - "activeForeground": "#2AA298", - "hoverForeground": "#2AA298", - "pressedForeground": "#2AA298", - "secondaryForeground": "#90A7B2", - "visitedForeground": "#2AA298" + "activeForeground": "#269386", + "hoverForeground": "#269386", + "pressedForeground": "#269386", + "secondaryForeground": "#403F53", + "visitedForeground": "#269386" }, - "link.foreground": "#2AA298", + "link.foreground": "#269386", "List": { - "background": "#FBFBFB", - "foreground": "#403f53", - "selectionBackground": "#d3e8f850", + "background": "#f2f5f7", + "foreground": "#546e7a", + "hoverBackground": "#E0E7EA70", + "hoverInactiveBackground": "#FAFAFA", + "selectionBackground": "#999e9e50", "selectionForeground": "#403f53", "selectionInactiveForeground": "#333333", - "selectionInactiveBackground": "#d3e8f87c" + "selectionInactiveBackground": "#E0E7EA70" }, "material": { - "background": "#F0F0F0", - "branchColor": "#403f53", - "contrast": "#f0f0f0", - "foreground": "#403f53", - "mergeCommits": "#d9d9d9", - "primaryColor": "#90A7B2", + "background": "#FAFAFA", + "branchColor": "#546e7a", + "contrast": "#FAFAFA", + "foreground": "#546e7a", + "mergeCommits": "#FAFAFA", + "primaryColor": "#403F53", "selectionForeground": "#403f53", - "tab.backgroundColor": "#F0F0F0", - "tab.borderColor": "#2AA298", - "tagColor": "#90A7B2" + "tab.backgroundColor": "#FAFAFA", + "tab.borderColor": "#269386", + "tagColor": "#403F53" }, "MemoryIndicator": { - "allocatedBackground": "#FBFBFB", - "usedColor": "#CCCCCC", - "usedBackground": "#CCCCCC" + "allocatedBackground": "#f2f5f7", + "usedColor": "#E0E7EA", + "usedBackground": "#E0E7EA" }, "Menu": { - "acceleratorForeground": "#90A7B2", + "acceleratorForeground": "#403F53", "acceleratorSelectionForeground": "#403f53", - "background": "#F0F0F0", + "background": "#FAFAFA", "border": "4,2,4,2", - "borderColor": "#FBFBFB", - "disabledBackground": "#FBFBFB", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "borderColor": "#f2f5f7", + "disabledBackground": "#f2f5f7", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53", - "separatorColor": "#d9d9d9" + "separatorColor": "#efefef" }, "MenuBar": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "highlight": "#F0F0F0", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "highlight": "#FAFAFA", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53", - "shadow": "#F0F0F0" + "shadow": "#FAFAFA" }, "MenuItem": { - "acceleratorForeground": "#90A7B2", + "acceleratorForeground": "#403F53", "acceleratorSelectionForeground": "#403f53", "border": "4,2,4,2", - "background": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53" }, "NavBar": { - "arrowColor": "#403f53", - "borderColor": "#F0F0F0" + "arrowColor": "#546e7a", + "borderColor": "#FAFAFA" }, "NewClass": { "Panel": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "SearchField": { - "background": "#F0F0F0" + "background": "#FAFAFA" } }, - "NewPSD.warning": "#2AA298", + "NewPSD.warning": "#269386", "Notification": { "background": "#F0F0F0", "borderColor": "#F0F0F0", "errorBackground": "#F0F0F0", "errorBorderColor": "#F0F0F0", - "foreground": "#403f53", + "foreground": "#546e7a", "MoreButton": { - "background": "#d9d9d9", - "foreground": "#403f53", - "innerBorderColor": "#d9d9d9" + "background": "#FAFAFA", + "foreground": "#546e7a", + "innerBorderColor": "#FAFAFA" }, "ToolWindow": { "errorBackground": "#F0F0F0", @@ -391,246 +417,259 @@ "warningBorderColor": "#F0F0F0" } }, - "OnePixelDivider.background": "#d9d9d9", + "OnePixelDivider.background": "#efefef", "OptionPane": { - "background": "#F0F0F0", - "foreground": "#403f53", - "messageForeground": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a", + "messageForeground": "#546e7a" }, "Outline": { - "color": "#d9d9d9", - "focusedColor": "#2AA298", - "disabledColor": "#93A1A1" + "color": "#FAFAFA", + "focusedColor": "#269386", + "disabledColor": "#dddddd" }, "Panel": { - "background": "#F0F0F0", - "foreground": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a" }, "ParameterInfo": { - "background": "#FBFBFB", - "borderColor": "#d3e8f8", - "currentOverloadBackground": "#d3e8f8", - "currentParameterForeground": "#2AA298", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "lineSeparatorColor": "#d3e8f8" + "background": "#f2f5f7", + "borderColor": "#FAFAFA", + "currentOverloadBackground": "#E0E7EA", + "currentParameterForeground": "#269386", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "lineSeparatorColor": "#FAFAFA" }, "PasswordField": { - "background": "#F0F0F0", - "capsLockIconColor": "#2AA298", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "capsLockIconColor": "#269386", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "Plugins": { - "background": "#F0F0F0", - "disabledForeground": "#93A1A1", - "eapTagBackground": "#CCCCCC", - "lightSelectionBackground": "#d3e8f8", - "paidTagBackground": "#CCCCCC", - "selectionBackground": "#d3e8f8", - "tagForeground": "#2AA298", - "tagBackground": "#CCCCCC", - "trialTagBackground": "#CCCCCC", + "background": "#FAFAFA", + "disabledForeground": "#dddddd", + "eapTagBackground": "#E0E7EA", + "hoverBackground": "#E0E7EA70", + "lightSelectionBackground": "#FAFAFA", + "paidTagBackground": "#E0E7EA", + "selectionBackground": "#999e9e", + "tagForeground": "#269386", + "tagBackground": "#E0E7EA", + "trialTagBackground": "#E0E7EA", "Button": { - "installBackground": "#d9d9d9", - "installBorderColor": "#d9d9d9", - "installForeground": "#403f53", - "installFocusedBackground": "#CCCCCC", - "installFillForeground": "#93A1A1", - "installFillBackground": "#d9d9d9", - "updateBackground": "#d9d9d9", - "updateBorderColor": "#d9d9d9", - "updateForeground": "#403f53" + "installBackground": "#FAFAFA", + "installBorderColor": "#FAFAFA", + "installForeground": "#546e7a", + "installFocusedBackground": "#E0E7EA", + "installFillForeground": "#dddddd", + "installFillBackground": "#FAFAFA", + "updateBackground": "#269386", + "updateBorderColor": "#FAFAFA", + "updateForeground": "#546e7a" }, "SearchField": { - "background": "#F0F0F0", - "borderColor": "#d9d9d9" + "background": "#FAFAFA", + "borderColor": "#efefef" }, "SectionHeader": { - "background": "#FBFBFB", - "foreground": "#403f53" + "background": "#f2f5f7", + "foreground": "#546e7a" }, "Tab": { - "hoverBackground": "#d3e8f8", + "hoverBackground": "#FAFAFA", "selectedForeground": "#403f53", - "selectedBackground": "#d3e8f8" + "selectedBackground": "#FAFAFA" } }, "Popup": { "Advertiser": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "foreground": "#2AA298" + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "foreground": "#269386" }, - "borderColor": "#f0f0f0", - "inactiveBorderColor": "#F0F0F0", - "innerBorderColor": "#FBFBFB", + "borderColor": "#FAFAFA", + "inactiveBorderColor": "#FAFAFA", + "innerBorderColor": "#f2f5f7", "Header": { - "activeBackground": "#F0F0F0", - "inactiveBackground": "#f0f0f0" + "activeBackground": "#FAFAFA", + "inactiveBackground": "#FAFAFA" }, "paintBorder": true, - "separatorForeground": "#403f53", - "separatorColor": "#FBFBFB", + "separatorForeground": "#546e7a", + "separatorColor": "#f2f5f7", "Toolbar": { - "Floating.background": "#f0f0f0", - "background": "#f0f0f0", - "borderColor": "#f0f0f0" + "Floating.background": "#FAFAFA", + "background": "#FAFAFA", + "borderColor": "#FAFAFA" } }, "PopupMenu": { - "background": "#F0F0F0", + "background": "#FAFAFA", "border": "2,0,2,0", - "foreground": "#403f53", - "translucentBackground": "#F0F0F0" + "foreground": "#546e7a", + "translucentBackground": "#FAFAFA" }, "PopupMenuSeparator.height": 10, "PopupMenuSeparator.stripeIndent": 5, "ProgressBar": { - "background": "#F0F0F0", - "foreground": "#2AA298", - "indeterminateEndColor": "#2AA298", - "indeterminateStartColor": "#2AA298", - "progressColor": "#2AA298", - "selectionBackground": "#CCCCCC", - "trackColor": "#CCCCCC" + "background": "#FAFAFA", + "foreground": "#269386", + "indeterminateEndColor": "#269386", + "indeterminateStartColor": "#269386", + "progressColor": "#269386", + "selectionBackground": "#E0E7EA", + "trackColor": "#E0E7EA" }, "PsiViewer": { - "referenceHighlightColor": "#2AA298" + "referenceHighlightColor": "#269386" }, "RadioButton": { - "background": "#F0F0F0", - "disabledText": "#93A1A1", - "foreground": "#403f53" + "background": "#FAFAFA", + "disabledText": "#dddddd", + "foreground": "#546e7a" }, "RadioButtonMenuItem": { - "acceleratorForeground": "#90A7B2", - "acceleratorSelectionForeground": "#90A7B2", - "background": "#F0F0F0", - "disabledBackground": "#F0F0F0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "selectionBackground": "#d3e8f8", + "acceleratorForeground": "#403F53", + "acceleratorSelectionForeground": "#403F53", + "background": "#FAFAFA", + "disabledBackground": "#FAFAFA", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "selectionBackground": "#999e9e", "selectionForeground": "#403f53" }, + "ScreenView.borderColor": "#efefef", "ScrollBar": { - "background": "#F0F0F0", - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", + "background": "#FAFAFA", + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", "Mac": { - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030", + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30", "Transparent": { - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030" + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30" } }, - "thumb": "#CCCCCC", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030", + "thumb": "#E0E7EA", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30", "Transparent": { - "hoverThumbBorderColor": "#2AA298", - "hoverThumbColor": "#2AA298", - "hoverTrackColor": "#F0F0F030", - "thumbBorderColor": "#2AA29870", - "thumbColor": "#2AA29870", - "trackColor": "#F0F0F030" + "hoverThumbBorderColor": "#269386", + "hoverThumbColor": "#269386", + "hoverTrackColor": "#FAFAFA30", + "thumbBorderColor": "#26938670", + "thumbColor": "#26938670", + "trackColor": "#FAFAFA30" } }, "SearchEverywhere": { "Advertiser": { - "background": "#f0f0f0", - "foreground": "#90A7B2" + "background": "#FAFAFA", + "foreground": "#403F53" }, "Header": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "List": { - "separatorForeground": "#90A7B2", - "separatorColor": "#d9d9d9" + "separatorForeground": "#403F53", + "separatorColor": "#efefef" }, "SearchField": { - "background": "#F0F0F0", - "borderColor": "#f0f0f0", - "infoForeground": "#90A7B2" + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "infoForeground": "#403F53" }, "Tab": { "active.foreground": "#333333", "selectedForeground": "#333333", - "selectedBackground": "#CCCCCC" + "selectedBackground": "#E0E7EA" } }, "SearchMatch": { - "endBackground": "#2AA298", - "startBackground": "#2AA298" + "endBackground": "#269386", + "startBackground": "#269386", + "endColor": "#269386", + "startColor": "#269386" }, "SearchField.errorBackground": "#F0F0F0", + "SearchOption": { + "selectedBackground": "#FAFAFA" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#403F53", + "Repeated.File.Foreground": "#546e7a" + }, "Separator": { - "background": "#FBFBFB", - "foreground": "#FBFBFB", - "separatorColor": "#FBFBFB" + "background": "#f2f5f7", + "foreground": "#f2f5f7", + "separatorColor": "#f2f5f7" }, "SidePanel": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "Slider": { - "background": "#F0F0F0", - "buttonBorderColor": "#2AA298", - "buttonColor": "#2AA298", - "foreground": "#403f53", + "background": "#FAFAFA", + "buttonBorderColor": "#269386", + "buttonColor": "#269386", + "foreground": "#546e7a", "majorTickLength": 6, - "tickColor": "#FBFBFB", - "trackColor": "#d3e8f8", + "tickColor": "#f2f5f7", + "trackColor": "#FAFAFA", "trackWidth": 7, - "thumb": "#2AA298" + "thumb": "#269386" }, "SpeedSearch": { - "background": "#CCCCCC", - "borderColor": "#d9d9d9", - "foreground": "#403f53", - "errorForeground": "#403f53" + "background": "#E0E7EA", + "borderColor": "#efefef", + "foreground": "#546e7a", + "errorForeground": "#546e7a" }, "Spinner": { - "background": "#F0F0F0", + "background": "#FAFAFA", "border": "3,3,3,3", - "foreground": "#403f53", + "foreground": "#546e7a", "selectionForeground": "#333333" }, "SplitPane": { - "background": "#F0F0F0", - "highlight": "#F0F0F0" + "background": "#FAFAFA", + "highlight": "#FAFAFA" }, - "SplitPaneDivider.draggingColor": "#FBFBFB", + "SplitPaneDivider.draggingColor": "#f2f5f7", "StatusBar": { - "borderColor": "#F0F0F0" + "borderColor": "#FAFAFA", + "hoverBackground": "#E0E7EA", + "LightEditBackground": "#FAFAFA" }, "TabbedPane": { - "background": "#F0F0F0", - "contentAreaColor": "#CCCCCC", + "background": "#FAFAFA", + "contentAreaColor": "#E0E7EA", "contentBorderInsets": "3,1,1,1", - "darkShadow": "#d9d9d9", - "disabledForeground": "#93A1A1", - "disabledUnderlineColor": "#93A1A1", - "focus": "#d3e8f8", - "focusColor": "#d3e8f8", + "darkShadow": "#efefef", + "disabledForeground": "#dddddd", + "disabledUnderlineColor": "#dddddd", + "focus": "#FAFAFA", + "focusColor": "#FAFAFA", "fontSizeOffset": 0, - "foreground": "#403f53", - "highlight": "#d9d9d9", - "hoverColor": "#CCCCCC", + "foreground": "#546e7a", + "highlight": "#efefef", + "hoverColor": "#E0E7EA", "labelShift": 0, "selectedForeground": "#333333", "selectedLabelShift": 0, @@ -639,164 +678,211 @@ "tabHeight": 32, "tabInsets": "5,10,5,10", "tabSelectionHeight": 2, - "underlineColor": "#2AA298" + "underlineColor": "#269386" }, - "TabbedPane.mt.tab.background": "#F0F0F0", + "TabbedPane.mt.tab.background": "#FAFAFA", "Table": { - "background": "#F0F0F0", + "alternativeRowBackground": "#FAFAFA", + "background": "#FAFAFA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", - "dropLineColor": "#2AA298", - "dropLineShortColor": "#2AA298", - "focusCellBackground": "#d3e8f8", + "disabledForeground": "#dddddd", + "dropLineColor": "#269386", + "dropLineShortColor": "#269386", + "focusCellBackground": "#FAFAFA", "focusCellForeground": "#333333", - "foreground": "#403f53", - "gridColor": "#F0F0F0", - "highlightOuter": "#d3e8f8", + "foreground": "#546e7a", + "gridColor": "#FAFAFA", + "highlightOuter": "#FAFAFA", + "hoverBackground": "#E0E7EA70", + "hoverInactiveBackground": "#FAFAFA", "lightSelectionForeground": "#333333", - "lightSelectionInactiveForeground": "#90A7B2", - "lightSelectionInactiveBackground": "#FBFBFB", - "selectionBackground": "#d3e8f8", + "lightSelectionInactiveForeground": "#403F53", + "lightSelectionInactiveBackground": "#f2f5f7", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333", - "selectionInactiveBackground": "#d3e8f8", + "selectionInactiveBackground": "#FAFAFA", "selectionInactiveForeground": "#403f53", - "sortIconColor": "#403f53", - "stripeColor": "#f0f0f0" + "sortIconColor": "#546e7a", + "stripeColor": "#FAFAFA" }, "TableHeader": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "bottomSeparatorColor": "#FBFBFB", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "bottomSeparatorColor": "#f2f5f7", "cellBorder": "4,0,4,0", - "disabledForeground": "#93A1A1", - "foreground": "#403f53", - "focusCellBackground": "#d3e8f8", + "disabledForeground": "#dddddd", + "foreground": "#546e7a", + "focusCellBackground": "#FAFAFA", "focusCellForeground": "#333333", "height": 25, - "separatorColor": "#FBFBFB" + "separatorColor": "#f2f5f7" }, - "text": "#90A7B2", - "textInactiveText": "#90A7B2", - "textText": "#90A7B2", + "text": "#403F53", + "textInactiveText": "#403F53", + "textText": "#403F53", "TextArea": { - "background": "#F0F0F0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "TextField": { - "background": "#F0F0F0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "TextPane": { - "background": "#F0F0F0", - "caretForeground": "#2AA298", - "foreground": "#403f53", - "inactiveForeground": "#93A1A1", - "selectionBackground": "#d3e8f8", + "background": "#FAFAFA", + "caretForeground": "#269386", + "foreground": "#546e7a", + "inactiveForeground": "#dddddd", + "selectionBackground": "#FAFAFA", "selectionForeground": "#333333" }, "TitlePane": { - "background": "#f0f0f0", - "Button.hoverBackground": "#CCCCCC", - "inactiveBackground": "#F0F0F0", - "infoForeground": "#90A7B2", - "inactiveInfoForeground": "#90A7B2" + "background": "#FAFAFA", + "Button.hoverBackground": "#E0E7EA", + "inactiveBackground": "#FAFAFA", + "infoForeground": "#403F53", + "inactiveInfoForeground": "#403F53" }, - "TitledBorder.titleColor": "#403f53", + "TitledBorder.titleColor": "#546e7a", "ToggleButton": { - "borderColor": "#d9d9d9", - "buttonColor": "#403f53", - "disabledText": "#93A1A1", - "foreground": "#403f53", - "offForeground": "#F0F0F0", - "offBackground": "#F0F0F0", - "onBackground": "#2AA298", - "onForeground": "#2AA298" + "borderColor": "#FAFAFA", + "buttonColor": "#546e7a", + "disabledText": "#dddddd", + "foreground": "#546e7a", + "offForeground": "#FAFAFA", + "offBackground": "#FAFAFA", + "onBackground": "#269386", + "onForeground": "#269386" }, "ToolBar": { - "background": "#F0F0F0", - "borderHandleColor": "#90A7B2", - "floatingForeground": "#90A7B2", - "foreground": "#403f53" + "background": "#FAFAFA", + "borderHandleColor": "#403F53", + "floatingForeground": "#403F53", + "foreground": "#546e7a" }, "ToolTip": { - "Actions.background": "#F0F0F0", - "Actions.infoForeground": "#90A7B2", + "Actions.background": "#FAFAFA", + "Actions.infoForeground": "#403F53", "background": "#F0F0F0", - "borderColor": "#CCCCCC", - "foreground": "#403f53", - "infoForeground": "#90A7B2", - "separatorColor": "#d9d9d9", - "shortcutForeground": "#90A7B2" + "borderColor": "#efefef", + "foreground": "#546e7a", + "infoForeground": "#403F53", + "separatorColor": "#efefef", + "shortcutForeground": "#403F53" }, "ToolWindow": { "Button": { - "hoverBackground": "#d3e8f8", + "hoverBackground": "#FAFAFA", "selectedForeground": "#333333", - "selectedBackground": "#f0f0f0" + "selectedBackground": "#FAFAFA" }, "Header": { - "background": "#F0F0F0", - "borderColor": "#FBFBFB", - "inactiveBackground": "#F0F0F0" + "background": "#FAFAFA", + "borderColor": "#f2f5f7", + "inactiveBackground": "#FAFAFA" }, "HeaderCloseButton": { - "background": "#F0F0F0" + "background": "#FAFAFA" }, "HeaderTab": { - "hoverBackground": "#CCCCCC", - "hoverInactiveBackground": "#FBFBFB", - "inactiveUnderlineColor": "#2AA298", - "selectedBackground": "#f0f0f0", - "selectedInactiveBackground": "#f0f0f0", - "underlineColor": "#2AA298", - "underlinedTabBackground": "#CCCCCC", - "underlinedTabInactiveBackground": "#FBFBFB" + "borderColor": "#E0E7EA", + "hoverBackground": "#E0E7EA", + "hoverInactiveBackground": "#E0E7EA", + "inactiveUnderlineColor": "#269386", + "selectedBackground": "#FAFAFA", + "selectedInactiveBackground": "#FAFAFA", + "underlineColor": "#269386", + "underlinedTabBackground": "#FAFAFA", + "underlinedTabInactiveBackground": "#f2f5f7", + "underlinedTabForeground": "#403f53", + "underlinedTabInactiveForeground": "#546e7a" } }, "Tree": { - "background": "#F0F0F0", - "foreground": "#90A7B2", - "hash": "#d9d9d9", - "modifiedItemForeground": "#2AA298", + "background": "#FAFAFA", + "foreground": "#403F53", + "hash": "#efefef", + "hoverBackground": "#E0E7EA70", + "hoverInactiveBackground": "#FAFAFA", + "modifiedItemForeground": "#269386", "rowHeight": 28, - "selectionBackground": "#d3e8f87c", + "selectionBackground": "#E0E7EA70", "selectionForeground": "#403f53", "selectionInactiveForeground": "#403f53", - "selectionInactiveBackground": "#d3e8f87c", - "textBackground": "#F0F0F0" + "selectionInactiveBackground": "#E0E7EA70", + "textBackground": "#FAFAFA" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { - "Activity.borderColor": "#d9d9d9", - "ColorPicker.background": "#F0F0F0", - "ColorPicker.foreground": "#403f53", - "Component.borderColor": "#d9d9d9", - "Component.background": "#F0F0F0", - "Component.foreground": "#403f53", - "Connector.borderColor": "#d9d9d9", - "Connector.hoverBorderColor": "#CCCCCC", - "Canvas.background": "#f0f0f0", - "highStroke.foreground": "#403f53", - "Label.foreground": "#90A7B2", - "List.selectionBackground": "#d3e8f87c", - "Panel.borderColor": "#d9d9d9", - "Panel.background": "#F0F0F0", - "percent.foreground": "#403f53", - "Placeholder.background": "#F0F0F0", - "Placeholder.borderColor": "#d9d9d9", - "Placeholder.foreground": "#403f53", - "Placeholder.selectedForeground": "#403f53", - "Preview.background": "#F0F0F0", - "stroke.acceleratorForeground": "#90A7B2" + "UIDesigner": { + "Activity.borderColor": "#efefef", + "Canvas.background": "#FAFAFA", + "ColorPicker": { + "background": "#FAFAFA", + "foreground": "#546e7a" + }, + "Component": { + "borderColor": "#efefef", + "background": "#FAFAFA", + "foreground": "#546e7a", + "hoverBorderColor": "#E0E7EA" + }, + "Connector": { + "borderColor": "#efefef", + "hoverBorderColor": "#E0E7EA" + }, + "Canvas.background": "#FAFAFA", + "highStroke.foreground": "#546e7a", + "Label.foreground": "#403F53", + "List.selectionBackground": "#E0E7EA70", + "motion": { + "borderColor": "#efefef", + "Component.foreground": "#546e7a", + "ConstraintSetText.foreground": "#403F53", + "ConstraintSet.background": "#f2f5f7", + "CSPanel.SelectedFocusBackground": "#999e9e", + "CSPanel.SelectedBackground": "#E0E7EA70", + "cs_FocusText.infoForeground": "#403F53", + "CursorTextColor.foreground": "#546e7a", + "HoverColor.disabledBackground": "#dddddd", + "motionGraph.background": "#FAFAFA", + "Notification.background": "#F0F0F0", + "ourAvg.background": "#f2f5f7", + "ourCS.background": "#f2f5f7", + "ourCS_Border.borderColor": "#efefef", + "ourCS_TextColor.foreground": "#403F53", + "ourCS_SelectedFocusBackground.selectionForeground": "#403f53", + "ourCS_SelectedBackground.selectionInactiveBackground": "#FAFAFA", + "ourCS_SelectedBorder.pressedBorderColor": "#E0E7EA", + "ourML_BarColor.separatorColor": "#efefef", + "PrimaryPanel.background": "#FAFAFA", + "SecondaryPanel.background": "#FAFAFA", + "SecondaryPanel.header.foreground": "#403F53", + "SecondaryPanel.header.background": "#FAFAFA", + "timeLine.disabledBorderColor": "#efefef" + }, + "Panel": { + "borderColor": "#efefef", + "background": "#FAFAFA" + }, + "percent.foreground": "#546e7a", + "Placeholder": { + "background": "#FAFAFA", + "borderColor": "#efefef", + "foreground": "#546e7a", + "selectedForeground": "#403f53" + }, + "Preview.background": "#FAFAFA", + "stroke.acceleratorForeground": "#403F53" }, "ValidationTooltip": { "errorBackground": "#F0F0F0", @@ -806,101 +892,108 @@ }, "VersionControl": { "FileHistory.Commit": { - "selectedBranchBackground": "#F0F0F0" + "selectedBranchBackground": "#FAFAFA" }, "GitCommits": { - "graphColor": "#CCCCCC" + "graphColor": "#E0E7EA" }, "GitLog": { - "localBranchIconColor": "#2AA298", - "otherIconColor": "#90A7B2", - "remoteBranchIconColor": "#403f53", - "tagIconColor": "#90A7B2" + "localBranchIconColor": "#269386", + "otherIconColor": "#403F53", + "remoteBranchIconColor": "#546e7a", + "tagIconColor": "#403F53" }, "HgLog": { - "branchIconColor": "#2AA298", + "branchIconColor": "#269386", "bookmarkIconColor": "#333333", - "closedBranchIconColor": "#93A1A1", - "localTagIconColor": "#90A7B2", - "mqTagIconColor": "#90A7B2", - "tagIconColor": "#90A7B2", - "tipIconColor": "#90A7B2" + "closedBranchIconColor": "#dddddd", + "localTagIconColor": "#403F53", + "mqTagIconColor": "#403F53", + "tagIconColor": "#403F53", + "tipIconColor": "#403F53" }, "Log": { - "Commit.unmatchedForeground": "#90A7B2", - "Commit.currentBranchBackground": "#FBFBFB" + "Commit.unmatchedForeground": "#403F53", + "Commit.currentBranchBackground": "#f2f5f7", + "Commit.hoveredBackground": "#E0E7EA70" }, "RefLabel": { "foreground": "#333333", - "backgroundBase": "#CCCCCC" + "backgroundBase": "#E0E7EA" } }, "Viewport": { - "background": "#F0F0F0", - "foreground": "#403f53" + "background": "#FAFAFA", + "foreground": "#546e7a" }, "WelcomeScreen": { - "background": "#F0F0F0", - "borderColor": "#F0F0F0", - "captionBackground": "#f0f0f0", - "captionForeground": "#403f53", - "footerBackground": "#f0f0f0", - "footerForeground": "#403f53", - "headerBackground": "#F0F0F0", - "headerForeground": "#403f53", - "separatorColor": "#d9d9d9", + "AssociatedComponent.background": "#FAFAFA", + "background": "#FAFAFA", + "borderColor": "#FAFAFA", + "captionBackground": "#FAFAFA", + "captionForeground": "#546e7a", + "Details.background": "#FAFAFA", + "footerBackground": "#FAFAFA", + "footerForeground": "#546e7a", + "headerBackground": "#FAFAFA", + "headerForeground": "#546e7a", + "List.background": "#FAFAFA", + "separatorColor": "#efefef", + "SidePanel.background": "#f2f5f7", "Projects": { - "background": "#FBFBFB", - "selectionBackground": "#d3e8f8", - "selectionInactiveBackground": "#FBFBFB" + "actions.background": "#FAFAFA", + "actions.selectionBackground": "#E0E7EA", + "background": "#f2f5f7", + "selectionBackground": "#999e9e", + "selectionInactiveBackground": "#f2f5f7" } }, - "window": "#F0F0F0", - "windowBorder": "#d9d9d9", - "windowText": "#90A7B2", - "Window.border": "#d9d9d9" + "window": "#FAFAFA", + "windowBorder": "#efefef", + "windowText": "#403F53", + "Window.border": "#efefef" }, "icons": { "ColorPalette": { - "#43494A": "#f0f0f0", - "#6B6B6B": "#90A7B2", - "#A7A7A7": "#F0F0F0", - "#3D6185": "#2AA298", - "#466D94": "#2AA298", - "#3C3F41": "#F0F0F0", - "#545556": "#93A1A1", - "#606060": "#93A1A1", - "#9AA7B0": "#403f53", - "#675133": "#2AA298", + "#43494A": "#FAFAFA", + "#6B6B6B": "#403F53", + "#A7A7A7": "#FAFAFA", + "#3D6185": "#269386", + "#466D94": "#269386", + "#3C3F41": "#FAFAFA", + "#545556": "#dddddd", + "#606060": "#dddddd", + "#9AA7B0": "#546e7a", + "#675133": "#269386", "Actions.Blue": "#4876d6", "Actions.Green": "#c96765", - "Actions.Grey": "#90A7B2", + "Actions.Grey": "#403F53", "Actions.GreyInline": "#637777", - "Actions.GreyInline.Dark": "#403f53", + "Actions.GreyInline.Dark": "#546e7a", "Actions.Red": "#994cc3", "Actions.Yellow": "#4876d6", - "Checkbox.Background.Default": "#f0f0f0", - "Checkbox.Background.Default.Dark": "#f0f0f0", - "Checkbox.Background.Disabled": "#E0E7EA", - "Checkbox.Background.Disabled.Dark": "#E0E7EA", - "Checkbox.Border.Default": "#d9d9d9", - "Checkbox.Border.Default.Dark": "#d9d9d9", - "Checkbox.Border.Disabled": "#93A1A1", - "Checkbox.Border.Disabled.Dark": "#93A1A1", - "Checkbox.Focus.Thin.Default": "#2AA298", - "Checkbox.Focus.Thin.Default.Dark": "#2AA298", - "Checkbox.Focus.Wide": "#2AA298", - "Checkbox.Focus.Wide.Dark": "#2AA298", - "Checkbox.Foreground.Disabled": "#93A1A1", - "Checkbox.Foreground.Disabled.Dark": "#93A1A1", - "Checkbox.Background.Selected": "#2AA298", - "Checkbox.Background.Selected.Dark": "#F0F0F0", - "Checkbox.Border.Selected": "#2AA298", - "Checkbox.Border.Selected.Dark": "#2AA298", - "Checkbox.Foreground.Selected": "#2AA298", - "Checkbox.Foreground.Selected.Dark": "#2AA298", - "Checkbox.Focus.Thin.Selected": "#403f53", - "Checkbox.Focus.Thin.Selected.Dark": "#403f53", + "Checkbox.Background.Default": "#FAFAFA", + "Checkbox.Background.Default.Dark": "#FAFAFA", + "Checkbox.Background.Disabled": "#82AAFF", + "Checkbox.Background.Disabled.Dark": "#82AAFF", + "Checkbox.Border.Default": "#efefef", + "Checkbox.Border.Default.Dark": "#efefef", + "Checkbox.Border.Disabled": "#dddddd", + "Checkbox.Border.Disabled.Dark": "#dddddd", + "Checkbox.Focus.Thin.Default": "#269386", + "Checkbox.Focus.Thin.Default.Dark": "#269386", + "Checkbox.Focus.Wide": "#269386", + "Checkbox.Focus.Wide.Dark": "#269386", + "Checkbox.Foreground.Disabled": "#dddddd", + "Checkbox.Foreground.Disabled.Dark": "#dddddd", + "Checkbox.Background.Selected": "#269386", + "Checkbox.Background.Selected.Dark": "#FAFAFA", + "Checkbox.Border.Selected": "#269386", + "Checkbox.Border.Selected.Dark": "#269386", + "Checkbox.Foreground.Selected": "#269386", + "Checkbox.Foreground.Selected.Dark": "#269386", + "Checkbox.Focus.Thin.Selected": "#546e7a", + "Checkbox.Focus.Thin.Selected.Dark": "#546e7a", "Objects.Grey": "#637777", "Objects.Blue": "#4876d6", "Objects.RedStatus": "#994cc3", @@ -909,7 +1002,7 @@ "Objects.Yellow": "#4876d6", "Objects.Green": "#c96765", "Objects.Purple": "#994cc3", - "Objects.BlackText": "#403f53", + "Objects.BlackText": "#546e7a", "Objects.YellowDark": "#aa0982", "Objects.GreenAndroid": "#c96765" } diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker Contrast.theme.json index adbb78e5..435c41e3 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker Contrast.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Darker.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/darker.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#727272", @@ -17,7 +23,7 @@ "inactiveBackground": "#323232", "inactiveForeground": "#727272", "infoForeground": "#727272", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionBackgroundInactive": "#292929", "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#292929", @@ -33,7 +39,7 @@ "pressedBorderColor": "#FF980050" }, "Autocomplete": { - "selectionBackground": "#404040" + "selectionBackground": "#353535" }, "Borders.ContrastBorderColor": "#212121", "Borders.color": "#292929", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#292929", "Tooltip.background": "#1A1A1A" }, - "Content.background": "#1A1A1A", + "Content": { + "background": "#1A1A1A", + "selectionBackground": "#353535" + }, "CheckBox": { "background": "#212121", "disabledText": "#474747", @@ -86,9 +95,17 @@ "disabledBackground": "#212121", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#B0BEC5", + "AccessEnabled": { + "accessDot": "#FF9800", + "dropdownBorder": "#292929", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#212121", "foreground": "#B0BEC5", @@ -104,6 +121,7 @@ }, "background": "#1A1A1A", "buttonBackground": "#2A2A2A", + "darcula.hoveredArrowButtonForeground": "#FF9800", "disabledForeground": "#474747", "foreground": "#B0BEC5", "modifiedItemForeground": "#FF9800", @@ -123,8 +141,8 @@ "selectedGrayedForeground": "#FFFFFF", "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#727272", - "selectionInactiveBackground": "#40404050", - "selectionBackground": "#40404080", + "selectionInactiveBackground": "#35353550", + "selectionBackground": "#35353580", "selectionForeground": "#FFFFFF", "selectionInfoForeground": "#FFFFFF" }, @@ -168,11 +186,13 @@ "hoverBackground": "#323232", "hoverColor": "#1A1A1A", "hoverMaskColor": "#3F3F3F", + "inactiveColoredTabBackground": "#212121", "inactiveColoredFileBackground": "#2A2A2A", - "inactiveUnderlineColor": "#474747", + "inactiveUnderlineColor": "#FF9800", "inactiveMaskColor": "#1A1A1A", "underlineColor": "#FF9800", - "underlinedTabBackground": "#323232" + "underlinedTabBackground": "#323232", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#212121", "DialogWrapper.southPanelBackground": "#212121", @@ -193,20 +213,22 @@ "foreground": "#B0BEC5", "inactiveBackground": "#212121", "inactiveForeground": "#474747", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, "EditorTabs": { "borderColor": "#292929", + "hoverBackground": "#3F3F3F", "hoverColor": "#3F3F3F", "hoverMaskColor": "#3F3F3F", "inactiveMaskColor": "#212121", - "inactiveColoredFileBackground": "#2121212", + "inactiveColoredFileBackground": "#212121", "inactiveUnderlineColor": "#474747", "selectedForeground": "#B0BEC5", "selectedBackground": "#323232", "underlineColor": "#FF9800", - "underlinedTabBackground": "#323232" + "underlinedTabBackground": "#323232", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#212121", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#323232" }, + "GotItTooltip.borderColor": "#1A1A1A", "Group": { "disabledSeparatorColor": "#292929", "separatorColor": "#292929" }, "GutterTooltip": { - "infoForeground": "#B0BEC5", + "infoForeground": "#727272", "lineSeparatorColor": "#212121" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#474747", "foreground": "#B0BEC5", "infoForeground": "#727272", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#B0BEC5" }, "Link": { "activeForeground": "#FF9800", @@ -301,10 +325,12 @@ "List": { "background": "#292929", "foreground": "#B0BEC5", - "selectionBackground": "#40404050", + "hoverBackground": "#32323270", + "hoverInactiveBackground": "#323232", + "selectionBackground": "#35353550", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#323232c0" + "selectionInactiveBackground": "#32323270" }, "material": { "background": "#212121", @@ -332,7 +358,7 @@ "disabledBackground": "#292929", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF", "separatorColor": "#292929" }, @@ -343,7 +369,7 @@ "disabledForeground": "#474747", "foreground": "#B0BEC5", "highlight": "#212121", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF", "shadow": "#1A1A1A" }, @@ -355,7 +381,7 @@ "disabledBackground": "#212121", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, "NavBar": { @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#292929", "borderColor": "#323232", - "currentOverloadBackground": "#323232", + "currentOverloadBackground": "#3F3F3F", "currentParameterForeground": "#FF9800", "disabledForeground": "#474747", "foreground": "#B0BEC5", @@ -429,9 +455,10 @@ "background": "#212121", "disabledForeground": "#474747", "eapTagBackground": "#3F3F3F", - "lightSelectionBackground": "#404040", + "hoverBackground": "#32323270", + "lightSelectionBackground": "#323232", "paidTagBackground": "#3F3F3F", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "tagForeground": "#FF9800", "tagBackground": "#3F3F3F", "trialTagBackground": "#3F3F3F", @@ -442,7 +469,7 @@ "installFocusedBackground": "#3F3F3F", "installFillForeground": "#474747", "installFillBackground": "#2A2A2A", - "updateBackground": "#2A2A2A", + "updateBackground": "#FF9800", "updateBorderColor": "#2A2A2A", "updateForeground": "#B0BEC5" }, @@ -514,9 +541,10 @@ "disabledBackground": "#212121", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#292929", "ScrollBar": { "background": "#212121", "hoverThumbBorderColor": "#FF9800", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#FF9800", - "startBackground": "#FF9800" + "startBackground": "#FF9800", + "endColor": "#FF9800", + "startColor": "#FF9800" }, "SearchField.errorBackground": "#1A1A1A", + "SearchOption": { + "selectedBackground": "#323232" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#727272", + "Repeated.File.Foreground": "#B0BEC5" + }, "Separator": { "background": "#292929", "foreground": "#292929", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#292929", "StatusBar": { - "borderColor": "#212121" + "borderColor": "#212121", + "hoverBackground": "#3F3F3F", + "LightEditBackground": "#323232" }, "TabbedPane": { "background": "#212121", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#1A1A1A", "Table": { + "alternativeRowBackground": "#1A1A1A", "background": "#212121", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#474747", "dropLineColor": "#FF9800", "dropLineShortColor": "#FF9800", "focusCellBackground": "#323232", @@ -653,6 +694,8 @@ "foreground": "#B0BEC5", "gridColor": "#212121", "highlightOuter": "#323232", + "hoverBackground": "#32323270", + "hoverInactiveBackground": "#323232", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#727272", "lightSelectionInactiveBackground": "#292929", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#212121", "Actions.infoForeground": "#727272", - "background": "#212121", - "borderColor": "#3F3F3F", + "background": "#1A1A1A", + "borderColor": "#292929", "foreground": "#B0BEC5", "infoForeground": "#727272", "separatorColor": "#292929", @@ -751,50 +794,93 @@ "background": "#212121" }, "HeaderTab": { + "borderColor": "#3F3F3F", "hoverBackground": "#3F3F3F", - "hoverInactiveBackground": "#292929", + "hoverInactiveBackground": "#3F3F3F", "inactiveUnderlineColor": "#FF9800", "selectedBackground": "#1A1A1A", "selectedInactiveBackground": "#1A1A1A", "underlineColor": "#FF9800", - "underlinedTabBackground": "#3F3F3F", - "underlinedTabInactiveBackground": "#292929" + "underlinedTabBackground": "#323232", + "underlinedTabInactiveBackground": "#292929", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#B0BEC5" } }, "Tree": { "background": "#1A1A1A", "foreground": "#727272", "hash": "#292929", + "hoverBackground": "#32323270", + "hoverInactiveBackground": "#323232", "modifiedItemForeground": "#FF9800", "rowHeight": 28, - "selectionBackground": "#323232c0", + "selectionBackground": "#32323270", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#323232c0", + "selectionInactiveBackground": "#32323270", "textBackground": "#1A1A1A" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#292929", - "ColorPicker.background": "#212121", - "ColorPicker.foreground": "#B0BEC5", - "Component.borderColor": "#292929", - "Component.background": "#212121", - "Component.foreground": "#B0BEC5", - "Connector.borderColor": "#292929", - "Connector.hoverBorderColor": "#3F3F3F", + "Canvas.background": "#1A1A1A", + "ColorPicker": { + "background": "#212121", + "foreground": "#B0BEC5" + }, + "Component": { + "borderColor": "#292929", + "background": "#212121", + "foreground": "#B0BEC5", + "hoverBorderColor": "#3F3F3F" + }, + "Connector": { + "borderColor": "#292929", + "hoverBorderColor": "#3F3F3F" + }, "Canvas.background": "#1A1A1A", "highStroke.foreground": "#B0BEC5", "Label.foreground": "#727272", - "List.selectionBackground": "#323232c0", - "Panel.borderColor": "#292929", - "Panel.background": "#212121", + "List.selectionBackground": "#32323270", + "motion": { + "borderColor": "#292929", + "Component.foreground": "#B0BEC5", + "ConstraintSetText.foreground": "#727272", + "ConstraintSet.background": "#292929", + "CSPanel.SelectedFocusBackground": "#353535", + "CSPanel.SelectedBackground": "#32323270", + "cs_FocusText.infoForeground": "#727272", + "CursorTextColor.foreground": "#B0BEC5", + "HoverColor.disabledBackground": "#474747", + "motionGraph.background": "#212121", + "Notification.background": "#1A1A1A", + "ourAvg.background": "#292929", + "ourCS.background": "#292929", + "ourCS_Border.borderColor": "#292929", + "ourCS_TextColor.foreground": "#727272", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#323232", + "ourCS_SelectedBorder.pressedBorderColor": "#3F3F3F", + "ourML_BarColor.separatorColor": "#292929", + "PrimaryPanel.background": "#1A1A1A", + "SecondaryPanel.background": "#212121", + "SecondaryPanel.header.foreground": "#727272", + "SecondaryPanel.header.background": "#1A1A1A", + "timeLine.disabledBorderColor": "#292929" + }, + "Panel": { + "borderColor": "#292929", + "background": "#212121" + }, "percent.foreground": "#B0BEC5", - "Placeholder.background": "#212121", - "Placeholder.borderColor": "#292929", - "Placeholder.foreground": "#B0BEC5", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#212121", + "borderColor": "#292929", + "foreground": "#B0BEC5", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#212121", "stroke.acceleratorForeground": "#727272" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#727272", - "Commit.currentBranchBackground": "#292929" + "Commit.currentBranchBackground": "#292929", + "Commit.hoveredBackground": "#32323270" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,18 +927,24 @@ "foreground": "#B0BEC5" }, "WelcomeScreen": { + "AssociatedComponent.background": "#212121", "background": "#212121", "borderColor": "#212121", "captionBackground": "#1A1A1A", "captionForeground": "#B0BEC5", + "Details.background": "#212121", "footerBackground": "#1A1A1A", "footerForeground": "#B0BEC5", "headerBackground": "#212121", "headerForeground": "#B0BEC5", + "List.background": "#1A1A1A", "separatorColor": "#292929", + "SidePanel.background": "#292929", "Projects": { + "actions.background": "#1A1A1A", + "actions.selectionBackground": "#3F3F3F", "background": "#292929", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionInactiveBackground": "#292929" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker.theme.json index 4cb6f3a1..ee3950e2 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Darker.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Darker.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/darker.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#727272", @@ -17,7 +23,7 @@ "inactiveBackground": "#323232", "inactiveForeground": "#727272", "infoForeground": "#727272", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionBackgroundInactive": "#292929", "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#292929", @@ -33,7 +39,7 @@ "pressedBorderColor": "#FF980050" }, "Autocomplete": { - "selectionBackground": "#404040" + "selectionBackground": "#353535" }, "Borders.ContrastBorderColor": "#212121", "Borders.color": "#292929", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#292929", "Tooltip.background": "#1A1A1A" }, - "Content.background": "#1A1A1A", + "Content": { + "background": "#1A1A1A", + "selectionBackground": "#353535" + }, "CheckBox": { "background": "#212121", "disabledText": "#474747", @@ -86,9 +95,17 @@ "disabledBackground": "#212121", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#B0BEC5", + "AccessEnabled": { + "accessDot": "#FF9800", + "dropdownBorder": "#292929", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#212121", "foreground": "#B0BEC5", @@ -104,6 +121,7 @@ }, "background": "#212121", "buttonBackground": "#2A2A2A", + "darcula.hoveredArrowButtonForeground": "#FF9800", "disabledForeground": "#474747", "foreground": "#B0BEC5", "modifiedItemForeground": "#FF9800", @@ -123,8 +141,8 @@ "selectedGrayedForeground": "#FFFFFF", "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#727272", - "selectionInactiveBackground": "#40404050", - "selectionBackground": "#40404080", + "selectionInactiveBackground": "#35353550", + "selectionBackground": "#35353580", "selectionForeground": "#FFFFFF", "selectionInfoForeground": "#FFFFFF" }, @@ -168,11 +186,13 @@ "hoverBackground": "#323232", "hoverColor": "#212121", "hoverMaskColor": "#3F3F3F", + "inactiveColoredTabBackground": "#212121", "inactiveColoredFileBackground": "#2A2A2A", - "inactiveUnderlineColor": "#474747", + "inactiveUnderlineColor": "#FF9800", "inactiveMaskColor": "#212121", "underlineColor": "#FF9800", - "underlinedTabBackground": "#323232" + "underlinedTabBackground": "#323232", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#212121", "DialogWrapper.southPanelBackground": "#212121", @@ -193,20 +213,22 @@ "foreground": "#B0BEC5", "inactiveBackground": "#212121", "inactiveForeground": "#474747", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, "EditorTabs": { "borderColor": "#292929", + "hoverBackground": "#3F3F3F", "hoverColor": "#3F3F3F", "hoverMaskColor": "#3F3F3F", "inactiveMaskColor": "#212121", - "inactiveColoredFileBackground": "#2121212", + "inactiveColoredFileBackground": "#212121", "inactiveUnderlineColor": "#474747", "selectedForeground": "#B0BEC5", "selectedBackground": "#323232", "underlineColor": "#FF9800", - "underlinedTabBackground": "#323232" + "underlinedTabBackground": "#323232", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#212121", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#323232" }, + "GotItTooltip.borderColor": "#1A1A1A", "Group": { "disabledSeparatorColor": "#292929", "separatorColor": "#292929" }, "GutterTooltip": { - "infoForeground": "#B0BEC5", + "infoForeground": "#727272", "lineSeparatorColor": "#212121" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#474747", "foreground": "#B0BEC5", "infoForeground": "#727272", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#B0BEC5" }, "Link": { "activeForeground": "#FF9800", @@ -301,10 +325,12 @@ "List": { "background": "#292929", "foreground": "#B0BEC5", - "selectionBackground": "#40404050", + "hoverBackground": "#32323270", + "hoverInactiveBackground": "#323232", + "selectionBackground": "#35353550", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#323232c0" + "selectionInactiveBackground": "#32323270" }, "material": { "background": "#212121", @@ -332,7 +358,7 @@ "disabledBackground": "#292929", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF", "separatorColor": "#292929" }, @@ -343,7 +369,7 @@ "disabledForeground": "#474747", "foreground": "#B0BEC5", "highlight": "#212121", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF", "shadow": "#212121" }, @@ -355,7 +381,7 @@ "disabledBackground": "#212121", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, "NavBar": { @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#292929", "borderColor": "#323232", - "currentOverloadBackground": "#323232", + "currentOverloadBackground": "#3F3F3F", "currentParameterForeground": "#FF9800", "disabledForeground": "#474747", "foreground": "#B0BEC5", @@ -429,9 +455,10 @@ "background": "#212121", "disabledForeground": "#474747", "eapTagBackground": "#3F3F3F", - "lightSelectionBackground": "#404040", + "hoverBackground": "#32323270", + "lightSelectionBackground": "#323232", "paidTagBackground": "#3F3F3F", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "tagForeground": "#FF9800", "tagBackground": "#3F3F3F", "trialTagBackground": "#3F3F3F", @@ -442,7 +469,7 @@ "installFocusedBackground": "#3F3F3F", "installFillForeground": "#474747", "installFillBackground": "#2A2A2A", - "updateBackground": "#2A2A2A", + "updateBackground": "#FF9800", "updateBorderColor": "#2A2A2A", "updateForeground": "#B0BEC5" }, @@ -514,9 +541,10 @@ "disabledBackground": "#212121", "disabledForeground": "#474747", "foreground": "#B0BEC5", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#292929", "ScrollBar": { "background": "#212121", "hoverThumbBorderColor": "#FF9800", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#FF9800", - "startBackground": "#FF9800" + "startBackground": "#FF9800", + "endColor": "#FF9800", + "startColor": "#FF9800" }, "SearchField.errorBackground": "#1A1A1A", + "SearchOption": { + "selectedBackground": "#323232" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#727272", + "Repeated.File.Foreground": "#B0BEC5" + }, "Separator": { "background": "#292929", "foreground": "#292929", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#292929", "StatusBar": { - "borderColor": "#212121" + "borderColor": "#212121", + "hoverBackground": "#3F3F3F", + "LightEditBackground": "#323232" }, "TabbedPane": { "background": "#212121", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#212121", "Table": { + "alternativeRowBackground": "#1A1A1A", "background": "#212121", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#474747", "dropLineColor": "#FF9800", "dropLineShortColor": "#FF9800", "focusCellBackground": "#323232", @@ -653,6 +694,8 @@ "foreground": "#B0BEC5", "gridColor": "#212121", "highlightOuter": "#323232", + "hoverBackground": "#32323270", + "hoverInactiveBackground": "#323232", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#727272", "lightSelectionInactiveBackground": "#292929", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#212121", "Actions.infoForeground": "#727272", - "background": "#212121", - "borderColor": "#3F3F3F", + "background": "#1A1A1A", + "borderColor": "#292929", "foreground": "#B0BEC5", "infoForeground": "#727272", "separatorColor": "#292929", @@ -751,50 +794,93 @@ "background": "#212121" }, "HeaderTab": { + "borderColor": "#3F3F3F", "hoverBackground": "#3F3F3F", - "hoverInactiveBackground": "#292929", + "hoverInactiveBackground": "#3F3F3F", "inactiveUnderlineColor": "#FF9800", "selectedBackground": "#1A1A1A", "selectedInactiveBackground": "#1A1A1A", "underlineColor": "#FF9800", - "underlinedTabBackground": "#3F3F3F", - "underlinedTabInactiveBackground": "#292929" + "underlinedTabBackground": "#323232", + "underlinedTabInactiveBackground": "#292929", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#B0BEC5" } }, "Tree": { "background": "#212121", "foreground": "#727272", "hash": "#292929", + "hoverBackground": "#32323270", + "hoverInactiveBackground": "#323232", "modifiedItemForeground": "#FF9800", "rowHeight": 28, - "selectionBackground": "#323232c0", + "selectionBackground": "#32323270", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#323232c0", + "selectionInactiveBackground": "#32323270", "textBackground": "#212121" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#292929", - "ColorPicker.background": "#212121", - "ColorPicker.foreground": "#B0BEC5", - "Component.borderColor": "#292929", - "Component.background": "#212121", - "Component.foreground": "#B0BEC5", - "Connector.borderColor": "#292929", - "Connector.hoverBorderColor": "#3F3F3F", + "Canvas.background": "#1A1A1A", + "ColorPicker": { + "background": "#212121", + "foreground": "#B0BEC5" + }, + "Component": { + "borderColor": "#292929", + "background": "#212121", + "foreground": "#B0BEC5", + "hoverBorderColor": "#3F3F3F" + }, + "Connector": { + "borderColor": "#292929", + "hoverBorderColor": "#3F3F3F" + }, "Canvas.background": "#1A1A1A", "highStroke.foreground": "#B0BEC5", "Label.foreground": "#727272", - "List.selectionBackground": "#323232c0", - "Panel.borderColor": "#292929", - "Panel.background": "#212121", + "List.selectionBackground": "#32323270", + "motion": { + "borderColor": "#292929", + "Component.foreground": "#B0BEC5", + "ConstraintSetText.foreground": "#727272", + "ConstraintSet.background": "#292929", + "CSPanel.SelectedFocusBackground": "#353535", + "CSPanel.SelectedBackground": "#32323270", + "cs_FocusText.infoForeground": "#727272", + "CursorTextColor.foreground": "#B0BEC5", + "HoverColor.disabledBackground": "#474747", + "motionGraph.background": "#212121", + "Notification.background": "#1A1A1A", + "ourAvg.background": "#292929", + "ourCS.background": "#292929", + "ourCS_Border.borderColor": "#292929", + "ourCS_TextColor.foreground": "#727272", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#323232", + "ourCS_SelectedBorder.pressedBorderColor": "#3F3F3F", + "ourML_BarColor.separatorColor": "#292929", + "PrimaryPanel.background": "#1A1A1A", + "SecondaryPanel.background": "#212121", + "SecondaryPanel.header.foreground": "#727272", + "SecondaryPanel.header.background": "#1A1A1A", + "timeLine.disabledBorderColor": "#292929" + }, + "Panel": { + "borderColor": "#292929", + "background": "#212121" + }, "percent.foreground": "#B0BEC5", - "Placeholder.background": "#212121", - "Placeholder.borderColor": "#292929", - "Placeholder.foreground": "#B0BEC5", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#212121", + "borderColor": "#292929", + "foreground": "#B0BEC5", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#212121", "stroke.acceleratorForeground": "#727272" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#727272", - "Commit.currentBranchBackground": "#292929" + "Commit.currentBranchBackground": "#292929", + "Commit.hoveredBackground": "#32323270" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,18 +927,24 @@ "foreground": "#B0BEC5" }, "WelcomeScreen": { + "AssociatedComponent.background": "#212121", "background": "#212121", "borderColor": "#212121", "captionBackground": "#1A1A1A", "captionForeground": "#B0BEC5", + "Details.background": "#212121", "footerBackground": "#1A1A1A", "footerForeground": "#B0BEC5", "headerBackground": "#212121", "headerForeground": "#B0BEC5", + "List.background": "#1A1A1A", "separatorColor": "#292929", + "SidePanel.background": "#292929", "Projects": { + "actions.background": "#1A1A1A", + "actions.selectionBackground": "#3F3F3F", "background": "#292929", - "selectionBackground": "#404040", + "selectionBackground": "#353535", "selectionInactiveBackground": "#292929" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean Contrast.theme.json index c4df47a4..54aa149f 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean Contrast.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Deep Ocean.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/deepocean.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#4B526D", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#0F111A", "Tooltip.background": "#090B10" }, - "Content.background": "#090B10", + "Content": { + "background": "#090B10", + "selectionBackground": "#232632" + }, "CheckBox": { "background": "#0F111A", "disabledText": "#464B5D", @@ -89,6 +98,14 @@ "selectionBackground": "#232632", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#8F93A2", + "AccessEnabled": { + "accessDot": "#84ffff", + "dropdownBorder": "#181A1F", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#0F111A", "foreground": "#8F93A2", @@ -104,6 +121,7 @@ }, "background": "#090B10", "buttonBackground": "#191A21", + "darcula.hoveredArrowButtonForeground": "#84ffff", "disabledForeground": "#464B5D", "foreground": "#8F93A2", "modifiedItemForeground": "#84ffff", @@ -168,11 +186,13 @@ "hoverBackground": "#1A1C25", "hoverColor": "#090B10", "hoverMaskColor": "#1F2233", + "inactiveColoredTabBackground": "#0F111A", "inactiveColoredFileBackground": "#191A21", - "inactiveUnderlineColor": "#464B5D", + "inactiveUnderlineColor": "#84ffff", "inactiveMaskColor": "#090B10", "underlineColor": "#84ffff", - "underlinedTabBackground": "#1A1C25" + "underlinedTabBackground": "#1A1C25", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#0F111A", "DialogWrapper.southPanelBackground": "#0F111A", @@ -198,15 +218,17 @@ }, "EditorTabs": { "borderColor": "#181A1F", + "hoverBackground": "#1F2233", "hoverColor": "#1F2233", "hoverMaskColor": "#1F2233", "inactiveMaskColor": "#0F111A", - "inactiveColoredFileBackground": "#0F111A2", + "inactiveColoredFileBackground": "#0F111A", "inactiveUnderlineColor": "#464B5D", "selectedForeground": "#8F93A2", "selectedBackground": "#1A1C25", "underlineColor": "#84ffff", - "underlinedTabBackground": "#1A1C25" + "underlinedTabBackground": "#1A1C25", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#0F111A", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#1A1C25" }, + "GotItTooltip.borderColor": "#090B10", "Group": { "disabledSeparatorColor": "#0F111A", "separatorColor": "#0F111A" }, "GutterTooltip": { - "infoForeground": "#8F93A2", + "infoForeground": "#4B526D", "lineSeparatorColor": "#0F111A" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#464B5D", "foreground": "#8F93A2", "infoForeground": "#4B526D", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#8F93A2" }, "Link": { "activeForeground": "#84ffff", @@ -301,10 +325,12 @@ "List": { "background": "#181A1F", "foreground": "#8F93A2", + "hoverBackground": "#717CB416", + "hoverInactiveBackground": "#1A1C25", "selectionBackground": "#23263250", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#717CB430" + "selectionInactiveBackground": "#717CB416" }, "material": { "background": "#0F111A", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#181A1F", "borderColor": "#1A1C25", - "currentOverloadBackground": "#1A1C25", + "currentOverloadBackground": "#1F2233", "currentParameterForeground": "#84ffff", "disabledForeground": "#464B5D", "foreground": "#8F93A2", @@ -429,7 +455,8 @@ "background": "#0F111A", "disabledForeground": "#464B5D", "eapTagBackground": "#1F2233", - "lightSelectionBackground": "#232632", + "hoverBackground": "#717CB416", + "lightSelectionBackground": "#1A1C25", "paidTagBackground": "#1F2233", "selectionBackground": "#232632", "tagForeground": "#84ffff", @@ -442,7 +469,7 @@ "installFocusedBackground": "#1F2233", "installFillForeground": "#464B5D", "installFillBackground": "#191A21", - "updateBackground": "#191A21", + "updateBackground": "#84ffff", "updateBorderColor": "#191A21", "updateForeground": "#8F93A2" }, @@ -517,6 +544,7 @@ "selectionBackground": "#232632", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#0F111A", "ScrollBar": { "background": "#0F111A", "hoverThumbBorderColor": "#84ffff", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#84ffff", - "startBackground": "#84ffff" + "startBackground": "#84ffff", + "endColor": "#84ffff", + "startColor": "#84ffff" }, "SearchField.errorBackground": "#090B10", + "SearchOption": { + "selectedBackground": "#1A1C25" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#4B526D", + "Repeated.File.Foreground": "#8F93A2" + }, "Separator": { "background": "#181A1F", "foreground": "#181A1F", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#181A1F", "StatusBar": { - "borderColor": "#0F111A" + "borderColor": "#0F111A", + "hoverBackground": "#1F2233", + "LightEditBackground": "#1A1C25" }, "TabbedPane": { "background": "#0F111A", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#090B10", "Table": { + "alternativeRowBackground": "#090B10", "background": "#0F111A", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#464B5D", "dropLineColor": "#84ffff", "dropLineShortColor": "#84ffff", "focusCellBackground": "#1A1C25", @@ -653,6 +694,8 @@ "foreground": "#8F93A2", "gridColor": "#0F111A", "highlightOuter": "#1A1C25", + "hoverBackground": "#717CB416", + "hoverInactiveBackground": "#1A1C25", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#4B526D", "lightSelectionInactiveBackground": "#181A1F", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#0F111A", "Actions.infoForeground": "#4B526D", - "background": "#0F111A", - "borderColor": "#1F2233", + "background": "#090B10", + "borderColor": "#0F111A", "foreground": "#8F93A2", "infoForeground": "#4B526D", "separatorColor": "#0F111A", @@ -751,50 +794,93 @@ "background": "#0F111A" }, "HeaderTab": { + "borderColor": "#1F2233", "hoverBackground": "#1F2233", - "hoverInactiveBackground": "#181A1F", + "hoverInactiveBackground": "#1F2233", "inactiveUnderlineColor": "#84ffff", "selectedBackground": "#090B10", "selectedInactiveBackground": "#090B10", "underlineColor": "#84ffff", - "underlinedTabBackground": "#1F2233", - "underlinedTabInactiveBackground": "#181A1F" + "underlinedTabBackground": "#1A1C25", + "underlinedTabInactiveBackground": "#181A1F", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#8F93A2" } }, "Tree": { "background": "#090B10", "foreground": "#4B526D", "hash": "#0F111A", + "hoverBackground": "#717CB416", + "hoverInactiveBackground": "#1A1C25", "modifiedItemForeground": "#84ffff", "rowHeight": 28, - "selectionBackground": "#717CB430", + "selectionBackground": "#717CB416", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#717CB430", + "selectionInactiveBackground": "#717CB416", "textBackground": "#090B10" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#0F111A", - "ColorPicker.background": "#0F111A", - "ColorPicker.foreground": "#8F93A2", - "Component.borderColor": "#0F111A", - "Component.background": "#0F111A", - "Component.foreground": "#8F93A2", - "Connector.borderColor": "#0F111A", - "Connector.hoverBorderColor": "#1F2233", + "Canvas.background": "#090B10", + "ColorPicker": { + "background": "#0F111A", + "foreground": "#8F93A2" + }, + "Component": { + "borderColor": "#0F111A", + "background": "#0F111A", + "foreground": "#8F93A2", + "hoverBorderColor": "#1F2233" + }, + "Connector": { + "borderColor": "#0F111A", + "hoverBorderColor": "#1F2233" + }, "Canvas.background": "#090B10", "highStroke.foreground": "#8F93A2", "Label.foreground": "#4B526D", - "List.selectionBackground": "#717CB430", - "Panel.borderColor": "#0F111A", - "Panel.background": "#0F111A", + "List.selectionBackground": "#717CB416", + "motion": { + "borderColor": "#0F111A", + "Component.foreground": "#8F93A2", + "ConstraintSetText.foreground": "#4B526D", + "ConstraintSet.background": "#181A1F", + "CSPanel.SelectedFocusBackground": "#232632", + "CSPanel.SelectedBackground": "#717CB416", + "cs_FocusText.infoForeground": "#4B526D", + "CursorTextColor.foreground": "#8F93A2", + "HoverColor.disabledBackground": "#464B5D", + "motionGraph.background": "#0F111A", + "Notification.background": "#090B10", + "ourAvg.background": "#181A1F", + "ourCS.background": "#181A1F", + "ourCS_Border.borderColor": "#0F111A", + "ourCS_TextColor.foreground": "#4B526D", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#1A1C25", + "ourCS_SelectedBorder.pressedBorderColor": "#1F2233", + "ourML_BarColor.separatorColor": "#0F111A", + "PrimaryPanel.background": "#090B10", + "SecondaryPanel.background": "#0F111A", + "SecondaryPanel.header.foreground": "#4B526D", + "SecondaryPanel.header.background": "#090B10", + "timeLine.disabledBorderColor": "#0F111A" + }, + "Panel": { + "borderColor": "#0F111A", + "background": "#0F111A" + }, "percent.foreground": "#8F93A2", - "Placeholder.background": "#0F111A", - "Placeholder.borderColor": "#0F111A", - "Placeholder.foreground": "#8F93A2", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#0F111A", + "borderColor": "#0F111A", + "foreground": "#8F93A2", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#0F111A", "stroke.acceleratorForeground": "#4B526D" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#4B526D", - "Commit.currentBranchBackground": "#181A1F" + "Commit.currentBranchBackground": "#181A1F", + "Commit.hoveredBackground": "#717CB416" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,16 +927,22 @@ "foreground": "#8F93A2" }, "WelcomeScreen": { + "AssociatedComponent.background": "#0F111A", "background": "#0F111A", "borderColor": "#0F111A", "captionBackground": "#090B10", "captionForeground": "#8F93A2", + "Details.background": "#0F111A", "footerBackground": "#090B10", "footerForeground": "#8F93A2", "headerBackground": "#0F111A", "headerForeground": "#8F93A2", + "List.background": "#090B10", "separatorColor": "#0F111A", + "SidePanel.background": "#181A1F", "Projects": { + "actions.background": "#090B10", + "actions.selectionBackground": "#1F2233", "background": "#181A1F", "selectionBackground": "#232632", "selectionInactiveBackground": "#181A1F" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean.theme.json index 4d5b6173..83103f96 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Deep Ocean.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Deep Ocean.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/deepocean.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#4B526D", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#0F111A", "Tooltip.background": "#090B10" }, - "Content.background": "#090B10", + "Content": { + "background": "#090B10", + "selectionBackground": "#232632" + }, "CheckBox": { "background": "#0F111A", "disabledText": "#464B5D", @@ -89,6 +98,14 @@ "selectionBackground": "#232632", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#8F93A2", + "AccessEnabled": { + "accessDot": "#84ffff", + "dropdownBorder": "#181A1F", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#0F111A", "foreground": "#8F93A2", @@ -104,6 +121,7 @@ }, "background": "#0F111A", "buttonBackground": "#191A21", + "darcula.hoveredArrowButtonForeground": "#84ffff", "disabledForeground": "#464B5D", "foreground": "#8F93A2", "modifiedItemForeground": "#84ffff", @@ -168,11 +186,13 @@ "hoverBackground": "#1A1C25", "hoverColor": "#0F111A", "hoverMaskColor": "#1F2233", + "inactiveColoredTabBackground": "#0F111A", "inactiveColoredFileBackground": "#191A21", - "inactiveUnderlineColor": "#464B5D", + "inactiveUnderlineColor": "#84ffff", "inactiveMaskColor": "#0F111A", "underlineColor": "#84ffff", - "underlinedTabBackground": "#1A1C25" + "underlinedTabBackground": "#1A1C25", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#0F111A", "DialogWrapper.southPanelBackground": "#0F111A", @@ -198,15 +218,17 @@ }, "EditorTabs": { "borderColor": "#181A1F", + "hoverBackground": "#1F2233", "hoverColor": "#1F2233", "hoverMaskColor": "#1F2233", "inactiveMaskColor": "#0F111A", - "inactiveColoredFileBackground": "#0F111A2", + "inactiveColoredFileBackground": "#0F111A", "inactiveUnderlineColor": "#464B5D", "selectedForeground": "#8F93A2", "selectedBackground": "#1A1C25", "underlineColor": "#84ffff", - "underlinedTabBackground": "#1A1C25" + "underlinedTabBackground": "#1A1C25", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#0F111A", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#1A1C25" }, + "GotItTooltip.borderColor": "#090B10", "Group": { "disabledSeparatorColor": "#0F111A", "separatorColor": "#0F111A" }, "GutterTooltip": { - "infoForeground": "#8F93A2", + "infoForeground": "#4B526D", "lineSeparatorColor": "#0F111A" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#464B5D", "foreground": "#8F93A2", "infoForeground": "#4B526D", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#8F93A2" }, "Link": { "activeForeground": "#84ffff", @@ -301,10 +325,12 @@ "List": { "background": "#181A1F", "foreground": "#8F93A2", + "hoverBackground": "#717CB416", + "hoverInactiveBackground": "#1A1C25", "selectionBackground": "#23263250", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#717CB430" + "selectionInactiveBackground": "#717CB416" }, "material": { "background": "#0F111A", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#181A1F", "borderColor": "#1A1C25", - "currentOverloadBackground": "#1A1C25", + "currentOverloadBackground": "#1F2233", "currentParameterForeground": "#84ffff", "disabledForeground": "#464B5D", "foreground": "#8F93A2", @@ -429,7 +455,8 @@ "background": "#0F111A", "disabledForeground": "#464B5D", "eapTagBackground": "#1F2233", - "lightSelectionBackground": "#232632", + "hoverBackground": "#717CB416", + "lightSelectionBackground": "#1A1C25", "paidTagBackground": "#1F2233", "selectionBackground": "#232632", "tagForeground": "#84ffff", @@ -442,7 +469,7 @@ "installFocusedBackground": "#1F2233", "installFillForeground": "#464B5D", "installFillBackground": "#191A21", - "updateBackground": "#191A21", + "updateBackground": "#84ffff", "updateBorderColor": "#191A21", "updateForeground": "#8F93A2" }, @@ -517,6 +544,7 @@ "selectionBackground": "#232632", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#0F111A", "ScrollBar": { "background": "#0F111A", "hoverThumbBorderColor": "#84ffff", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#84ffff", - "startBackground": "#84ffff" + "startBackground": "#84ffff", + "endColor": "#84ffff", + "startColor": "#84ffff" }, "SearchField.errorBackground": "#090B10", + "SearchOption": { + "selectedBackground": "#1A1C25" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#4B526D", + "Repeated.File.Foreground": "#8F93A2" + }, "Separator": { "background": "#181A1F", "foreground": "#181A1F", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#181A1F", "StatusBar": { - "borderColor": "#0F111A" + "borderColor": "#0F111A", + "hoverBackground": "#1F2233", + "LightEditBackground": "#1A1C25" }, "TabbedPane": { "background": "#0F111A", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#0F111A", "Table": { + "alternativeRowBackground": "#090B10", "background": "#0F111A", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#464B5D", "dropLineColor": "#84ffff", "dropLineShortColor": "#84ffff", "focusCellBackground": "#1A1C25", @@ -653,6 +694,8 @@ "foreground": "#8F93A2", "gridColor": "#0F111A", "highlightOuter": "#1A1C25", + "hoverBackground": "#717CB416", + "hoverInactiveBackground": "#1A1C25", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#4B526D", "lightSelectionInactiveBackground": "#181A1F", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#0F111A", "Actions.infoForeground": "#4B526D", - "background": "#0F111A", - "borderColor": "#1F2233", + "background": "#090B10", + "borderColor": "#0F111A", "foreground": "#8F93A2", "infoForeground": "#4B526D", "separatorColor": "#0F111A", @@ -751,50 +794,93 @@ "background": "#0F111A" }, "HeaderTab": { + "borderColor": "#1F2233", "hoverBackground": "#1F2233", - "hoverInactiveBackground": "#181A1F", + "hoverInactiveBackground": "#1F2233", "inactiveUnderlineColor": "#84ffff", "selectedBackground": "#090B10", "selectedInactiveBackground": "#090B10", "underlineColor": "#84ffff", - "underlinedTabBackground": "#1F2233", - "underlinedTabInactiveBackground": "#181A1F" + "underlinedTabBackground": "#1A1C25", + "underlinedTabInactiveBackground": "#181A1F", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#8F93A2" } }, "Tree": { "background": "#0F111A", "foreground": "#4B526D", "hash": "#0F111A", + "hoverBackground": "#717CB416", + "hoverInactiveBackground": "#1A1C25", "modifiedItemForeground": "#84ffff", "rowHeight": 28, - "selectionBackground": "#717CB430", + "selectionBackground": "#717CB416", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#717CB430", + "selectionInactiveBackground": "#717CB416", "textBackground": "#0F111A" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#0F111A", - "ColorPicker.background": "#0F111A", - "ColorPicker.foreground": "#8F93A2", - "Component.borderColor": "#0F111A", - "Component.background": "#0F111A", - "Component.foreground": "#8F93A2", - "Connector.borderColor": "#0F111A", - "Connector.hoverBorderColor": "#1F2233", + "Canvas.background": "#090B10", + "ColorPicker": { + "background": "#0F111A", + "foreground": "#8F93A2" + }, + "Component": { + "borderColor": "#0F111A", + "background": "#0F111A", + "foreground": "#8F93A2", + "hoverBorderColor": "#1F2233" + }, + "Connector": { + "borderColor": "#0F111A", + "hoverBorderColor": "#1F2233" + }, "Canvas.background": "#090B10", "highStroke.foreground": "#8F93A2", "Label.foreground": "#4B526D", - "List.selectionBackground": "#717CB430", - "Panel.borderColor": "#0F111A", - "Panel.background": "#0F111A", + "List.selectionBackground": "#717CB416", + "motion": { + "borderColor": "#0F111A", + "Component.foreground": "#8F93A2", + "ConstraintSetText.foreground": "#4B526D", + "ConstraintSet.background": "#181A1F", + "CSPanel.SelectedFocusBackground": "#232632", + "CSPanel.SelectedBackground": "#717CB416", + "cs_FocusText.infoForeground": "#4B526D", + "CursorTextColor.foreground": "#8F93A2", + "HoverColor.disabledBackground": "#464B5D", + "motionGraph.background": "#0F111A", + "Notification.background": "#090B10", + "ourAvg.background": "#181A1F", + "ourCS.background": "#181A1F", + "ourCS_Border.borderColor": "#0F111A", + "ourCS_TextColor.foreground": "#4B526D", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#1A1C25", + "ourCS_SelectedBorder.pressedBorderColor": "#1F2233", + "ourML_BarColor.separatorColor": "#0F111A", + "PrimaryPanel.background": "#090B10", + "SecondaryPanel.background": "#0F111A", + "SecondaryPanel.header.foreground": "#4B526D", + "SecondaryPanel.header.background": "#090B10", + "timeLine.disabledBorderColor": "#0F111A" + }, + "Panel": { + "borderColor": "#0F111A", + "background": "#0F111A" + }, "percent.foreground": "#8F93A2", - "Placeholder.background": "#0F111A", - "Placeholder.borderColor": "#0F111A", - "Placeholder.foreground": "#8F93A2", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#0F111A", + "borderColor": "#0F111A", + "foreground": "#8F93A2", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#0F111A", "stroke.acceleratorForeground": "#4B526D" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#4B526D", - "Commit.currentBranchBackground": "#181A1F" + "Commit.currentBranchBackground": "#181A1F", + "Commit.hoveredBackground": "#717CB416" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,16 +927,22 @@ "foreground": "#8F93A2" }, "WelcomeScreen": { + "AssociatedComponent.background": "#0F111A", "background": "#0F111A", "borderColor": "#0F111A", "captionBackground": "#090B10", "captionForeground": "#8F93A2", + "Details.background": "#0F111A", "footerBackground": "#090B10", "footerForeground": "#8F93A2", "headerBackground": "#0F111A", "headerForeground": "#8F93A2", + "List.background": "#090B10", "separatorColor": "#0F111A", + "SidePanel.background": "#181A1F", "Projects": { + "actions.background": "#090B10", + "actions.selectionBackground": "#1F2233", "background": "#181A1F", "selectionBackground": "#232632", "selectionInactiveBackground": "#181A1F" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter Contrast.theme.json index edde7257..0b0f96fe 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter Contrast.theme.json @@ -3,24 +3,30 @@ "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Material Lighter.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/lighter.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#94A7B0", "background": "#FAFAFA", "borderColor": "#d3e1e8", - "disabledBackground": "#CCD7DA", + "disabledBackground": "#eae8e8", "disabledForeground": "#D2D4D5", "disabledText": "#D2D4D5", "focusColor": "#E7E7E8", "focusedBorderColor": "#00BCD4", "foreground": "#546E7A", - "inactiveBackground": "#CCD7DA", + "inactiveBackground": "#eae8e8", "inactiveForeground": "#94A7B0", "infoForeground": "#94A7B0", "selectionBackground": "#80CBC4", - "selectionBackgroundInactive": "#FFFFFF", + "selectionBackgroundInactive": "#eae8e8", "selectionForeground": "#546e7a", - "selectionInactiveBackground": "#FFFFFF", + "selectionInactiveBackground": "#eae8e8", "separatorColor": "#d3e1e8" }, "activeCaption": "#FAFAFA", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#d3e1e8", "Tooltip.background": "#eae8e8" }, - "Content.background": "#EEEEEE", + "Content": { + "background": "#F4F4F4", + "selectionBackground": "#80CBC4" + }, "CheckBox": { "background": "#FAFAFA", "disabledText": "#D2D4D5", @@ -89,6 +98,14 @@ "selectionBackground": "#80CBC4", "selectionForeground": "#546e7a" }, + "CodeWithMe": { + "Avatar.foreground": "#546E7A", + "AccessEnabled": { + "accessDot": "#00BCD4", + "dropdownBorder": "#eae8e8", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#FAFAFA", "foreground": "#546E7A", @@ -102,19 +119,20 @@ "iconColor": "#546E7A", "nonEditableBackground": "#FAFAFA" }, - "background": "#EEEEEE", + "background": "#F4F4F4", "buttonBackground": "#F3F4F5", + "darcula.hoveredArrowButtonForeground": "#00BCD4", "disabledForeground": "#D2D4D5", "foreground": "#546E7A", "modifiedItemForeground": "#00BCD4", - "nonEditableBackground": "#FFFFFF", + "nonEditableBackground": "#eae8e8", "padding": "5,5,5,5", "selectionBackground": "#E7E7E8", "selectionForeground": "#546e7a" }, "ComboPopup.border": "#d3e1e8", "CompletionPopup": { - "background": "#FFFFFF", + "background": "#eae8e8", "foreground": "#546E7A", "infoForeground": "#94A7B0", "matchForeground": "#00BCD4", @@ -166,13 +184,15 @@ "background": "#FAFAFA", "borderColor": "#FAFAFA", "hoverBackground": "#E7E7E8", - "hoverColor": "#EEEEEE", + "hoverColor": "#F4F4F4", "hoverMaskColor": "#E7E7E8", + "inactiveColoredTabBackground": "#FAFAFA", "inactiveColoredFileBackground": "#F3F4F5", - "inactiveUnderlineColor": "#D2D4D5", - "inactiveMaskColor": "#EEEEEE", + "inactiveUnderlineColor": "#00BCD4", + "inactiveMaskColor": "#F4F4F4", "underlineColor": "#00BCD4", - "underlinedTabBackground": "#E7E7E8" + "underlinedTabBackground": "#E7E7E8", + "underlinedTabForeground": "#546e7a" }, "Desktop.background": "#FAFAFA", "DialogWrapper.southPanelBackground": "#FAFAFA", @@ -183,12 +203,12 @@ "areaForeground": "#546E7A" }, "Editor": { - "background": "#EEEEEE", + "background": "#F4F4F4", "foreground": "#546E7A", "shortcutForeground": "#94A7B0" }, "EditorPane": { - "background": "#EEEEEE", + "background": "#F4F4F4", "caretForeground": "#00BCD4", "foreground": "#546E7A", "inactiveBackground": "#FAFAFA", @@ -197,20 +217,22 @@ "selectionForeground": "#546e7a" }, "EditorTabs": { - "borderColor": "#FFFFFF", + "borderColor": "#eae8e8", + "hoverBackground": "#E7E7E8", "hoverColor": "#E7E7E8", "hoverMaskColor": "#E7E7E8", "inactiveMaskColor": "#FAFAFA", - "inactiveColoredFileBackground": "#FAFAFA2", + "inactiveColoredFileBackground": "#FAFAFA", "inactiveUnderlineColor": "#D2D4D5", "selectedForeground": "#546E7A", "selectedBackground": "#E7E7E8", "underlineColor": "#00BCD4", - "underlinedTabBackground": "#E7E7E8" + "underlinedTabBackground": "#E7E7E8", + "underlinedTabForeground": "#546e7a" }, "EditorGroupsTabs": { "background": "#FAFAFA", - "borderColor": "#FFFFFF", + "borderColor": "#eae8e8", "hoverBackground": "#E7E7E8", "hoverColor": "#E7E7E8", "inactiveUnderlineColor": "#00BCD4", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#CCD7DA", + "Yellow": "#eae8e8", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -238,7 +260,7 @@ }, "Focus.color": "#d3e1e8", "FormattedTextField": { - "background": "#EEEEEE", + "background": "#F4F4F4", "caretForeground": "#00BCD4", "foreground": "#546E7A", "inactiveBackground": "#F3F4F5", @@ -246,17 +268,18 @@ "selectionForeground": "#546e7a", "selectionBackground": "#E7E7E8" }, + "GotItTooltip.borderColor": "#eae8e8", "Group": { "disabledSeparatorColor": "#d3e1e8", "separatorColor": "#d3e1e8" }, "GutterTooltip": { - "infoForeground": "#546E7A", + "infoForeground": "#94A7B0", "lineSeparatorColor": "#FAFAFA" }, "HeaderColor": { "active": "#FAFAFA", - "inactive": "#EEEEEE" + "inactive": "#F4F4F4" }, "HelpTooltip": { "background": "#FAFAFA", @@ -266,7 +289,7 @@ "shortcutForeground": "#94A7B0" }, "Hyperlink.linkColor": "#00BCD4", - "inactiveCaption": "#FFFFFF", + "inactiveCaption": "#eae8e8", "inactiveCaptionBorder": "#FAFAFA", "inactiveCaptionText": "#94A7B0", "info": "#94A7B0", @@ -288,7 +311,8 @@ "disabledText": "#D2D4D5", "foreground": "#546E7A", "infoForeground": "#94A7B0", - "selectedForeground": "#546e7a" + "selectedForeground": "#546e7a", + "selectedDisabledForeground": "#546E7A" }, "Link": { "activeForeground": "#00BCD4", @@ -299,17 +323,19 @@ }, "link.foreground": "#00BCD4", "List": { - "background": "#FFFFFF", + "background": "#eae8e8", "foreground": "#546E7A", + "hoverBackground": "#80CBC480", + "hoverInactiveBackground": "#E7E7E8", "selectionBackground": "#80CBC450", "selectionForeground": "#546e7a", "selectionInactiveForeground": "#546e7a", - "selectionInactiveBackground": "#80CBC440" + "selectionInactiveBackground": "#80CBC480" }, "material": { "background": "#FAFAFA", "branchColor": "#546E7A", - "contrast": "#EEEEEE", + "contrast": "#F4F4F4", "foreground": "#546E7A", "mergeCommits": "#F3F4F5", "primaryColor": "#94A7B0", @@ -319,7 +345,7 @@ "tagColor": "#94A7B0" }, "MemoryIndicator": { - "allocatedBackground": "#FFFFFF", + "allocatedBackground": "#eae8e8", "usedColor": "#E7E7E8", "usedBackground": "#E7E7E8" }, @@ -328,8 +354,8 @@ "acceleratorSelectionForeground": "#546e7a", "background": "#FAFAFA", "border": "4,2,4,2", - "borderColor": "#FFFFFF", - "disabledBackground": "#FFFFFF", + "borderColor": "#eae8e8", + "disabledBackground": "#eae8e8", "disabledForeground": "#D2D4D5", "foreground": "#546E7A", "selectionBackground": "#80CBC4", @@ -337,7 +363,7 @@ "separatorColor": "#d3e1e8" }, "MenuBar": { - "background": "#EEEEEE", + "background": "#F4F4F4", "borderColor": "#FAFAFA", "disabledBackground": "#FAFAFA", "disabledForeground": "#D2D4D5", @@ -345,7 +371,7 @@ "highlight": "#FAFAFA", "selectionBackground": "#80CBC4", "selectionForeground": "#546e7a", - "shadow": "#EEEEEE" + "shadow": "#F4F4F4" }, "MenuItem": { "acceleratorForeground": "#94A7B0", @@ -367,7 +393,7 @@ "background": "#FAFAFA" }, "SearchField": { - "background": "#EEEEEE" + "background": "#F4F4F4" } }, "NewPSD.warning": "#00BCD4", @@ -407,7 +433,7 @@ "foreground": "#546E7A" }, "ParameterInfo": { - "background": "#FFFFFF", + "background": "#eae8e8", "borderColor": "#E7E7E8", "currentOverloadBackground": "#E7E7E8", "currentParameterForeground": "#00BCD4", @@ -417,7 +443,7 @@ "lineSeparatorColor": "#E7E7E8" }, "PasswordField": { - "background": "#EEEEEE", + "background": "#F4F4F4", "capsLockIconColor": "#00BCD4", "caretForeground": "#00BCD4", "foreground": "#546E7A", @@ -429,7 +455,8 @@ "background": "#FAFAFA", "disabledForeground": "#D2D4D5", "eapTagBackground": "#E7E7E8", - "lightSelectionBackground": "#80CBC4", + "hoverBackground": "#80CBC480", + "lightSelectionBackground": "#E7E7E8", "paidTagBackground": "#E7E7E8", "selectionBackground": "#80CBC4", "tagForeground": "#00BCD4", @@ -442,16 +469,16 @@ "installFocusedBackground": "#E7E7E8", "installFillForeground": "#D2D4D5", "installFillBackground": "#F3F4F5", - "updateBackground": "#F3F4F5", + "updateBackground": "#00BCD4", "updateBorderColor": "#F3F4F5", "updateForeground": "#546E7A" }, "SearchField": { - "background": "#EEEEEE", + "background": "#F4F4F4", "borderColor": "#d3e1e8" }, "SectionHeader": { - "background": "#FFFFFF", + "background": "#eae8e8", "foreground": "#546E7A" }, "Tab": { @@ -466,20 +493,20 @@ "borderColor": "#FAFAFA", "foreground": "#00BCD4" }, - "borderColor": "#EEEEEE", + "borderColor": "#F4F4F4", "inactiveBorderColor": "#FAFAFA", - "innerBorderColor": "#FFFFFF", + "innerBorderColor": "#eae8e8", "Header": { "activeBackground": "#FAFAFA", - "inactiveBackground": "#EEEEEE" + "inactiveBackground": "#F4F4F4" }, "paintBorder": true, "separatorForeground": "#546E7A", - "separatorColor": "#FFFFFF", + "separatorColor": "#eae8e8", "Toolbar": { - "Floating.background": "#EEEEEE", - "background": "#EEEEEE", - "borderColor": "#EEEEEE" + "Floating.background": "#F4F4F4", + "background": "#F4F4F4", + "borderColor": "#F4F4F4" } }, "PopupMenu": { @@ -517,6 +544,7 @@ "selectionBackground": "#80CBC4", "selectionForeground": "#546e7a" }, + "ScreenView.borderColor": "#d3e1e8", "ScrollBar": { "background": "#FAFAFA", "hoverThumbBorderColor": "#00BCD4", @@ -553,7 +581,7 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#EEEEEE", + "background": "#F4F4F4", "foreground": "#94A7B0" }, "Header": { @@ -565,7 +593,7 @@ }, "SearchField": { "background": "#FAFAFA", - "borderColor": "#EEEEEE", + "borderColor": "#F4F4F4", "infoForeground": "#94A7B0" }, "Tab": { @@ -576,16 +604,25 @@ }, "SearchMatch": { "endBackground": "#00BCD4", - "startBackground": "#00BCD4" + "startBackground": "#00BCD4", + "endColor": "#00BCD4", + "startColor": "#00BCD4" }, "SearchField.errorBackground": "#eae8e8", + "SearchOption": { + "selectedBackground": "#E7E7E8" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#94A7B0", + "Repeated.File.Foreground": "#546E7A" + }, "Separator": { - "background": "#FFFFFF", - "foreground": "#FFFFFF", - "separatorColor": "#FFFFFF" + "background": "#eae8e8", + "foreground": "#eae8e8", + "separatorColor": "#eae8e8" }, "SidePanel": { - "background": "#EEEEEE" + "background": "#F4F4F4" }, "Slider": { "background": "#FAFAFA", @@ -593,7 +630,7 @@ "buttonColor": "#00BCD4", "foreground": "#546E7A", "majorTickLength": 6, - "tickColor": "#FFFFFF", + "tickColor": "#eae8e8", "trackColor": "#E7E7E8", "trackWidth": 7, "thumb": "#00BCD4" @@ -612,11 +649,13 @@ }, "SplitPane": { "background": "#FAFAFA", - "highlight": "#EEEEEE" + "highlight": "#F4F4F4" }, - "SplitPaneDivider.draggingColor": "#FFFFFF", + "SplitPaneDivider.draggingColor": "#eae8e8", "StatusBar": { - "borderColor": "#FAFAFA" + "borderColor": "#FAFAFA", + "hoverBackground": "#E7E7E8", + "LightEditBackground": "#E7E7E8" }, "TabbedPane": { "background": "#FAFAFA", @@ -641,11 +680,13 @@ "tabSelectionHeight": 2, "underlineColor": "#00BCD4" }, - "TabbedPane.mt.tab.background": "#EEEEEE", + "TabbedPane.mt.tab.background": "#F4F4F4", "Table": { + "alternativeRowBackground": "#F4F4F4", "background": "#FAFAFA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#D2D4D5", "dropLineColor": "#00BCD4", "dropLineShortColor": "#00BCD4", "focusCellBackground": "#E7E7E8", @@ -653,33 +694,35 @@ "foreground": "#546E7A", "gridColor": "#FAFAFA", "highlightOuter": "#E7E7E8", + "hoverBackground": "#80CBC480", + "hoverInactiveBackground": "#E7E7E8", "lightSelectionForeground": "#546e7a", "lightSelectionInactiveForeground": "#94A7B0", - "lightSelectionInactiveBackground": "#FFFFFF", + "lightSelectionInactiveBackground": "#eae8e8", "selectionBackground": "#E7E7E8", "selectionForeground": "#546e7a", "selectionInactiveBackground": "#E7E7E8", "selectionInactiveForeground": "#546e7a", "sortIconColor": "#546E7A", - "stripeColor": "#EEEEEE" + "stripeColor": "#F4F4F4" }, "TableHeader": { "background": "#FAFAFA", "borderColor": "#FAFAFA", - "bottomSeparatorColor": "#FFFFFF", + "bottomSeparatorColor": "#eae8e8", "cellBorder": "4,0,4,0", "disabledForeground": "#D2D4D5", "foreground": "#546E7A", "focusCellBackground": "#E7E7E8", "focusCellForeground": "#546e7a", "height": 25, - "separatorColor": "#FFFFFF" + "separatorColor": "#eae8e8" }, "text": "#94A7B0", "textInactiveText": "#94A7B0", "textText": "#94A7B0", "TextArea": { - "background": "#EEEEEE", + "background": "#F4F4F4", "caretForeground": "#00BCD4", "foreground": "#546E7A", "inactiveForeground": "#D2D4D5", @@ -687,7 +730,7 @@ "selectionForeground": "#546e7a" }, "TextField": { - "background": "#EEEEEE", + "background": "#F4F4F4", "caretForeground": "#00BCD4", "foreground": "#546E7A", "inactiveForeground": "#D2D4D5", @@ -695,7 +738,7 @@ "selectionForeground": "#546e7a" }, "TextPane": { - "background": "#EEEEEE", + "background": "#F4F4F4", "caretForeground": "#00BCD4", "foreground": "#546E7A", "inactiveForeground": "#D2D4D5", @@ -703,7 +746,7 @@ "selectionForeground": "#546e7a" }, "TitlePane": { - "background": "#EEEEEE", + "background": "#F4F4F4", "Button.hoverBackground": "#E7E7E8", "inactiveBackground": "#FAFAFA", "infoForeground": "#94A7B0", @@ -721,7 +764,7 @@ "onForeground": "#00BCD4" }, "ToolBar": { - "background": "#EEEEEE", + "background": "#F4F4F4", "borderHandleColor": "#94A7B0", "floatingForeground": "#94A7B0", "foreground": "#546E7A" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#FAFAFA", "Actions.infoForeground": "#94A7B0", - "background": "#FAFAFA", - "borderColor": "#E7E7E8", + "background": "#eae8e8", + "borderColor": "#d3e1e8", "foreground": "#546E7A", "infoForeground": "#94A7B0", "separatorColor": "#d3e1e8", @@ -740,61 +783,104 @@ "Button": { "hoverBackground": "#E7E7E8", "selectedForeground": "#546e7a", - "selectedBackground": "#EEEEEE" + "selectedBackground": "#F4F4F4" }, "Header": { "background": "#FAFAFA", - "borderColor": "#FFFFFF", + "borderColor": "#eae8e8", "inactiveBackground": "#FAFAFA" }, "HeaderCloseButton": { "background": "#FAFAFA" }, "HeaderTab": { + "borderColor": "#E7E7E8", "hoverBackground": "#E7E7E8", - "hoverInactiveBackground": "#FFFFFF", + "hoverInactiveBackground": "#E7E7E8", "inactiveUnderlineColor": "#00BCD4", - "selectedBackground": "#EEEEEE", - "selectedInactiveBackground": "#EEEEEE", + "selectedBackground": "#F4F4F4", + "selectedInactiveBackground": "#F4F4F4", "underlineColor": "#00BCD4", "underlinedTabBackground": "#E7E7E8", - "underlinedTabInactiveBackground": "#FFFFFF" + "underlinedTabInactiveBackground": "#eae8e8", + "underlinedTabForeground": "#546e7a", + "underlinedTabInactiveForeground": "#546E7A" } }, "Tree": { - "background": "#EEEEEE", + "background": "#F4F4F4", "foreground": "#94A7B0", "hash": "#d3e1e8", + "hoverBackground": "#80CBC480", + "hoverInactiveBackground": "#E7E7E8", "modifiedItemForeground": "#00BCD4", "rowHeight": 28, - "selectionBackground": "#80CBC440", + "selectionBackground": "#80CBC480", "selectionForeground": "#546e7a", "selectionInactiveForeground": "#546e7a", - "selectionInactiveBackground": "#80CBC440", - "textBackground": "#EEEEEE" + "selectionInactiveBackground": "#80CBC480", + "textBackground": "#F4F4F4" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#d3e1e8", - "ColorPicker.background": "#FAFAFA", - "ColorPicker.foreground": "#546E7A", - "Component.borderColor": "#d3e1e8", - "Component.background": "#FAFAFA", - "Component.foreground": "#546E7A", - "Connector.borderColor": "#d3e1e8", - "Connector.hoverBorderColor": "#E7E7E8", - "Canvas.background": "#EEEEEE", + "Canvas.background": "#F4F4F4", + "ColorPicker": { + "background": "#FAFAFA", + "foreground": "#546E7A" + }, + "Component": { + "borderColor": "#d3e1e8", + "background": "#FAFAFA", + "foreground": "#546E7A", + "hoverBorderColor": "#E7E7E8" + }, + "Connector": { + "borderColor": "#d3e1e8", + "hoverBorderColor": "#E7E7E8" + }, + "Canvas.background": "#F4F4F4", "highStroke.foreground": "#546E7A", "Label.foreground": "#94A7B0", - "List.selectionBackground": "#80CBC440", - "Panel.borderColor": "#d3e1e8", - "Panel.background": "#FAFAFA", + "List.selectionBackground": "#80CBC480", + "motion": { + "borderColor": "#d3e1e8", + "Component.foreground": "#546E7A", + "ConstraintSetText.foreground": "#94A7B0", + "ConstraintSet.background": "#eae8e8", + "CSPanel.SelectedFocusBackground": "#80CBC4", + "CSPanel.SelectedBackground": "#80CBC480", + "cs_FocusText.infoForeground": "#94A7B0", + "CursorTextColor.foreground": "#546E7A", + "HoverColor.disabledBackground": "#D2D4D5", + "motionGraph.background": "#FAFAFA", + "Notification.background": "#eae8e8", + "ourAvg.background": "#eae8e8", + "ourCS.background": "#eae8e8", + "ourCS_Border.borderColor": "#d3e1e8", + "ourCS_TextColor.foreground": "#94A7B0", + "ourCS_SelectedFocusBackground.selectionForeground": "#546e7a", + "ourCS_SelectedBackground.selectionInactiveBackground": "#E7E7E8", + "ourCS_SelectedBorder.pressedBorderColor": "#E7E7E8", + "ourML_BarColor.separatorColor": "#d3e1e8", + "PrimaryPanel.background": "#F4F4F4", + "SecondaryPanel.background": "#FAFAFA", + "SecondaryPanel.header.foreground": "#94A7B0", + "SecondaryPanel.header.background": "#F4F4F4", + "timeLine.disabledBorderColor": "#d3e1e8" + }, + "Panel": { + "borderColor": "#d3e1e8", + "background": "#FAFAFA" + }, "percent.foreground": "#546E7A", - "Placeholder.background": "#FAFAFA", - "Placeholder.borderColor": "#d3e1e8", - "Placeholder.foreground": "#546E7A", - "Placeholder.selectedForeground": "#546e7a", + "Placeholder": { + "background": "#FAFAFA", + "borderColor": "#d3e1e8", + "foreground": "#546E7A", + "selectedForeground": "#546e7a" + }, "Preview.background": "#FAFAFA", "stroke.acceleratorForeground": "#94A7B0" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#94A7B0", - "Commit.currentBranchBackground": "#FFFFFF" + "Commit.currentBranchBackground": "#eae8e8", + "Commit.hoveredBackground": "#80CBC480" }, "RefLabel": { "foreground": "#546e7a", @@ -836,33 +923,39 @@ } }, "Viewport": { - "background": "#EEEEEE", + "background": "#F4F4F4", "foreground": "#546E7A" }, "WelcomeScreen": { + "AssociatedComponent.background": "#FAFAFA", "background": "#FAFAFA", "borderColor": "#FAFAFA", - "captionBackground": "#EEEEEE", + "captionBackground": "#F4F4F4", "captionForeground": "#546E7A", - "footerBackground": "#EEEEEE", + "Details.background": "#FAFAFA", + "footerBackground": "#F4F4F4", "footerForeground": "#546E7A", "headerBackground": "#FAFAFA", "headerForeground": "#546E7A", + "List.background": "#F4F4F4", "separatorColor": "#d3e1e8", + "SidePanel.background": "#eae8e8", "Projects": { - "background": "#FFFFFF", + "actions.background": "#F4F4F4", + "actions.selectionBackground": "#E7E7E8", + "background": "#eae8e8", "selectionBackground": "#80CBC4", - "selectionInactiveBackground": "#FFFFFF" + "selectionInactiveBackground": "#eae8e8" } }, - "window": "#EEEEEE", + "window": "#F4F4F4", "windowBorder": "#d3e1e8", "windowText": "#94A7B0", "Window.border": "#d3e1e8" }, "icons": { "ColorPalette": { - "#43494A": "#EEEEEE", + "#43494A": "#F4F4F4", "#6B6B6B": "#94A7B0", "#A7A7A7": "#FAFAFA", "#3D6185": "#00BCD4", @@ -879,10 +972,10 @@ "Actions.GreyInline.Dark": "#546E7A", "Actions.Red": "#E53935", "Actions.Yellow": "#F6A434", - "Checkbox.Background.Default": "#EEEEEE", - "Checkbox.Background.Default.Dark": "#EEEEEE", - "Checkbox.Background.Disabled": "#CCD7DA", - "Checkbox.Background.Disabled.Dark": "#CCD7DA", + "Checkbox.Background.Default": "#F4F4F4", + "Checkbox.Background.Default.Dark": "#F4F4F4", + "Checkbox.Background.Disabled": "#eae8e8", + "Checkbox.Background.Disabled.Dark": "#eae8e8", "Checkbox.Border.Default": "#d3e1e8", "Checkbox.Border.Default.Dark": "#d3e1e8", "Checkbox.Border.Disabled": "#D2D4D5", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter.theme.json index 26ce91a8..f26db84f 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Lighter.theme.json @@ -3,24 +3,30 @@ "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Material Lighter.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/lighter.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#94A7B0", "background": "#FAFAFA", "borderColor": "#d3e1e8", - "disabledBackground": "#CCD7DA", + "disabledBackground": "#eae8e8", "disabledForeground": "#D2D4D5", "disabledText": "#D2D4D5", "focusColor": "#E7E7E8", "focusedBorderColor": "#00BCD4", "foreground": "#546E7A", - "inactiveBackground": "#CCD7DA", + "inactiveBackground": "#eae8e8", "inactiveForeground": "#94A7B0", "infoForeground": "#94A7B0", "selectionBackground": "#80CBC4", - "selectionBackgroundInactive": "#FFFFFF", + "selectionBackgroundInactive": "#eae8e8", "selectionForeground": "#546e7a", - "selectionInactiveBackground": "#FFFFFF", + "selectionInactiveBackground": "#eae8e8", "separatorColor": "#d3e1e8" }, "activeCaption": "#FAFAFA", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#d3e1e8", "Tooltip.background": "#eae8e8" }, - "Content.background": "#EEEEEE", + "Content": { + "background": "#F4F4F4", + "selectionBackground": "#80CBC4" + }, "CheckBox": { "background": "#FAFAFA", "disabledText": "#D2D4D5", @@ -89,6 +98,14 @@ "selectionBackground": "#80CBC4", "selectionForeground": "#546e7a" }, + "CodeWithMe": { + "Avatar.foreground": "#546E7A", + "AccessEnabled": { + "accessDot": "#00BCD4", + "dropdownBorder": "#eae8e8", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#FAFAFA", "foreground": "#546E7A", @@ -104,17 +121,18 @@ }, "background": "#FAFAFA", "buttonBackground": "#F3F4F5", + "darcula.hoveredArrowButtonForeground": "#00BCD4", "disabledForeground": "#D2D4D5", "foreground": "#546E7A", "modifiedItemForeground": "#00BCD4", - "nonEditableBackground": "#FFFFFF", + "nonEditableBackground": "#eae8e8", "padding": "5,5,5,5", "selectionBackground": "#E7E7E8", "selectionForeground": "#546e7a" }, "ComboPopup.border": "#d3e1e8", "CompletionPopup": { - "background": "#FFFFFF", + "background": "#eae8e8", "foreground": "#546E7A", "infoForeground": "#94A7B0", "matchForeground": "#00BCD4", @@ -168,11 +186,13 @@ "hoverBackground": "#E7E7E8", "hoverColor": "#FAFAFA", "hoverMaskColor": "#E7E7E8", + "inactiveColoredTabBackground": "#FAFAFA", "inactiveColoredFileBackground": "#F3F4F5", - "inactiveUnderlineColor": "#D2D4D5", + "inactiveUnderlineColor": "#00BCD4", "inactiveMaskColor": "#FAFAFA", "underlineColor": "#00BCD4", - "underlinedTabBackground": "#E7E7E8" + "underlinedTabBackground": "#E7E7E8", + "underlinedTabForeground": "#546e7a" }, "Desktop.background": "#FAFAFA", "DialogWrapper.southPanelBackground": "#FAFAFA", @@ -197,20 +217,22 @@ "selectionForeground": "#546e7a" }, "EditorTabs": { - "borderColor": "#FFFFFF", + "borderColor": "#eae8e8", + "hoverBackground": "#E7E7E8", "hoverColor": "#E7E7E8", "hoverMaskColor": "#E7E7E8", "inactiveMaskColor": "#FAFAFA", - "inactiveColoredFileBackground": "#FAFAFA2", + "inactiveColoredFileBackground": "#FAFAFA", "inactiveUnderlineColor": "#D2D4D5", "selectedForeground": "#546E7A", "selectedBackground": "#E7E7E8", "underlineColor": "#00BCD4", - "underlinedTabBackground": "#E7E7E8" + "underlinedTabBackground": "#E7E7E8", + "underlinedTabForeground": "#546e7a" }, "EditorGroupsTabs": { "background": "#FAFAFA", - "borderColor": "#FFFFFF", + "borderColor": "#eae8e8", "hoverBackground": "#E7E7E8", "hoverColor": "#E7E7E8", "inactiveUnderlineColor": "#00BCD4", @@ -221,7 +243,7 @@ "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#CCD7DA", + "Yellow": "#eae8e8", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -246,17 +268,18 @@ "selectionForeground": "#546e7a", "selectionBackground": "#E7E7E8" }, + "GotItTooltip.borderColor": "#eae8e8", "Group": { "disabledSeparatorColor": "#d3e1e8", "separatorColor": "#d3e1e8" }, "GutterTooltip": { - "infoForeground": "#546E7A", + "infoForeground": "#94A7B0", "lineSeparatorColor": "#FAFAFA" }, "HeaderColor": { "active": "#FAFAFA", - "inactive": "#EEEEEE" + "inactive": "#F4F4F4" }, "HelpTooltip": { "background": "#FAFAFA", @@ -266,7 +289,7 @@ "shortcutForeground": "#94A7B0" }, "Hyperlink.linkColor": "#00BCD4", - "inactiveCaption": "#FFFFFF", + "inactiveCaption": "#eae8e8", "inactiveCaptionBorder": "#FAFAFA", "inactiveCaptionText": "#94A7B0", "info": "#94A7B0", @@ -288,7 +311,8 @@ "disabledText": "#D2D4D5", "foreground": "#546E7A", "infoForeground": "#94A7B0", - "selectedForeground": "#546e7a" + "selectedForeground": "#546e7a", + "selectedDisabledForeground": "#546E7A" }, "Link": { "activeForeground": "#00BCD4", @@ -299,17 +323,19 @@ }, "link.foreground": "#00BCD4", "List": { - "background": "#FFFFFF", + "background": "#eae8e8", "foreground": "#546E7A", + "hoverBackground": "#80CBC480", + "hoverInactiveBackground": "#E7E7E8", "selectionBackground": "#80CBC450", "selectionForeground": "#546e7a", "selectionInactiveForeground": "#546e7a", - "selectionInactiveBackground": "#80CBC440" + "selectionInactiveBackground": "#80CBC480" }, "material": { "background": "#FAFAFA", "branchColor": "#546E7A", - "contrast": "#EEEEEE", + "contrast": "#F4F4F4", "foreground": "#546E7A", "mergeCommits": "#F3F4F5", "primaryColor": "#94A7B0", @@ -319,7 +345,7 @@ "tagColor": "#94A7B0" }, "MemoryIndicator": { - "allocatedBackground": "#FFFFFF", + "allocatedBackground": "#eae8e8", "usedColor": "#E7E7E8", "usedBackground": "#E7E7E8" }, @@ -328,8 +354,8 @@ "acceleratorSelectionForeground": "#546e7a", "background": "#FAFAFA", "border": "4,2,4,2", - "borderColor": "#FFFFFF", - "disabledBackground": "#FFFFFF", + "borderColor": "#eae8e8", + "disabledBackground": "#eae8e8", "disabledForeground": "#D2D4D5", "foreground": "#546E7A", "selectionBackground": "#80CBC4", @@ -407,7 +433,7 @@ "foreground": "#546E7A" }, "ParameterInfo": { - "background": "#FFFFFF", + "background": "#eae8e8", "borderColor": "#E7E7E8", "currentOverloadBackground": "#E7E7E8", "currentParameterForeground": "#00BCD4", @@ -429,7 +455,8 @@ "background": "#FAFAFA", "disabledForeground": "#D2D4D5", "eapTagBackground": "#E7E7E8", - "lightSelectionBackground": "#80CBC4", + "hoverBackground": "#80CBC480", + "lightSelectionBackground": "#E7E7E8", "paidTagBackground": "#E7E7E8", "selectionBackground": "#80CBC4", "tagForeground": "#00BCD4", @@ -442,7 +469,7 @@ "installFocusedBackground": "#E7E7E8", "installFillForeground": "#D2D4D5", "installFillBackground": "#F3F4F5", - "updateBackground": "#F3F4F5", + "updateBackground": "#00BCD4", "updateBorderColor": "#F3F4F5", "updateForeground": "#546E7A" }, @@ -451,7 +478,7 @@ "borderColor": "#d3e1e8" }, "SectionHeader": { - "background": "#FFFFFF", + "background": "#eae8e8", "foreground": "#546E7A" }, "Tab": { @@ -466,20 +493,20 @@ "borderColor": "#FAFAFA", "foreground": "#00BCD4" }, - "borderColor": "#EEEEEE", + "borderColor": "#F4F4F4", "inactiveBorderColor": "#FAFAFA", - "innerBorderColor": "#FFFFFF", + "innerBorderColor": "#eae8e8", "Header": { "activeBackground": "#FAFAFA", - "inactiveBackground": "#EEEEEE" + "inactiveBackground": "#F4F4F4" }, "paintBorder": true, "separatorForeground": "#546E7A", - "separatorColor": "#FFFFFF", + "separatorColor": "#eae8e8", "Toolbar": { - "Floating.background": "#EEEEEE", - "background": "#EEEEEE", - "borderColor": "#EEEEEE" + "Floating.background": "#F4F4F4", + "background": "#F4F4F4", + "borderColor": "#F4F4F4" } }, "PopupMenu": { @@ -517,6 +544,7 @@ "selectionBackground": "#80CBC4", "selectionForeground": "#546e7a" }, + "ScreenView.borderColor": "#d3e1e8", "ScrollBar": { "background": "#FAFAFA", "hoverThumbBorderColor": "#00BCD4", @@ -553,7 +581,7 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#EEEEEE", + "background": "#F4F4F4", "foreground": "#94A7B0" }, "Header": { @@ -565,7 +593,7 @@ }, "SearchField": { "background": "#FAFAFA", - "borderColor": "#EEEEEE", + "borderColor": "#F4F4F4", "infoForeground": "#94A7B0" }, "Tab": { @@ -576,13 +604,22 @@ }, "SearchMatch": { "endBackground": "#00BCD4", - "startBackground": "#00BCD4" + "startBackground": "#00BCD4", + "endColor": "#00BCD4", + "startColor": "#00BCD4" }, "SearchField.errorBackground": "#eae8e8", + "SearchOption": { + "selectedBackground": "#E7E7E8" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#94A7B0", + "Repeated.File.Foreground": "#546E7A" + }, "Separator": { - "background": "#FFFFFF", - "foreground": "#FFFFFF", - "separatorColor": "#FFFFFF" + "background": "#eae8e8", + "foreground": "#eae8e8", + "separatorColor": "#eae8e8" }, "SidePanel": { "background": "#FAFAFA" @@ -593,7 +630,7 @@ "buttonColor": "#00BCD4", "foreground": "#546E7A", "majorTickLength": 6, - "tickColor": "#FFFFFF", + "tickColor": "#eae8e8", "trackColor": "#E7E7E8", "trackWidth": 7, "thumb": "#00BCD4" @@ -614,9 +651,11 @@ "background": "#FAFAFA", "highlight": "#FAFAFA" }, - "SplitPaneDivider.draggingColor": "#FFFFFF", + "SplitPaneDivider.draggingColor": "#eae8e8", "StatusBar": { - "borderColor": "#FAFAFA" + "borderColor": "#FAFAFA", + "hoverBackground": "#E7E7E8", + "LightEditBackground": "#E7E7E8" }, "TabbedPane": { "background": "#FAFAFA", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#FAFAFA", "Table": { + "alternativeRowBackground": "#F4F4F4", "background": "#FAFAFA", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#D2D4D5", "dropLineColor": "#00BCD4", "dropLineShortColor": "#00BCD4", "focusCellBackground": "#E7E7E8", @@ -653,27 +694,29 @@ "foreground": "#546E7A", "gridColor": "#FAFAFA", "highlightOuter": "#E7E7E8", + "hoverBackground": "#80CBC480", + "hoverInactiveBackground": "#E7E7E8", "lightSelectionForeground": "#546e7a", "lightSelectionInactiveForeground": "#94A7B0", - "lightSelectionInactiveBackground": "#FFFFFF", + "lightSelectionInactiveBackground": "#eae8e8", "selectionBackground": "#E7E7E8", "selectionForeground": "#546e7a", "selectionInactiveBackground": "#E7E7E8", "selectionInactiveForeground": "#546e7a", "sortIconColor": "#546E7A", - "stripeColor": "#EEEEEE" + "stripeColor": "#F4F4F4" }, "TableHeader": { "background": "#FAFAFA", "borderColor": "#FAFAFA", - "bottomSeparatorColor": "#FFFFFF", + "bottomSeparatorColor": "#eae8e8", "cellBorder": "4,0,4,0", "disabledForeground": "#D2D4D5", "foreground": "#546E7A", "focusCellBackground": "#E7E7E8", "focusCellForeground": "#546e7a", "height": 25, - "separatorColor": "#FFFFFF" + "separatorColor": "#eae8e8" }, "text": "#94A7B0", "textInactiveText": "#94A7B0", @@ -703,7 +746,7 @@ "selectionForeground": "#546e7a" }, "TitlePane": { - "background": "#EEEEEE", + "background": "#F4F4F4", "Button.hoverBackground": "#E7E7E8", "inactiveBackground": "#FAFAFA", "infoForeground": "#94A7B0", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#FAFAFA", "Actions.infoForeground": "#94A7B0", - "background": "#FAFAFA", - "borderColor": "#E7E7E8", + "background": "#eae8e8", + "borderColor": "#d3e1e8", "foreground": "#546E7A", "infoForeground": "#94A7B0", "separatorColor": "#d3e1e8", @@ -740,61 +783,104 @@ "Button": { "hoverBackground": "#E7E7E8", "selectedForeground": "#546e7a", - "selectedBackground": "#EEEEEE" + "selectedBackground": "#F4F4F4" }, "Header": { "background": "#FAFAFA", - "borderColor": "#FFFFFF", + "borderColor": "#eae8e8", "inactiveBackground": "#FAFAFA" }, "HeaderCloseButton": { "background": "#FAFAFA" }, "HeaderTab": { + "borderColor": "#E7E7E8", "hoverBackground": "#E7E7E8", - "hoverInactiveBackground": "#FFFFFF", + "hoverInactiveBackground": "#E7E7E8", "inactiveUnderlineColor": "#00BCD4", - "selectedBackground": "#EEEEEE", - "selectedInactiveBackground": "#EEEEEE", + "selectedBackground": "#F4F4F4", + "selectedInactiveBackground": "#F4F4F4", "underlineColor": "#00BCD4", "underlinedTabBackground": "#E7E7E8", - "underlinedTabInactiveBackground": "#FFFFFF" + "underlinedTabInactiveBackground": "#eae8e8", + "underlinedTabForeground": "#546e7a", + "underlinedTabInactiveForeground": "#546E7A" } }, "Tree": { "background": "#FAFAFA", "foreground": "#94A7B0", "hash": "#d3e1e8", + "hoverBackground": "#80CBC480", + "hoverInactiveBackground": "#E7E7E8", "modifiedItemForeground": "#00BCD4", "rowHeight": 28, - "selectionBackground": "#80CBC440", + "selectionBackground": "#80CBC480", "selectionForeground": "#546e7a", "selectionInactiveForeground": "#546e7a", - "selectionInactiveBackground": "#80CBC440", + "selectionInactiveBackground": "#80CBC480", "textBackground": "#FAFAFA" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#d3e1e8", - "ColorPicker.background": "#FAFAFA", - "ColorPicker.foreground": "#546E7A", - "Component.borderColor": "#d3e1e8", - "Component.background": "#FAFAFA", - "Component.foreground": "#546E7A", - "Connector.borderColor": "#d3e1e8", - "Connector.hoverBorderColor": "#E7E7E8", - "Canvas.background": "#EEEEEE", + "Canvas.background": "#F4F4F4", + "ColorPicker": { + "background": "#FAFAFA", + "foreground": "#546E7A" + }, + "Component": { + "borderColor": "#d3e1e8", + "background": "#FAFAFA", + "foreground": "#546E7A", + "hoverBorderColor": "#E7E7E8" + }, + "Connector": { + "borderColor": "#d3e1e8", + "hoverBorderColor": "#E7E7E8" + }, + "Canvas.background": "#F4F4F4", "highStroke.foreground": "#546E7A", "Label.foreground": "#94A7B0", - "List.selectionBackground": "#80CBC440", - "Panel.borderColor": "#d3e1e8", - "Panel.background": "#FAFAFA", + "List.selectionBackground": "#80CBC480", + "motion": { + "borderColor": "#d3e1e8", + "Component.foreground": "#546E7A", + "ConstraintSetText.foreground": "#94A7B0", + "ConstraintSet.background": "#eae8e8", + "CSPanel.SelectedFocusBackground": "#80CBC4", + "CSPanel.SelectedBackground": "#80CBC480", + "cs_FocusText.infoForeground": "#94A7B0", + "CursorTextColor.foreground": "#546E7A", + "HoverColor.disabledBackground": "#D2D4D5", + "motionGraph.background": "#FAFAFA", + "Notification.background": "#eae8e8", + "ourAvg.background": "#eae8e8", + "ourCS.background": "#eae8e8", + "ourCS_Border.borderColor": "#d3e1e8", + "ourCS_TextColor.foreground": "#94A7B0", + "ourCS_SelectedFocusBackground.selectionForeground": "#546e7a", + "ourCS_SelectedBackground.selectionInactiveBackground": "#E7E7E8", + "ourCS_SelectedBorder.pressedBorderColor": "#E7E7E8", + "ourML_BarColor.separatorColor": "#d3e1e8", + "PrimaryPanel.background": "#F4F4F4", + "SecondaryPanel.background": "#FAFAFA", + "SecondaryPanel.header.foreground": "#94A7B0", + "SecondaryPanel.header.background": "#F4F4F4", + "timeLine.disabledBorderColor": "#d3e1e8" + }, + "Panel": { + "borderColor": "#d3e1e8", + "background": "#FAFAFA" + }, "percent.foreground": "#546E7A", - "Placeholder.background": "#FAFAFA", - "Placeholder.borderColor": "#d3e1e8", - "Placeholder.foreground": "#546E7A", - "Placeholder.selectedForeground": "#546e7a", + "Placeholder": { + "background": "#FAFAFA", + "borderColor": "#d3e1e8", + "foreground": "#546E7A", + "selectedForeground": "#546e7a" + }, "Preview.background": "#FAFAFA", "stroke.acceleratorForeground": "#94A7B0" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#94A7B0", - "Commit.currentBranchBackground": "#FFFFFF" + "Commit.currentBranchBackground": "#eae8e8", + "Commit.hoveredBackground": "#80CBC480" }, "RefLabel": { "foreground": "#546e7a", @@ -840,19 +927,25 @@ "foreground": "#546E7A" }, "WelcomeScreen": { + "AssociatedComponent.background": "#FAFAFA", "background": "#FAFAFA", "borderColor": "#FAFAFA", - "captionBackground": "#EEEEEE", + "captionBackground": "#F4F4F4", "captionForeground": "#546E7A", - "footerBackground": "#EEEEEE", + "Details.background": "#FAFAFA", + "footerBackground": "#F4F4F4", "footerForeground": "#546E7A", "headerBackground": "#FAFAFA", "headerForeground": "#546E7A", + "List.background": "#F4F4F4", "separatorColor": "#d3e1e8", + "SidePanel.background": "#eae8e8", "Projects": { - "background": "#FFFFFF", + "actions.background": "#F4F4F4", + "actions.selectionBackground": "#E7E7E8", + "background": "#eae8e8", "selectionBackground": "#80CBC4", - "selectionInactiveBackground": "#FFFFFF" + "selectionInactiveBackground": "#eae8e8" } }, "window": "#FAFAFA", @@ -862,7 +955,7 @@ }, "icons": { "ColorPalette": { - "#43494A": "#EEEEEE", + "#43494A": "#F4F4F4", "#6B6B6B": "#94A7B0", "#A7A7A7": "#FAFAFA", "#3D6185": "#00BCD4", @@ -879,10 +972,10 @@ "Actions.GreyInline.Dark": "#546E7A", "Actions.Red": "#E53935", "Actions.Yellow": "#F6A434", - "Checkbox.Background.Default": "#EEEEEE", - "Checkbox.Background.Default.Dark": "#EEEEEE", - "Checkbox.Background.Disabled": "#CCD7DA", - "Checkbox.Background.Disabled.Dark": "#CCD7DA", + "Checkbox.Background.Default": "#F4F4F4", + "Checkbox.Background.Default.Dark": "#F4F4F4", + "Checkbox.Background.Disabled": "#eae8e8", + "Checkbox.Background.Disabled.Dark": "#eae8e8", "Checkbox.Border.Default": "#d3e1e8", "Checkbox.Border.Default.Dark": "#d3e1e8", "Checkbox.Border.Disabled": "#D2D4D5", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic Contrast.theme.json index 9e8d0483..18d32596 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic Contrast.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Oceanic.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/oceanic.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#607D8B", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#2A373E", "Tooltip.background": "#1E272C" }, - "Content.background": "#1E272C", + "Content": { + "background": "#1E272C", + "selectionBackground": "#546E7A" + }, "CheckBox": { "background": "#263238", "disabledText": "#415967", @@ -89,6 +98,14 @@ "selectionBackground": "#546E7A", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#B0BEC5", + "AccessEnabled": { + "accessDot": "#009688", + "dropdownBorder": "#32424A", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#263238", "foreground": "#B0BEC5", @@ -104,6 +121,7 @@ }, "background": "#1E272C", "buttonBackground": "#2E3C43", + "darcula.hoveredArrowButtonForeground": "#009688", "disabledForeground": "#415967", "foreground": "#B0BEC5", "modifiedItemForeground": "#009688", @@ -168,11 +186,13 @@ "hoverBackground": "#314549", "hoverColor": "#1E272C", "hoverMaskColor": "#425B67", + "inactiveColoredTabBackground": "#263238", "inactiveColoredFileBackground": "#2E3C43", - "inactiveUnderlineColor": "#415967", + "inactiveUnderlineColor": "#009688", "inactiveMaskColor": "#1E272C", "underlineColor": "#009688", - "underlinedTabBackground": "#314549" + "underlinedTabBackground": "#314549", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#263238", "DialogWrapper.southPanelBackground": "#263238", @@ -198,15 +218,17 @@ }, "EditorTabs": { "borderColor": "#32424A", + "hoverBackground": "#425B67", "hoverColor": "#425B67", "hoverMaskColor": "#425B67", "inactiveMaskColor": "#263238", - "inactiveColoredFileBackground": "#2632382", + "inactiveColoredFileBackground": "#263238", "inactiveUnderlineColor": "#415967", "selectedForeground": "#B0BEC5", "selectedBackground": "#314549", "underlineColor": "#009688", - "underlinedTabBackground": "#314549" + "underlinedTabBackground": "#314549", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#263238", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#314549" }, + "GotItTooltip.borderColor": "#1E272C", "Group": { "disabledSeparatorColor": "#2A373E", "separatorColor": "#2A373E" }, "GutterTooltip": { - "infoForeground": "#B0BEC5", + "infoForeground": "#607D8B", "lineSeparatorColor": "#263238" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#415967", "foreground": "#B0BEC5", "infoForeground": "#607D8B", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#B0BEC5" }, "Link": { "activeForeground": "#009688", @@ -301,10 +325,12 @@ "List": { "background": "#32424A", "foreground": "#B0BEC5", + "hoverBackground": "#546E7A70", + "hoverInactiveBackground": "#314549", "selectionBackground": "#546E7A50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#546E7A50" + "selectionInactiveBackground": "#546E7A70" }, "material": { "background": "#263238", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#32424A", "borderColor": "#314549", - "currentOverloadBackground": "#314549", + "currentOverloadBackground": "#425B67", "currentParameterForeground": "#009688", "disabledForeground": "#415967", "foreground": "#B0BEC5", @@ -429,7 +455,8 @@ "background": "#263238", "disabledForeground": "#415967", "eapTagBackground": "#425B67", - "lightSelectionBackground": "#546E7A", + "hoverBackground": "#546E7A70", + "lightSelectionBackground": "#314549", "paidTagBackground": "#425B67", "selectionBackground": "#546E7A", "tagForeground": "#009688", @@ -442,7 +469,7 @@ "installFocusedBackground": "#425B67", "installFillForeground": "#415967", "installFillBackground": "#2E3C43", - "updateBackground": "#2E3C43", + "updateBackground": "#009688", "updateBorderColor": "#2E3C43", "updateForeground": "#B0BEC5" }, @@ -517,6 +544,7 @@ "selectionBackground": "#546E7A", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#2A373E", "ScrollBar": { "background": "#263238", "hoverThumbBorderColor": "#009688", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#009688", - "startBackground": "#009688" + "startBackground": "#009688", + "endColor": "#009688", + "startColor": "#009688" }, "SearchField.errorBackground": "#1E272C", + "SearchOption": { + "selectedBackground": "#314549" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#607D8B", + "Repeated.File.Foreground": "#B0BEC5" + }, "Separator": { "background": "#32424A", "foreground": "#32424A", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#32424A", "StatusBar": { - "borderColor": "#263238" + "borderColor": "#263238", + "hoverBackground": "#425B67", + "LightEditBackground": "#314549" }, "TabbedPane": { "background": "#263238", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#1E272C", "Table": { + "alternativeRowBackground": "#1E272C", "background": "#263238", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#415967", "dropLineColor": "#009688", "dropLineShortColor": "#009688", "focusCellBackground": "#314549", @@ -653,6 +694,8 @@ "foreground": "#B0BEC5", "gridColor": "#263238", "highlightOuter": "#314549", + "hoverBackground": "#546E7A70", + "hoverInactiveBackground": "#314549", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#607D8B", "lightSelectionInactiveBackground": "#32424A", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#263238", "Actions.infoForeground": "#607D8B", - "background": "#263238", - "borderColor": "#425B67", + "background": "#1E272C", + "borderColor": "#2A373E", "foreground": "#B0BEC5", "infoForeground": "#607D8B", "separatorColor": "#2A373E", @@ -751,50 +794,93 @@ "background": "#263238" }, "HeaderTab": { + "borderColor": "#425B67", "hoverBackground": "#425B67", - "hoverInactiveBackground": "#32424A", + "hoverInactiveBackground": "#425B67", "inactiveUnderlineColor": "#009688", "selectedBackground": "#1E272C", "selectedInactiveBackground": "#1E272C", "underlineColor": "#009688", - "underlinedTabBackground": "#425B67", - "underlinedTabInactiveBackground": "#32424A" + "underlinedTabBackground": "#314549", + "underlinedTabInactiveBackground": "#32424A", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#B0BEC5" } }, "Tree": { "background": "#1E272C", "foreground": "#607D8B", "hash": "#2A373E", + "hoverBackground": "#546E7A70", + "hoverInactiveBackground": "#314549", "modifiedItemForeground": "#009688", "rowHeight": 28, - "selectionBackground": "#546E7A50", + "selectionBackground": "#546E7A70", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#546E7A50", + "selectionInactiveBackground": "#546E7A70", "textBackground": "#1E272C" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#2A373E", - "ColorPicker.background": "#263238", - "ColorPicker.foreground": "#B0BEC5", - "Component.borderColor": "#2A373E", - "Component.background": "#263238", - "Component.foreground": "#B0BEC5", - "Connector.borderColor": "#2A373E", - "Connector.hoverBorderColor": "#425B67", + "Canvas.background": "#1E272C", + "ColorPicker": { + "background": "#263238", + "foreground": "#B0BEC5" + }, + "Component": { + "borderColor": "#2A373E", + "background": "#263238", + "foreground": "#B0BEC5", + "hoverBorderColor": "#425B67" + }, + "Connector": { + "borderColor": "#2A373E", + "hoverBorderColor": "#425B67" + }, "Canvas.background": "#1E272C", "highStroke.foreground": "#B0BEC5", "Label.foreground": "#607D8B", - "List.selectionBackground": "#546E7A50", - "Panel.borderColor": "#2A373E", - "Panel.background": "#263238", + "List.selectionBackground": "#546E7A70", + "motion": { + "borderColor": "#2A373E", + "Component.foreground": "#B0BEC5", + "ConstraintSetText.foreground": "#607D8B", + "ConstraintSet.background": "#32424A", + "CSPanel.SelectedFocusBackground": "#546E7A", + "CSPanel.SelectedBackground": "#546E7A70", + "cs_FocusText.infoForeground": "#607D8B", + "CursorTextColor.foreground": "#B0BEC5", + "HoverColor.disabledBackground": "#415967", + "motionGraph.background": "#263238", + "Notification.background": "#1E272C", + "ourAvg.background": "#32424A", + "ourCS.background": "#32424A", + "ourCS_Border.borderColor": "#2A373E", + "ourCS_TextColor.foreground": "#607D8B", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#314549", + "ourCS_SelectedBorder.pressedBorderColor": "#425B67", + "ourML_BarColor.separatorColor": "#2A373E", + "PrimaryPanel.background": "#1E272C", + "SecondaryPanel.background": "#263238", + "SecondaryPanel.header.foreground": "#607D8B", + "SecondaryPanel.header.background": "#1E272C", + "timeLine.disabledBorderColor": "#2A373E" + }, + "Panel": { + "borderColor": "#2A373E", + "background": "#263238" + }, "percent.foreground": "#B0BEC5", - "Placeholder.background": "#263238", - "Placeholder.borderColor": "#2A373E", - "Placeholder.foreground": "#B0BEC5", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#263238", + "borderColor": "#2A373E", + "foreground": "#B0BEC5", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#263238", "stroke.acceleratorForeground": "#607D8B" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#607D8B", - "Commit.currentBranchBackground": "#32424A" + "Commit.currentBranchBackground": "#32424A", + "Commit.hoveredBackground": "#546E7A70" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,16 +927,22 @@ "foreground": "#B0BEC5" }, "WelcomeScreen": { + "AssociatedComponent.background": "#263238", "background": "#263238", "borderColor": "#263238", "captionBackground": "#1E272C", "captionForeground": "#B0BEC5", + "Details.background": "#263238", "footerBackground": "#1E272C", "footerForeground": "#B0BEC5", "headerBackground": "#263238", "headerForeground": "#B0BEC5", + "List.background": "#1E272C", "separatorColor": "#2A373E", + "SidePanel.background": "#32424A", "Projects": { + "actions.background": "#1E272C", + "actions.selectionBackground": "#425B67", "background": "#32424A", "selectionBackground": "#546E7A", "selectionInactiveBackground": "#32424A" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic.theme.json index 40f47454..282c2029 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Oceanic.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Oceanic.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/oceanic.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#607D8B", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#2A373E", "Tooltip.background": "#1E272C" }, - "Content.background": "#1E272C", + "Content": { + "background": "#1E272C", + "selectionBackground": "#546E7A" + }, "CheckBox": { "background": "#263238", "disabledText": "#415967", @@ -89,6 +98,14 @@ "selectionBackground": "#546E7A", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#B0BEC5", + "AccessEnabled": { + "accessDot": "#009688", + "dropdownBorder": "#32424A", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#263238", "foreground": "#B0BEC5", @@ -104,6 +121,7 @@ }, "background": "#263238", "buttonBackground": "#2E3C43", + "darcula.hoveredArrowButtonForeground": "#009688", "disabledForeground": "#415967", "foreground": "#B0BEC5", "modifiedItemForeground": "#009688", @@ -168,11 +186,13 @@ "hoverBackground": "#314549", "hoverColor": "#263238", "hoverMaskColor": "#425B67", + "inactiveColoredTabBackground": "#263238", "inactiveColoredFileBackground": "#2E3C43", - "inactiveUnderlineColor": "#415967", + "inactiveUnderlineColor": "#009688", "inactiveMaskColor": "#263238", "underlineColor": "#009688", - "underlinedTabBackground": "#314549" + "underlinedTabBackground": "#314549", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#263238", "DialogWrapper.southPanelBackground": "#263238", @@ -198,15 +218,17 @@ }, "EditorTabs": { "borderColor": "#32424A", + "hoverBackground": "#425B67", "hoverColor": "#425B67", "hoverMaskColor": "#425B67", "inactiveMaskColor": "#263238", - "inactiveColoredFileBackground": "#2632382", + "inactiveColoredFileBackground": "#263238", "inactiveUnderlineColor": "#415967", "selectedForeground": "#B0BEC5", "selectedBackground": "#314549", "underlineColor": "#009688", - "underlinedTabBackground": "#314549" + "underlinedTabBackground": "#314549", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#263238", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#314549" }, + "GotItTooltip.borderColor": "#1E272C", "Group": { "disabledSeparatorColor": "#2A373E", "separatorColor": "#2A373E" }, "GutterTooltip": { - "infoForeground": "#B0BEC5", + "infoForeground": "#607D8B", "lineSeparatorColor": "#263238" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#415967", "foreground": "#B0BEC5", "infoForeground": "#607D8B", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#B0BEC5" }, "Link": { "activeForeground": "#009688", @@ -301,10 +325,12 @@ "List": { "background": "#32424A", "foreground": "#B0BEC5", + "hoverBackground": "#546E7A70", + "hoverInactiveBackground": "#314549", "selectionBackground": "#546E7A50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#546E7A50" + "selectionInactiveBackground": "#546E7A70" }, "material": { "background": "#263238", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#32424A", "borderColor": "#314549", - "currentOverloadBackground": "#314549", + "currentOverloadBackground": "#425B67", "currentParameterForeground": "#009688", "disabledForeground": "#415967", "foreground": "#B0BEC5", @@ -429,7 +455,8 @@ "background": "#263238", "disabledForeground": "#415967", "eapTagBackground": "#425B67", - "lightSelectionBackground": "#546E7A", + "hoverBackground": "#546E7A70", + "lightSelectionBackground": "#314549", "paidTagBackground": "#425B67", "selectionBackground": "#546E7A", "tagForeground": "#009688", @@ -442,7 +469,7 @@ "installFocusedBackground": "#425B67", "installFillForeground": "#415967", "installFillBackground": "#2E3C43", - "updateBackground": "#2E3C43", + "updateBackground": "#009688", "updateBorderColor": "#2E3C43", "updateForeground": "#B0BEC5" }, @@ -517,6 +544,7 @@ "selectionBackground": "#546E7A", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#2A373E", "ScrollBar": { "background": "#263238", "hoverThumbBorderColor": "#009688", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#009688", - "startBackground": "#009688" + "startBackground": "#009688", + "endColor": "#009688", + "startColor": "#009688" }, "SearchField.errorBackground": "#1E272C", + "SearchOption": { + "selectedBackground": "#314549" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#607D8B", + "Repeated.File.Foreground": "#B0BEC5" + }, "Separator": { "background": "#32424A", "foreground": "#32424A", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#32424A", "StatusBar": { - "borderColor": "#263238" + "borderColor": "#263238", + "hoverBackground": "#425B67", + "LightEditBackground": "#314549" }, "TabbedPane": { "background": "#263238", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#263238", "Table": { + "alternativeRowBackground": "#1E272C", "background": "#263238", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#415967", "dropLineColor": "#009688", "dropLineShortColor": "#009688", "focusCellBackground": "#314549", @@ -653,6 +694,8 @@ "foreground": "#B0BEC5", "gridColor": "#263238", "highlightOuter": "#314549", + "hoverBackground": "#546E7A70", + "hoverInactiveBackground": "#314549", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#607D8B", "lightSelectionInactiveBackground": "#32424A", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#263238", "Actions.infoForeground": "#607D8B", - "background": "#263238", - "borderColor": "#425B67", + "background": "#1E272C", + "borderColor": "#2A373E", "foreground": "#B0BEC5", "infoForeground": "#607D8B", "separatorColor": "#2A373E", @@ -751,50 +794,93 @@ "background": "#263238" }, "HeaderTab": { + "borderColor": "#425B67", "hoverBackground": "#425B67", - "hoverInactiveBackground": "#32424A", + "hoverInactiveBackground": "#425B67", "inactiveUnderlineColor": "#009688", "selectedBackground": "#1E272C", "selectedInactiveBackground": "#1E272C", "underlineColor": "#009688", - "underlinedTabBackground": "#425B67", - "underlinedTabInactiveBackground": "#32424A" + "underlinedTabBackground": "#314549", + "underlinedTabInactiveBackground": "#32424A", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#B0BEC5" } }, "Tree": { "background": "#263238", "foreground": "#607D8B", "hash": "#2A373E", + "hoverBackground": "#546E7A70", + "hoverInactiveBackground": "#314549", "modifiedItemForeground": "#009688", "rowHeight": 28, - "selectionBackground": "#546E7A50", + "selectionBackground": "#546E7A70", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#546E7A50", + "selectionInactiveBackground": "#546E7A70", "textBackground": "#263238" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#2A373E", - "ColorPicker.background": "#263238", - "ColorPicker.foreground": "#B0BEC5", - "Component.borderColor": "#2A373E", - "Component.background": "#263238", - "Component.foreground": "#B0BEC5", - "Connector.borderColor": "#2A373E", - "Connector.hoverBorderColor": "#425B67", + "Canvas.background": "#1E272C", + "ColorPicker": { + "background": "#263238", + "foreground": "#B0BEC5" + }, + "Component": { + "borderColor": "#2A373E", + "background": "#263238", + "foreground": "#B0BEC5", + "hoverBorderColor": "#425B67" + }, + "Connector": { + "borderColor": "#2A373E", + "hoverBorderColor": "#425B67" + }, "Canvas.background": "#1E272C", "highStroke.foreground": "#B0BEC5", "Label.foreground": "#607D8B", - "List.selectionBackground": "#546E7A50", - "Panel.borderColor": "#2A373E", - "Panel.background": "#263238", + "List.selectionBackground": "#546E7A70", + "motion": { + "borderColor": "#2A373E", + "Component.foreground": "#B0BEC5", + "ConstraintSetText.foreground": "#607D8B", + "ConstraintSet.background": "#32424A", + "CSPanel.SelectedFocusBackground": "#546E7A", + "CSPanel.SelectedBackground": "#546E7A70", + "cs_FocusText.infoForeground": "#607D8B", + "CursorTextColor.foreground": "#B0BEC5", + "HoverColor.disabledBackground": "#415967", + "motionGraph.background": "#263238", + "Notification.background": "#1E272C", + "ourAvg.background": "#32424A", + "ourCS.background": "#32424A", + "ourCS_Border.borderColor": "#2A373E", + "ourCS_TextColor.foreground": "#607D8B", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#314549", + "ourCS_SelectedBorder.pressedBorderColor": "#425B67", + "ourML_BarColor.separatorColor": "#2A373E", + "PrimaryPanel.background": "#1E272C", + "SecondaryPanel.background": "#263238", + "SecondaryPanel.header.foreground": "#607D8B", + "SecondaryPanel.header.background": "#1E272C", + "timeLine.disabledBorderColor": "#2A373E" + }, + "Panel": { + "borderColor": "#2A373E", + "background": "#263238" + }, "percent.foreground": "#B0BEC5", - "Placeholder.background": "#263238", - "Placeholder.borderColor": "#2A373E", - "Placeholder.foreground": "#B0BEC5", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#263238", + "borderColor": "#2A373E", + "foreground": "#B0BEC5", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#263238", "stroke.acceleratorForeground": "#607D8B" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#607D8B", - "Commit.currentBranchBackground": "#32424A" + "Commit.currentBranchBackground": "#32424A", + "Commit.hoveredBackground": "#546E7A70" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,16 +927,22 @@ "foreground": "#B0BEC5" }, "WelcomeScreen": { + "AssociatedComponent.background": "#263238", "background": "#263238", "borderColor": "#263238", "captionBackground": "#1E272C", "captionForeground": "#B0BEC5", + "Details.background": "#263238", "footerBackground": "#1E272C", "footerForeground": "#B0BEC5", "headerBackground": "#263238", "headerForeground": "#B0BEC5", + "List.background": "#1E272C", "separatorColor": "#2A373E", + "SidePanel.background": "#32424A", "Projects": { + "actions.background": "#1E272C", + "actions.selectionBackground": "#425B67", "background": "#32424A", "selectionBackground": "#546E7A", "selectionInactiveBackground": "#32424A" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight Contrast.theme.json index d08262df..53cc05eb 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight Contrast.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Palenight.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/palenight.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#676E95", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#2b2a3e", "Tooltip.background": "#202331" }, - "Content.background": "#202331", + "Content": { + "background": "#202331", + "selectionBackground": "#3C435E" + }, "CheckBox": { "background": "#292D3E", "disabledText": "#515772", @@ -89,6 +98,14 @@ "selectionBackground": "#3C435E", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#A6ACCD", + "AccessEnabled": { + "accessDot": "#ab47bc", + "dropdownBorder": "#34324a", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#292D3E", "foreground": "#A6ACCD", @@ -104,6 +121,7 @@ }, "background": "#202331", "buttonBackground": "#303348", + "darcula.hoveredArrowButtonForeground": "#ab47bc", "disabledForeground": "#515772", "foreground": "#A6ACCD", "modifiedItemForeground": "#ab47bc", @@ -168,11 +186,13 @@ "hoverBackground": "#414863", "hoverColor": "#202331", "hoverMaskColor": "#444267", + "inactiveColoredTabBackground": "#292D3E", "inactiveColoredFileBackground": "#303348", - "inactiveUnderlineColor": "#515772", + "inactiveUnderlineColor": "#ab47bc", "inactiveMaskColor": "#202331", "underlineColor": "#ab47bc", - "underlinedTabBackground": "#414863" + "underlinedTabBackground": "#414863", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#292D3E", "DialogWrapper.southPanelBackground": "#292D3E", @@ -198,15 +218,17 @@ }, "EditorTabs": { "borderColor": "#34324a", + "hoverBackground": "#444267", "hoverColor": "#444267", "hoverMaskColor": "#444267", "inactiveMaskColor": "#292D3E", - "inactiveColoredFileBackground": "#292D3E2", + "inactiveColoredFileBackground": "#292D3E", "inactiveUnderlineColor": "#515772", "selectedForeground": "#A6ACCD", "selectedBackground": "#414863", "underlineColor": "#ab47bc", - "underlinedTabBackground": "#414863" + "underlinedTabBackground": "#414863", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#292D3E", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#414863" }, + "GotItTooltip.borderColor": "#202331", "Group": { "disabledSeparatorColor": "#2b2a3e", "separatorColor": "#2b2a3e" }, "GutterTooltip": { - "infoForeground": "#A6ACCD", + "infoForeground": "#676E95", "lineSeparatorColor": "#292D3E" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#515772", "foreground": "#A6ACCD", "infoForeground": "#676E95", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#A6ACCD" }, "Link": { "activeForeground": "#ab47bc", @@ -301,10 +325,12 @@ "List": { "background": "#34324a", "foreground": "#A6ACCD", + "hoverBackground": "#676E9570", + "hoverInactiveBackground": "#414863", "selectionBackground": "#3C435E50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#676E9550" + "selectionInactiveBackground": "#676E9570" }, "material": { "background": "#292D3E", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#34324a", "borderColor": "#414863", - "currentOverloadBackground": "#414863", + "currentOverloadBackground": "#444267", "currentParameterForeground": "#ab47bc", "disabledForeground": "#515772", "foreground": "#A6ACCD", @@ -429,7 +455,8 @@ "background": "#292D3E", "disabledForeground": "#515772", "eapTagBackground": "#444267", - "lightSelectionBackground": "#3C435E", + "hoverBackground": "#676E9570", + "lightSelectionBackground": "#414863", "paidTagBackground": "#444267", "selectionBackground": "#3C435E", "tagForeground": "#ab47bc", @@ -442,7 +469,7 @@ "installFocusedBackground": "#444267", "installFillForeground": "#515772", "installFillBackground": "#303348", - "updateBackground": "#303348", + "updateBackground": "#ab47bc", "updateBorderColor": "#303348", "updateForeground": "#A6ACCD" }, @@ -517,6 +544,7 @@ "selectionBackground": "#3C435E", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#2b2a3e", "ScrollBar": { "background": "#292D3E", "hoverThumbBorderColor": "#ab47bc", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#ab47bc", - "startBackground": "#ab47bc" + "startBackground": "#ab47bc", + "endColor": "#ab47bc", + "startColor": "#ab47bc" }, "SearchField.errorBackground": "#202331", + "SearchOption": { + "selectedBackground": "#414863" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#676E95", + "Repeated.File.Foreground": "#A6ACCD" + }, "Separator": { "background": "#34324a", "foreground": "#34324a", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#34324a", "StatusBar": { - "borderColor": "#292D3E" + "borderColor": "#292D3E", + "hoverBackground": "#444267", + "LightEditBackground": "#414863" }, "TabbedPane": { "background": "#292D3E", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#202331", "Table": { + "alternativeRowBackground": "#202331", "background": "#292D3E", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#515772", "dropLineColor": "#ab47bc", "dropLineShortColor": "#ab47bc", "focusCellBackground": "#414863", @@ -653,6 +694,8 @@ "foreground": "#A6ACCD", "gridColor": "#292D3E", "highlightOuter": "#414863", + "hoverBackground": "#676E9570", + "hoverInactiveBackground": "#414863", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#676E95", "lightSelectionInactiveBackground": "#34324a", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#292D3E", "Actions.infoForeground": "#676E95", - "background": "#292D3E", - "borderColor": "#444267", + "background": "#202331", + "borderColor": "#2b2a3e", "foreground": "#A6ACCD", "infoForeground": "#676E95", "separatorColor": "#2b2a3e", @@ -751,50 +794,93 @@ "background": "#292D3E" }, "HeaderTab": { + "borderColor": "#444267", "hoverBackground": "#444267", - "hoverInactiveBackground": "#34324a", + "hoverInactiveBackground": "#444267", "inactiveUnderlineColor": "#ab47bc", "selectedBackground": "#202331", "selectedInactiveBackground": "#202331", "underlineColor": "#ab47bc", - "underlinedTabBackground": "#444267", - "underlinedTabInactiveBackground": "#34324a" + "underlinedTabBackground": "#414863", + "underlinedTabInactiveBackground": "#34324a", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#A6ACCD" } }, "Tree": { "background": "#202331", "foreground": "#676E95", "hash": "#2b2a3e", + "hoverBackground": "#676E9570", + "hoverInactiveBackground": "#414863", "modifiedItemForeground": "#ab47bc", "rowHeight": 28, - "selectionBackground": "#676E9550", + "selectionBackground": "#676E9570", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#676E9550", + "selectionInactiveBackground": "#676E9570", "textBackground": "#202331" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#2b2a3e", - "ColorPicker.background": "#292D3E", - "ColorPicker.foreground": "#A6ACCD", - "Component.borderColor": "#2b2a3e", - "Component.background": "#292D3E", - "Component.foreground": "#A6ACCD", - "Connector.borderColor": "#2b2a3e", - "Connector.hoverBorderColor": "#444267", + "Canvas.background": "#202331", + "ColorPicker": { + "background": "#292D3E", + "foreground": "#A6ACCD" + }, + "Component": { + "borderColor": "#2b2a3e", + "background": "#292D3E", + "foreground": "#A6ACCD", + "hoverBorderColor": "#444267" + }, + "Connector": { + "borderColor": "#2b2a3e", + "hoverBorderColor": "#444267" + }, "Canvas.background": "#202331", "highStroke.foreground": "#A6ACCD", "Label.foreground": "#676E95", - "List.selectionBackground": "#676E9550", - "Panel.borderColor": "#2b2a3e", - "Panel.background": "#292D3E", + "List.selectionBackground": "#676E9570", + "motion": { + "borderColor": "#2b2a3e", + "Component.foreground": "#A6ACCD", + "ConstraintSetText.foreground": "#676E95", + "ConstraintSet.background": "#34324a", + "CSPanel.SelectedFocusBackground": "#3C435E", + "CSPanel.SelectedBackground": "#676E9570", + "cs_FocusText.infoForeground": "#676E95", + "CursorTextColor.foreground": "#A6ACCD", + "HoverColor.disabledBackground": "#515772", + "motionGraph.background": "#292D3E", + "Notification.background": "#202331", + "ourAvg.background": "#34324a", + "ourCS.background": "#34324a", + "ourCS_Border.borderColor": "#2b2a3e", + "ourCS_TextColor.foreground": "#676E95", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#414863", + "ourCS_SelectedBorder.pressedBorderColor": "#444267", + "ourML_BarColor.separatorColor": "#2b2a3e", + "PrimaryPanel.background": "#202331", + "SecondaryPanel.background": "#292D3E", + "SecondaryPanel.header.foreground": "#676E95", + "SecondaryPanel.header.background": "#202331", + "timeLine.disabledBorderColor": "#2b2a3e" + }, + "Panel": { + "borderColor": "#2b2a3e", + "background": "#292D3E" + }, "percent.foreground": "#A6ACCD", - "Placeholder.background": "#292D3E", - "Placeholder.borderColor": "#2b2a3e", - "Placeholder.foreground": "#A6ACCD", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#292D3E", + "borderColor": "#2b2a3e", + "foreground": "#A6ACCD", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#292D3E", "stroke.acceleratorForeground": "#676E95" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#676E95", - "Commit.currentBranchBackground": "#34324a" + "Commit.currentBranchBackground": "#34324a", + "Commit.hoveredBackground": "#676E9570" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,16 +927,22 @@ "foreground": "#A6ACCD" }, "WelcomeScreen": { + "AssociatedComponent.background": "#292D3E", "background": "#292D3E", "borderColor": "#292D3E", "captionBackground": "#202331", "captionForeground": "#A6ACCD", + "Details.background": "#292D3E", "footerBackground": "#202331", "footerForeground": "#A6ACCD", "headerBackground": "#292D3E", "headerForeground": "#A6ACCD", + "List.background": "#202331", "separatorColor": "#2b2a3e", + "SidePanel.background": "#34324a", "Projects": { + "actions.background": "#202331", + "actions.selectionBackground": "#444267", "background": "#34324a", "selectionBackground": "#3C435E", "selectionInactiveBackground": "#34324a" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight.theme.json index bf0aec6f..f2713f13 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Material Palenight.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Material Palenight.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/palenight.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#676E95", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#2b2a3e", "Tooltip.background": "#202331" }, - "Content.background": "#202331", + "Content": { + "background": "#202331", + "selectionBackground": "#3C435E" + }, "CheckBox": { "background": "#292D3E", "disabledText": "#515772", @@ -89,6 +98,14 @@ "selectionBackground": "#3C435E", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#A6ACCD", + "AccessEnabled": { + "accessDot": "#ab47bc", + "dropdownBorder": "#34324a", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#292D3E", "foreground": "#A6ACCD", @@ -104,6 +121,7 @@ }, "background": "#292D3E", "buttonBackground": "#303348", + "darcula.hoveredArrowButtonForeground": "#ab47bc", "disabledForeground": "#515772", "foreground": "#A6ACCD", "modifiedItemForeground": "#ab47bc", @@ -168,11 +186,13 @@ "hoverBackground": "#414863", "hoverColor": "#292D3E", "hoverMaskColor": "#444267", + "inactiveColoredTabBackground": "#292D3E", "inactiveColoredFileBackground": "#303348", - "inactiveUnderlineColor": "#515772", + "inactiveUnderlineColor": "#ab47bc", "inactiveMaskColor": "#292D3E", "underlineColor": "#ab47bc", - "underlinedTabBackground": "#414863" + "underlinedTabBackground": "#414863", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#292D3E", "DialogWrapper.southPanelBackground": "#292D3E", @@ -198,15 +218,17 @@ }, "EditorTabs": { "borderColor": "#34324a", + "hoverBackground": "#444267", "hoverColor": "#444267", "hoverMaskColor": "#444267", "inactiveMaskColor": "#292D3E", - "inactiveColoredFileBackground": "#292D3E2", + "inactiveColoredFileBackground": "#292D3E", "inactiveUnderlineColor": "#515772", "selectedForeground": "#A6ACCD", "selectedBackground": "#414863", "underlineColor": "#ab47bc", - "underlinedTabBackground": "#414863" + "underlinedTabBackground": "#414863", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#292D3E", @@ -246,12 +268,13 @@ "selectionForeground": "#FFFFFF", "selectionBackground": "#414863" }, + "GotItTooltip.borderColor": "#202331", "Group": { "disabledSeparatorColor": "#2b2a3e", "separatorColor": "#2b2a3e" }, "GutterTooltip": { - "infoForeground": "#A6ACCD", + "infoForeground": "#676E95", "lineSeparatorColor": "#292D3E" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#515772", "foreground": "#A6ACCD", "infoForeground": "#676E95", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#A6ACCD" }, "Link": { "activeForeground": "#ab47bc", @@ -301,10 +325,12 @@ "List": { "background": "#34324a", "foreground": "#A6ACCD", + "hoverBackground": "#676E9570", + "hoverInactiveBackground": "#414863", "selectionBackground": "#3C435E50", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#676E9550" + "selectionInactiveBackground": "#676E9570" }, "material": { "background": "#292D3E", @@ -409,7 +435,7 @@ "ParameterInfo": { "background": "#34324a", "borderColor": "#414863", - "currentOverloadBackground": "#414863", + "currentOverloadBackground": "#444267", "currentParameterForeground": "#ab47bc", "disabledForeground": "#515772", "foreground": "#A6ACCD", @@ -429,7 +455,8 @@ "background": "#292D3E", "disabledForeground": "#515772", "eapTagBackground": "#444267", - "lightSelectionBackground": "#3C435E", + "hoverBackground": "#676E9570", + "lightSelectionBackground": "#414863", "paidTagBackground": "#444267", "selectionBackground": "#3C435E", "tagForeground": "#ab47bc", @@ -442,7 +469,7 @@ "installFocusedBackground": "#444267", "installFillForeground": "#515772", "installFillBackground": "#303348", - "updateBackground": "#303348", + "updateBackground": "#ab47bc", "updateBorderColor": "#303348", "updateForeground": "#A6ACCD" }, @@ -517,6 +544,7 @@ "selectionBackground": "#3C435E", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#2b2a3e", "ScrollBar": { "background": "#292D3E", "hoverThumbBorderColor": "#ab47bc", @@ -576,9 +604,18 @@ }, "SearchMatch": { "endBackground": "#ab47bc", - "startBackground": "#ab47bc" + "startBackground": "#ab47bc", + "endColor": "#ab47bc", + "startColor": "#ab47bc" }, "SearchField.errorBackground": "#202331", + "SearchOption": { + "selectedBackground": "#414863" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#676E95", + "Repeated.File.Foreground": "#A6ACCD" + }, "Separator": { "background": "#34324a", "foreground": "#34324a", @@ -616,7 +653,9 @@ }, "SplitPaneDivider.draggingColor": "#34324a", "StatusBar": { - "borderColor": "#292D3E" + "borderColor": "#292D3E", + "hoverBackground": "#444267", + "LightEditBackground": "#414863" }, "TabbedPane": { "background": "#292D3E", @@ -643,9 +682,11 @@ }, "TabbedPane.mt.tab.background": "#292D3E", "Table": { + "alternativeRowBackground": "#202331", "background": "#292D3E", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#515772", "dropLineColor": "#ab47bc", "dropLineShortColor": "#ab47bc", "focusCellBackground": "#414863", @@ -653,6 +694,8 @@ "foreground": "#A6ACCD", "gridColor": "#292D3E", "highlightOuter": "#414863", + "hoverBackground": "#676E9570", + "hoverInactiveBackground": "#414863", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#676E95", "lightSelectionInactiveBackground": "#34324a", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#292D3E", "Actions.infoForeground": "#676E95", - "background": "#292D3E", - "borderColor": "#444267", + "background": "#202331", + "borderColor": "#2b2a3e", "foreground": "#A6ACCD", "infoForeground": "#676E95", "separatorColor": "#2b2a3e", @@ -751,50 +794,93 @@ "background": "#292D3E" }, "HeaderTab": { + "borderColor": "#444267", "hoverBackground": "#444267", - "hoverInactiveBackground": "#34324a", + "hoverInactiveBackground": "#444267", "inactiveUnderlineColor": "#ab47bc", "selectedBackground": "#202331", "selectedInactiveBackground": "#202331", "underlineColor": "#ab47bc", - "underlinedTabBackground": "#444267", - "underlinedTabInactiveBackground": "#34324a" + "underlinedTabBackground": "#414863", + "underlinedTabInactiveBackground": "#34324a", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#A6ACCD" } }, "Tree": { "background": "#292D3E", "foreground": "#676E95", "hash": "#2b2a3e", + "hoverBackground": "#676E9570", + "hoverInactiveBackground": "#414863", "modifiedItemForeground": "#ab47bc", "rowHeight": 28, - "selectionBackground": "#676E9550", + "selectionBackground": "#676E9570", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#676E9550", + "selectionInactiveBackground": "#676E9570", "textBackground": "#292D3E" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#2b2a3e", - "ColorPicker.background": "#292D3E", - "ColorPicker.foreground": "#A6ACCD", - "Component.borderColor": "#2b2a3e", - "Component.background": "#292D3E", - "Component.foreground": "#A6ACCD", - "Connector.borderColor": "#2b2a3e", - "Connector.hoverBorderColor": "#444267", + "Canvas.background": "#202331", + "ColorPicker": { + "background": "#292D3E", + "foreground": "#A6ACCD" + }, + "Component": { + "borderColor": "#2b2a3e", + "background": "#292D3E", + "foreground": "#A6ACCD", + "hoverBorderColor": "#444267" + }, + "Connector": { + "borderColor": "#2b2a3e", + "hoverBorderColor": "#444267" + }, "Canvas.background": "#202331", "highStroke.foreground": "#A6ACCD", "Label.foreground": "#676E95", - "List.selectionBackground": "#676E9550", - "Panel.borderColor": "#2b2a3e", - "Panel.background": "#292D3E", + "List.selectionBackground": "#676E9570", + "motion": { + "borderColor": "#2b2a3e", + "Component.foreground": "#A6ACCD", + "ConstraintSetText.foreground": "#676E95", + "ConstraintSet.background": "#34324a", + "CSPanel.SelectedFocusBackground": "#3C435E", + "CSPanel.SelectedBackground": "#676E9570", + "cs_FocusText.infoForeground": "#676E95", + "CursorTextColor.foreground": "#A6ACCD", + "HoverColor.disabledBackground": "#515772", + "motionGraph.background": "#292D3E", + "Notification.background": "#202331", + "ourAvg.background": "#34324a", + "ourCS.background": "#34324a", + "ourCS_Border.borderColor": "#2b2a3e", + "ourCS_TextColor.foreground": "#676E95", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#414863", + "ourCS_SelectedBorder.pressedBorderColor": "#444267", + "ourML_BarColor.separatorColor": "#2b2a3e", + "PrimaryPanel.background": "#202331", + "SecondaryPanel.background": "#292D3E", + "SecondaryPanel.header.foreground": "#676E95", + "SecondaryPanel.header.background": "#202331", + "timeLine.disabledBorderColor": "#2b2a3e" + }, + "Panel": { + "borderColor": "#2b2a3e", + "background": "#292D3E" + }, "percent.foreground": "#A6ACCD", - "Placeholder.background": "#292D3E", - "Placeholder.borderColor": "#2b2a3e", - "Placeholder.foreground": "#A6ACCD", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#292D3E", + "borderColor": "#2b2a3e", + "foreground": "#A6ACCD", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#292D3E", "stroke.acceleratorForeground": "#676E95" }, @@ -828,7 +914,8 @@ }, "Log": { "Commit.unmatchedForeground": "#676E95", - "Commit.currentBranchBackground": "#34324a" + "Commit.currentBranchBackground": "#34324a", + "Commit.hoveredBackground": "#676E9570" }, "RefLabel": { "foreground": "#FFFFFF", @@ -840,16 +927,22 @@ "foreground": "#A6ACCD" }, "WelcomeScreen": { + "AssociatedComponent.background": "#292D3E", "background": "#292D3E", "borderColor": "#292D3E", "captionBackground": "#202331", "captionForeground": "#A6ACCD", + "Details.background": "#292D3E", "footerBackground": "#202331", "footerForeground": "#A6ACCD", "headerBackground": "#292D3E", "headerForeground": "#A6ACCD", + "List.background": "#202331", "separatorColor": "#2b2a3e", + "SidePanel.background": "#34324a", "Projects": { + "actions.background": "#202331", + "actions.selectionBackground": "#444267", "background": "#34324a", "selectionBackground": "#3C435E", "selectionInactiveBackground": "#34324a" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro Contrast.theme.json index b16896d9..f9a4b449 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro Contrast.theme.json @@ -3,21 +3,27 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Monokai Pro.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/monokai.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#939293", "background": "#2D2A2E", "borderColor": "#2d2a2e", "disabledBackground": "#3a3a3c", - "disabledForeground": "#5b595c", - "disabledText": "#5b595c", + "disabledForeground": "#727072", + "disabledText": "#727072", "focusColor": "#5b595c", "focusedBorderColor": "#ffd866", "foreground": "#fcfcfa", "inactiveBackground": "#3a3a3c", "inactiveForeground": "#939293", "infoForeground": "#939293", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionBackgroundInactive": "#403E41", "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#403E41", @@ -33,7 +39,7 @@ "pressedBorderColor": "#ffd86650" }, "Autocomplete": { - "selectionBackground": "#6E6C6F" + "selectionBackground": "#5B595C" }, "Borders.ContrastBorderColor": "#2D2A2E", "Borders.color": "#2d2a2e", @@ -43,7 +49,7 @@ "default": { "endBackground": "#4A474B", "endBorderColor": "#4A474B", - "foreground": "#ffd866", + "foreground": "#FFFFFF", "focusColor": "#ffd866", "focusedBorderColor": "#ffd866", "shadowColor": "#4A474B", @@ -51,7 +57,7 @@ "startBorderColor": "#4A474B" }, "disabledBorderColor": "#403E41", - "disabledText": "#5b595c", + "disabledText": "#727072", "endBackground": "#403E41", "endBorderColor": "#403E41", "focus": "#5b595c", @@ -72,10 +78,13 @@ "Tooltip.borderColor": "#2d2a2e", "Tooltip.background": "#363437" }, - "Content.background": "#3a3a3c", + "Content": { + "background": "#221F22", + "selectionBackground": "#5B595C" + }, "CheckBox": { "background": "#2D2A2E", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa", "select": "#ffd866" }, @@ -84,10 +93,18 @@ "acceleratorSelectionForeground": "#939293", "background": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", - "selectionForeground": "#ffd866" + "selectionBackground": "#5B595C", + "selectionForeground": "#FFFFFF" + }, + "CodeWithMe": { + "Avatar.foreground": "#fcfcfa", + "AccessEnabled": { + "accessDot": "#ffd866", + "dropdownBorder": "#403E41", + "pillBackground": "$second" + } }, "ColorChooser": { "background": "#2D2A2E", @@ -98,19 +115,20 @@ "ComboBox": { "ArrowButton": { "background": "#403E41", - "disabledIconColor": "#5b595c", + "disabledIconColor": "#727072", "iconColor": "#fcfcfa", "nonEditableBackground": "#2D2A2E" }, - "background": "#3a3a3c", + "background": "#221F22", "buttonBackground": "#403E41", - "disabledForeground": "#5b595c", + "darcula.hoveredArrowButtonForeground": "#ffd866", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "modifiedItemForeground": "#ffd866", "nonEditableBackground": "#403E41", "padding": "5,5,5,5", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "ComboPopup.border": "#2d2a2e", "CompletionPopup": { @@ -123,8 +141,8 @@ "selectedGrayedForeground": "#FFFFFF", "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#939293", - "selectionInactiveBackground": "#6E6C6F50", - "selectionBackground": "#6E6C6F80", + "selectionInactiveBackground": "#5B595C50", + "selectionBackground": "#5B595C80", "selectionForeground": "#FFFFFF", "selectionInfoForeground": "#FFFFFF" }, @@ -166,13 +184,15 @@ "background": "#2D2A2E", "borderColor": "#2D2A2E", "hoverBackground": "#4A474B", - "hoverColor": "#3a3a3c", + "hoverColor": "#221F22", "hoverMaskColor": "#5b595c", + "inactiveColoredTabBackground": "#2D2A2E", "inactiveColoredFileBackground": "#403E41", - "inactiveUnderlineColor": "#5b595c", - "inactiveMaskColor": "#3a3a3c", + "inactiveUnderlineColor": "#ffd866", + "inactiveMaskColor": "#221F22", "underlineColor": "#ffd866", - "underlinedTabBackground": "#4A474B" + "underlinedTabBackground": "#4A474B", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#2D2A2E", "DialogWrapper.southPanelBackground": "#2D2A2E", @@ -183,30 +203,32 @@ "areaForeground": "#fcfcfa" }, "Editor": { - "background": "#3a3a3c", + "background": "#221F22", "foreground": "#fcfcfa", "shortcutForeground": "#939293" }, "EditorPane": { - "background": "#3a3a3c", + "background": "#221F22", "caretForeground": "#ffd866", "foreground": "#fcfcfa", "inactiveBackground": "#2D2A2E", - "inactiveForeground": "#5b595c", - "selectionBackground": "#6E6C6F", - "selectionForeground": "#ffd866" + "inactiveForeground": "#727072", + "selectionBackground": "#5B595C", + "selectionForeground": "#FFFFFF" }, "EditorTabs": { "borderColor": "#403E41", + "hoverBackground": "#5b595c", "hoverColor": "#5b595c", "hoverMaskColor": "#5b595c", "inactiveMaskColor": "#2D2A2E", - "inactiveColoredFileBackground": "#2D2A2E2", - "inactiveUnderlineColor": "#5b595c", + "inactiveColoredFileBackground": "#2D2A2E", + "inactiveUnderlineColor": "#727072", "selectedForeground": "#fcfcfa", "selectedBackground": "#4A474B", "underlineColor": "#ffd866", - "underlinedTabBackground": "#4A474B" + "underlinedTabBackground": "#4A474B", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#2D2A2E", @@ -238,25 +260,26 @@ }, "Focus.color": "#2d2a2e", "FormattedTextField": { - "background": "#3a3a3c", + "background": "#221F22", "caretForeground": "#ffd866", "foreground": "#fcfcfa", "inactiveBackground": "#403E41", - "inactiveForeground": "#5b595c", - "selectionForeground": "#ffd866", + "inactiveForeground": "#727072", + "selectionForeground": "#FFFFFF", "selectionBackground": "#4A474B" }, + "GotItTooltip.borderColor": "#363437", "Group": { "disabledSeparatorColor": "#2d2a2e", "separatorColor": "#2d2a2e" }, "GutterTooltip": { - "infoForeground": "#fcfcfa", + "infoForeground": "#939293", "lineSeparatorColor": "#2D2A2E" }, "HeaderColor": { "active": "#2D2A2E", - "inactive": "#3a3a3c" + "inactive": "#221F22" }, "HelpTooltip": { "background": "#2D2A2E", @@ -283,12 +306,13 @@ }, "Label": { "background": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "disabledShadow": "#2D2A2E", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa", "infoForeground": "#939293", - "selectedForeground": "#ffd866" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#fcfcfa" }, "Link": { "activeForeground": "#ffd866", @@ -301,15 +325,17 @@ "List": { "background": "#403E41", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F50", + "hoverBackground": "#403E4170", + "hoverInactiveBackground": "#4A474B", + "selectionBackground": "#5B595C50", "selectionForeground": "#FFFFFF", - "selectionInactiveForeground": "#ffd866", - "selectionInactiveBackground": "#403E41" + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#403E4170" }, "material": { "background": "#2D2A2E", "branchColor": "#fcfcfa", - "contrast": "#3a3a3c", + "contrast": "#221F22", "foreground": "#fcfcfa", "mergeCommits": "#403E41", "primaryColor": "#939293", @@ -330,22 +356,22 @@ "border": "4,2,4,2", "borderColor": "#403E41", "disabledBackground": "#403E41", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF", "separatorColor": "#2d2a2e" }, "MenuBar": { - "background": "#3a3a3c", + "background": "#221F22", "borderColor": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "highlight": "#2D2A2E", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF", - "shadow": "#3a3a3c" + "shadow": "#221F22" }, "MenuItem": { "acceleratorForeground": "#939293", @@ -353,9 +379,9 @@ "border": "4,2,4,2", "background": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF" }, "NavBar": { @@ -367,7 +393,7 @@ "background": "#2D2A2E" }, "SearchField": { - "background": "#3a3a3c" + "background": "#221F22" } }, "NewPSD.warning": "#ffd866", @@ -400,7 +426,7 @@ "Outline": { "color": "#403E41", "focusedColor": "#ffd866", - "disabledColor": "#5b595c" + "disabledColor": "#727072" }, "Panel": { "background": "#2D2A2E", @@ -409,29 +435,30 @@ "ParameterInfo": { "background": "#403E41", "borderColor": "#4A474B", - "currentOverloadBackground": "#4A474B", + "currentOverloadBackground": "#5b595c", "currentParameterForeground": "#ffd866", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "infoForeground": "#939293", "lineSeparatorColor": "#4A474B" }, "PasswordField": { - "background": "#3a3a3c", + "background": "#221F22", "capsLockIconColor": "#ffd866", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "Plugins": { "background": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "eapTagBackground": "#5b595c", - "lightSelectionBackground": "#6E6C6F", + "hoverBackground": "#403E4170", + "lightSelectionBackground": "#4A474B", "paidTagBackground": "#5b595c", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "tagForeground": "#ffd866", "tagBackground": "#5b595c", "trialTagBackground": "#5b595c", @@ -440,14 +467,14 @@ "installBorderColor": "#403E41", "installForeground": "#fcfcfa", "installFocusedBackground": "#5b595c", - "installFillForeground": "#5b595c", + "installFillForeground": "#727072", "installFillBackground": "#403E41", - "updateBackground": "#403E41", + "updateBackground": "#ffd866", "updateBorderColor": "#403E41", "updateForeground": "#fcfcfa" }, "SearchField": { - "background": "#3a3a3c", + "background": "#221F22", "borderColor": "#2d2a2e" }, "SectionHeader": { @@ -466,20 +493,20 @@ "borderColor": "#2D2A2E", "foreground": "#ffd866" }, - "borderColor": "#3a3a3c", + "borderColor": "#221F22", "inactiveBorderColor": "#2D2A2E", "innerBorderColor": "#403E41", "Header": { "activeBackground": "#2D2A2E", - "inactiveBackground": "#3a3a3c" + "inactiveBackground": "#221F22" }, "paintBorder": true, "separatorForeground": "#fcfcfa", "separatorColor": "#403E41", "Toolbar": { - "Floating.background": "#3a3a3c", - "background": "#3a3a3c", - "borderColor": "#3a3a3c" + "Floating.background": "#221F22", + "background": "#221F22", + "borderColor": "#221F22" } }, "PopupMenu": { @@ -504,7 +531,7 @@ }, "RadioButton": { "background": "#2D2A2E", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa" }, "RadioButtonMenuItem": { @@ -512,11 +539,12 @@ "acceleratorSelectionForeground": "#939293", "background": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#2d2a2e", "ScrollBar": { "background": "#2D2A2E", "hoverThumbBorderColor": "#ffd866", @@ -553,7 +581,7 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#3a3a3c", + "background": "#221F22", "foreground": "#939293" }, "Header": { @@ -565,27 +593,36 @@ }, "SearchField": { "background": "#2D2A2E", - "borderColor": "#3a3a3c", + "borderColor": "#221F22", "infoForeground": "#939293" }, "Tab": { - "active.foreground": "#ffd866", - "selectedForeground": "#ffd866", + "active.foreground": "#FFFFFF", + "selectedForeground": "#FFFFFF", "selectedBackground": "#5b595c" } }, "SearchMatch": { "endBackground": "#ffd866", - "startBackground": "#ffd866" + "startBackground": "#ffd866", + "endColor": "#ffd866", + "startColor": "#ffd866" }, "SearchField.errorBackground": "#363437", + "SearchOption": { + "selectedBackground": "#4A474B" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#939293", + "Repeated.File.Foreground": "#fcfcfa" + }, "Separator": { "background": "#403E41", "foreground": "#403E41", "separatorColor": "#403E41" }, "SidePanel": { - "background": "#3a3a3c" + "background": "#221F22" }, "Slider": { "background": "#2D2A2E", @@ -608,23 +645,25 @@ "background": "#2D2A2E", "border": "3,3,3,3", "foreground": "#fcfcfa", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "SplitPane": { "background": "#2D2A2E", - "highlight": "#3a3a3c" + "highlight": "#221F22" }, "SplitPaneDivider.draggingColor": "#403E41", "StatusBar": { - "borderColor": "#2D2A2E" + "borderColor": "#2D2A2E", + "hoverBackground": "#5b595c", + "LightEditBackground": "#4A474B" }, "TabbedPane": { "background": "#2D2A2E", "contentAreaColor": "#5b595c", "contentBorderInsets": "3,1,1,1", "darkShadow": "#2d2a2e", - "disabledForeground": "#5b595c", - "disabledUnderlineColor": "#5b595c", + "disabledForeground": "#727072", + "disabledUnderlineColor": "#727072", "focus": "#4A474B", "focusColor": "#4A474B", "fontSizeOffset": 0, @@ -632,7 +671,7 @@ "highlight": "#2d2a2e", "hoverColor": "#5b595c", "labelShift": 0, - "selectedForeground": "#ffd866", + "selectedForeground": "#FFFFFF", "selectedLabelShift": 0, "selectedTabPadInsets": "0,0,0,0", "tabsOverlapBorder": true, @@ -641,37 +680,41 @@ "tabSelectionHeight": 2, "underlineColor": "#ffd866" }, - "TabbedPane.mt.tab.background": "#3a3a3c", + "TabbedPane.mt.tab.background": "#221F22", "Table": { + "alternativeRowBackground": "#221F22", "background": "#2D2A2E", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#727072", "dropLineColor": "#ffd866", "dropLineShortColor": "#ffd866", "focusCellBackground": "#4A474B", - "focusCellForeground": "#ffd866", + "focusCellForeground": "#FFFFFF", "foreground": "#fcfcfa", "gridColor": "#2D2A2E", "highlightOuter": "#4A474B", - "lightSelectionForeground": "#ffd866", + "hoverBackground": "#403E4170", + "hoverInactiveBackground": "#4A474B", + "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#939293", "lightSelectionInactiveBackground": "#403E41", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866", + "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#4A474B", "selectionInactiveForeground": "#FFFFFF", "sortIconColor": "#fcfcfa", - "stripeColor": "#3a3a3c" + "stripeColor": "#221F22" }, "TableHeader": { "background": "#2D2A2E", "borderColor": "#2D2A2E", "bottomSeparatorColor": "#403E41", "cellBorder": "4,0,4,0", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "focusCellBackground": "#4A474B", - "focusCellForeground": "#ffd866", + "focusCellForeground": "#FFFFFF", "height": 25, "separatorColor": "#403E41" }, @@ -679,31 +722,31 @@ "textInactiveText": "#939293", "textText": "#939293", "TextArea": { - "background": "#3a3a3c", + "background": "#221F22", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "TextField": { - "background": "#3a3a3c", + "background": "#221F22", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "TextPane": { - "background": "#3a3a3c", + "background": "#221F22", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "TitlePane": { - "background": "#3a3a3c", + "background": "#221F22", "Button.hoverBackground": "#5b595c", "inactiveBackground": "#2D2A2E", "infoForeground": "#939293", @@ -713,7 +756,7 @@ "ToggleButton": { "borderColor": "#403E41", "buttonColor": "#fcfcfa", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa", "offForeground": "#2D2A2E", "offBackground": "#2D2A2E", @@ -721,7 +764,7 @@ "onForeground": "#ffd866" }, "ToolBar": { - "background": "#3a3a3c", + "background": "#221F22", "borderHandleColor": "#939293", "floatingForeground": "#939293", "foreground": "#fcfcfa" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#2D2A2E", "Actions.infoForeground": "#939293", - "background": "#2D2A2E", - "borderColor": "#5b595c", + "background": "#363437", + "borderColor": "#2d2a2e", "foreground": "#fcfcfa", "infoForeground": "#939293", "separatorColor": "#2d2a2e", @@ -739,8 +782,8 @@ "ToolWindow": { "Button": { "hoverBackground": "#4A474B", - "selectedForeground": "#ffd866", - "selectedBackground": "#3a3a3c" + "selectedForeground": "#FFFFFF", + "selectedBackground": "#221F22" }, "Header": { "background": "#2D2A2E", @@ -751,50 +794,93 @@ "background": "#2D2A2E" }, "HeaderTab": { + "borderColor": "#5b595c", "hoverBackground": "#5b595c", - "hoverInactiveBackground": "#403E41", + "hoverInactiveBackground": "#5b595c", "inactiveUnderlineColor": "#ffd866", - "selectedBackground": "#3a3a3c", - "selectedInactiveBackground": "#3a3a3c", + "selectedBackground": "#221F22", + "selectedInactiveBackground": "#221F22", "underlineColor": "#ffd866", - "underlinedTabBackground": "#5b595c", - "underlinedTabInactiveBackground": "#403E41" + "underlinedTabBackground": "#4A474B", + "underlinedTabInactiveBackground": "#403E41", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#fcfcfa" } }, "Tree": { - "background": "#3a3a3c", + "background": "#221F22", "foreground": "#939293", "hash": "#2d2a2e", + "hoverBackground": "#403E4170", + "hoverInactiveBackground": "#4A474B", "modifiedItemForeground": "#ffd866", "rowHeight": 28, - "selectionBackground": "#403E41", + "selectionBackground": "#403E4170", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#403E41", - "textBackground": "#3a3a3c" + "selectionInactiveBackground": "#403E4170", + "textBackground": "#221F22" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#2d2a2e", - "ColorPicker.background": "#2D2A2E", - "ColorPicker.foreground": "#fcfcfa", - "Component.borderColor": "#2d2a2e", - "Component.background": "#2D2A2E", - "Component.foreground": "#fcfcfa", - "Connector.borderColor": "#2d2a2e", - "Connector.hoverBorderColor": "#5b595c", - "Canvas.background": "#3a3a3c", + "Canvas.background": "#221F22", + "ColorPicker": { + "background": "#2D2A2E", + "foreground": "#fcfcfa" + }, + "Component": { + "borderColor": "#2d2a2e", + "background": "#2D2A2E", + "foreground": "#fcfcfa", + "hoverBorderColor": "#5b595c" + }, + "Connector": { + "borderColor": "#2d2a2e", + "hoverBorderColor": "#5b595c" + }, + "Canvas.background": "#221F22", "highStroke.foreground": "#fcfcfa", "Label.foreground": "#939293", - "List.selectionBackground": "#403E41", - "Panel.borderColor": "#2d2a2e", - "Panel.background": "#2D2A2E", + "List.selectionBackground": "#403E4170", + "motion": { + "borderColor": "#2d2a2e", + "Component.foreground": "#fcfcfa", + "ConstraintSetText.foreground": "#939293", + "ConstraintSet.background": "#403E41", + "CSPanel.SelectedFocusBackground": "#5B595C", + "CSPanel.SelectedBackground": "#403E4170", + "cs_FocusText.infoForeground": "#939293", + "CursorTextColor.foreground": "#fcfcfa", + "HoverColor.disabledBackground": "#727072", + "motionGraph.background": "#2D2A2E", + "Notification.background": "#363437", + "ourAvg.background": "#403E41", + "ourCS.background": "#403E41", + "ourCS_Border.borderColor": "#2d2a2e", + "ourCS_TextColor.foreground": "#939293", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#4A474B", + "ourCS_SelectedBorder.pressedBorderColor": "#5b595c", + "ourML_BarColor.separatorColor": "#2d2a2e", + "PrimaryPanel.background": "#221F22", + "SecondaryPanel.background": "#2D2A2E", + "SecondaryPanel.header.foreground": "#939293", + "SecondaryPanel.header.background": "#221F22", + "timeLine.disabledBorderColor": "#2d2a2e" + }, + "Panel": { + "borderColor": "#2d2a2e", + "background": "#2D2A2E" + }, "percent.foreground": "#fcfcfa", - "Placeholder.background": "#2D2A2E", - "Placeholder.borderColor": "#2d2a2e", - "Placeholder.foreground": "#fcfcfa", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#2D2A2E", + "borderColor": "#2d2a2e", + "foreground": "#fcfcfa", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#2D2A2E", "stroke.acceleratorForeground": "#939293" }, @@ -819,8 +905,8 @@ }, "HgLog": { "branchIconColor": "#ffd866", - "bookmarkIconColor": "#ffd866", - "closedBranchIconColor": "#5b595c", + "bookmarkIconColor": "#FFFFFF", + "closedBranchIconColor": "#727072", "localTagIconColor": "#939293", "mqTagIconColor": "#939293", "tagIconColor": "#939293", @@ -828,48 +914,55 @@ }, "Log": { "Commit.unmatchedForeground": "#939293", - "Commit.currentBranchBackground": "#403E41" + "Commit.currentBranchBackground": "#403E41", + "Commit.hoveredBackground": "#403E4170" }, "RefLabel": { - "foreground": "#ffd866", + "foreground": "#FFFFFF", "backgroundBase": "#5b595c" } }, "Viewport": { - "background": "#3a3a3c", + "background": "#221F22", "foreground": "#fcfcfa" }, "WelcomeScreen": { + "AssociatedComponent.background": "#2D2A2E", "background": "#2D2A2E", "borderColor": "#2D2A2E", - "captionBackground": "#3a3a3c", + "captionBackground": "#221F22", "captionForeground": "#fcfcfa", - "footerBackground": "#3a3a3c", + "Details.background": "#2D2A2E", + "footerBackground": "#221F22", "footerForeground": "#fcfcfa", "headerBackground": "#2D2A2E", "headerForeground": "#fcfcfa", + "List.background": "#221F22", "separatorColor": "#2d2a2e", + "SidePanel.background": "#403E41", "Projects": { + "actions.background": "#221F22", + "actions.selectionBackground": "#5b595c", "background": "#403E41", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionInactiveBackground": "#403E41" } }, - "window": "#3a3a3c", + "window": "#221F22", "windowBorder": "#2d2a2e", "windowText": "#939293", "Window.border": "#2d2a2e" }, "icons": { "ColorPalette": { - "#43494A": "#3a3a3c", + "#43494A": "#221F22", "#6B6B6B": "#939293", "#A7A7A7": "#2D2A2E", "#3D6185": "#ffd866", "#466D94": "#ffd866", "#3C3F41": "#2D2A2E", - "#545556": "#5b595c", - "#606060": "#5b595c", + "#545556": "#727072", + "#606060": "#727072", "#9AA7B0": "#fcfcfa", "#675133": "#ffd866", "Actions.Blue": "#A9DC76", @@ -879,20 +972,20 @@ "Actions.GreyInline.Dark": "#fcfcfa", "Actions.Red": "#FF6188", "Actions.Yellow": "#78DCE8", - "Checkbox.Background.Default": "#3a3a3c", - "Checkbox.Background.Default.Dark": "#3a3a3c", + "Checkbox.Background.Default": "#221F22", + "Checkbox.Background.Default.Dark": "#221F22", "Checkbox.Background.Disabled": "#3a3a3c", "Checkbox.Background.Disabled.Dark": "#3a3a3c", "Checkbox.Border.Default": "#2d2a2e", "Checkbox.Border.Default.Dark": "#2d2a2e", - "Checkbox.Border.Disabled": "#5b595c", - "Checkbox.Border.Disabled.Dark": "#5b595c", + "Checkbox.Border.Disabled": "#727072", + "Checkbox.Border.Disabled.Dark": "#727072", "Checkbox.Focus.Thin.Default": "#ffd866", "Checkbox.Focus.Thin.Default.Dark": "#ffd866", "Checkbox.Focus.Wide": "#ffd866", "Checkbox.Focus.Wide.Dark": "#ffd866", - "Checkbox.Foreground.Disabled": "#5b595c", - "Checkbox.Foreground.Disabled.Dark": "#5b595c", + "Checkbox.Foreground.Disabled": "#727072", + "Checkbox.Foreground.Disabled.Dark": "#727072", "Checkbox.Background.Selected": "#ffd866", "Checkbox.Background.Selected.Dark": "#2D2A2E", "Checkbox.Border.Selected": "#ffd866", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro.theme.json index 9a71d591..cdeda171 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Monokai Pro.theme.json @@ -3,21 +3,27 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Monokai Pro.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/monokai.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#939293", "background": "#2D2A2E", "borderColor": "#2d2a2e", "disabledBackground": "#3a3a3c", - "disabledForeground": "#5b595c", - "disabledText": "#5b595c", + "disabledForeground": "#727072", + "disabledText": "#727072", "focusColor": "#5b595c", "focusedBorderColor": "#ffd866", "foreground": "#fcfcfa", "inactiveBackground": "#3a3a3c", "inactiveForeground": "#939293", "infoForeground": "#939293", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionBackgroundInactive": "#403E41", "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#403E41", @@ -33,7 +39,7 @@ "pressedBorderColor": "#ffd86650" }, "Autocomplete": { - "selectionBackground": "#6E6C6F" + "selectionBackground": "#5B595C" }, "Borders.ContrastBorderColor": "#2D2A2E", "Borders.color": "#2d2a2e", @@ -43,7 +49,7 @@ "default": { "endBackground": "#4A474B", "endBorderColor": "#4A474B", - "foreground": "#ffd866", + "foreground": "#FFFFFF", "focusColor": "#ffd866", "focusedBorderColor": "#ffd866", "shadowColor": "#4A474B", @@ -51,7 +57,7 @@ "startBorderColor": "#4A474B" }, "disabledBorderColor": "#403E41", - "disabledText": "#5b595c", + "disabledText": "#727072", "endBackground": "#403E41", "endBorderColor": "#403E41", "focus": "#5b595c", @@ -72,10 +78,13 @@ "Tooltip.borderColor": "#2d2a2e", "Tooltip.background": "#363437" }, - "Content.background": "#3a3a3c", + "Content": { + "background": "#221F22", + "selectionBackground": "#5B595C" + }, "CheckBox": { "background": "#2D2A2E", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa", "select": "#ffd866" }, @@ -84,10 +93,18 @@ "acceleratorSelectionForeground": "#939293", "background": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", - "selectionForeground": "#ffd866" + "selectionBackground": "#5B595C", + "selectionForeground": "#FFFFFF" + }, + "CodeWithMe": { + "Avatar.foreground": "#fcfcfa", + "AccessEnabled": { + "accessDot": "#ffd866", + "dropdownBorder": "#403E41", + "pillBackground": "$second" + } }, "ColorChooser": { "background": "#2D2A2E", @@ -98,19 +115,20 @@ "ComboBox": { "ArrowButton": { "background": "#403E41", - "disabledIconColor": "#5b595c", + "disabledIconColor": "#727072", "iconColor": "#fcfcfa", "nonEditableBackground": "#2D2A2E" }, "background": "#2D2A2E", "buttonBackground": "#403E41", - "disabledForeground": "#5b595c", + "darcula.hoveredArrowButtonForeground": "#ffd866", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "modifiedItemForeground": "#ffd866", "nonEditableBackground": "#403E41", "padding": "5,5,5,5", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "ComboPopup.border": "#2d2a2e", "CompletionPopup": { @@ -123,8 +141,8 @@ "selectedGrayedForeground": "#FFFFFF", "selectionGrayForeground": "#FFFFFF", "selectionInactiveInfoForeground": "#939293", - "selectionInactiveBackground": "#6E6C6F50", - "selectionBackground": "#6E6C6F80", + "selectionInactiveBackground": "#5B595C50", + "selectionBackground": "#5B595C80", "selectionForeground": "#FFFFFF", "selectionInfoForeground": "#FFFFFF" }, @@ -168,11 +186,13 @@ "hoverBackground": "#4A474B", "hoverColor": "#2D2A2E", "hoverMaskColor": "#5b595c", + "inactiveColoredTabBackground": "#2D2A2E", "inactiveColoredFileBackground": "#403E41", - "inactiveUnderlineColor": "#5b595c", + "inactiveUnderlineColor": "#ffd866", "inactiveMaskColor": "#2D2A2E", "underlineColor": "#ffd866", - "underlinedTabBackground": "#4A474B" + "underlinedTabBackground": "#4A474B", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#2D2A2E", "DialogWrapper.southPanelBackground": "#2D2A2E", @@ -192,21 +212,23 @@ "caretForeground": "#ffd866", "foreground": "#fcfcfa", "inactiveBackground": "#2D2A2E", - "inactiveForeground": "#5b595c", - "selectionBackground": "#6E6C6F", - "selectionForeground": "#ffd866" + "inactiveForeground": "#727072", + "selectionBackground": "#5B595C", + "selectionForeground": "#FFFFFF" }, "EditorTabs": { "borderColor": "#403E41", + "hoverBackground": "#5b595c", "hoverColor": "#5b595c", "hoverMaskColor": "#5b595c", "inactiveMaskColor": "#2D2A2E", - "inactiveColoredFileBackground": "#2D2A2E2", - "inactiveUnderlineColor": "#5b595c", + "inactiveColoredFileBackground": "#2D2A2E", + "inactiveUnderlineColor": "#727072", "selectedForeground": "#fcfcfa", "selectedBackground": "#4A474B", "underlineColor": "#ffd866", - "underlinedTabBackground": "#4A474B" + "underlinedTabBackground": "#4A474B", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#2D2A2E", @@ -242,21 +264,22 @@ "caretForeground": "#ffd866", "foreground": "#fcfcfa", "inactiveBackground": "#403E41", - "inactiveForeground": "#5b595c", - "selectionForeground": "#ffd866", + "inactiveForeground": "#727072", + "selectionForeground": "#FFFFFF", "selectionBackground": "#4A474B" }, + "GotItTooltip.borderColor": "#363437", "Group": { "disabledSeparatorColor": "#2d2a2e", "separatorColor": "#2d2a2e" }, "GutterTooltip": { - "infoForeground": "#fcfcfa", + "infoForeground": "#939293", "lineSeparatorColor": "#2D2A2E" }, "HeaderColor": { "active": "#2D2A2E", - "inactive": "#3a3a3c" + "inactive": "#221F22" }, "HelpTooltip": { "background": "#2D2A2E", @@ -283,12 +306,13 @@ }, "Label": { "background": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "disabledShadow": "#2D2A2E", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa", "infoForeground": "#939293", - "selectedForeground": "#ffd866" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#fcfcfa" }, "Link": { "activeForeground": "#ffd866", @@ -301,15 +325,17 @@ "List": { "background": "#403E41", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F50", + "hoverBackground": "#403E4170", + "hoverInactiveBackground": "#4A474B", + "selectionBackground": "#5B595C50", "selectionForeground": "#FFFFFF", - "selectionInactiveForeground": "#ffd866", - "selectionInactiveBackground": "#403E41" + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#403E4170" }, "material": { "background": "#2D2A2E", "branchColor": "#fcfcfa", - "contrast": "#3a3a3c", + "contrast": "#221F22", "foreground": "#fcfcfa", "mergeCommits": "#403E41", "primaryColor": "#939293", @@ -330,9 +356,9 @@ "border": "4,2,4,2", "borderColor": "#403E41", "disabledBackground": "#403E41", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF", "separatorColor": "#2d2a2e" }, @@ -340,10 +366,10 @@ "background": "#2D2A2E", "borderColor": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "highlight": "#2D2A2E", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF", "shadow": "#2D2A2E" }, @@ -353,9 +379,9 @@ "border": "4,2,4,2", "background": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF" }, "NavBar": { @@ -400,7 +426,7 @@ "Outline": { "color": "#403E41", "focusedColor": "#ffd866", - "disabledColor": "#5b595c" + "disabledColor": "#727072" }, "Panel": { "background": "#2D2A2E", @@ -409,9 +435,9 @@ "ParameterInfo": { "background": "#403E41", "borderColor": "#4A474B", - "currentOverloadBackground": "#4A474B", + "currentOverloadBackground": "#5b595c", "currentParameterForeground": "#ffd866", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "infoForeground": "#939293", "lineSeparatorColor": "#4A474B" @@ -421,17 +447,18 @@ "capsLockIconColor": "#ffd866", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "Plugins": { "background": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "eapTagBackground": "#5b595c", - "lightSelectionBackground": "#6E6C6F", + "hoverBackground": "#403E4170", + "lightSelectionBackground": "#4A474B", "paidTagBackground": "#5b595c", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "tagForeground": "#ffd866", "tagBackground": "#5b595c", "trialTagBackground": "#5b595c", @@ -440,9 +467,9 @@ "installBorderColor": "#403E41", "installForeground": "#fcfcfa", "installFocusedBackground": "#5b595c", - "installFillForeground": "#5b595c", + "installFillForeground": "#727072", "installFillBackground": "#403E41", - "updateBackground": "#403E41", + "updateBackground": "#ffd866", "updateBorderColor": "#403E41", "updateForeground": "#fcfcfa" }, @@ -466,20 +493,20 @@ "borderColor": "#2D2A2E", "foreground": "#ffd866" }, - "borderColor": "#3a3a3c", + "borderColor": "#221F22", "inactiveBorderColor": "#2D2A2E", "innerBorderColor": "#403E41", "Header": { "activeBackground": "#2D2A2E", - "inactiveBackground": "#3a3a3c" + "inactiveBackground": "#221F22" }, "paintBorder": true, "separatorForeground": "#fcfcfa", "separatorColor": "#403E41", "Toolbar": { - "Floating.background": "#3a3a3c", - "background": "#3a3a3c", - "borderColor": "#3a3a3c" + "Floating.background": "#221F22", + "background": "#221F22", + "borderColor": "#221F22" } }, "PopupMenu": { @@ -504,7 +531,7 @@ }, "RadioButton": { "background": "#2D2A2E", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa" }, "RadioButtonMenuItem": { @@ -512,11 +539,12 @@ "acceleratorSelectionForeground": "#939293", "background": "#2D2A2E", "disabledBackground": "#2D2A2E", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#2d2a2e", "ScrollBar": { "background": "#2D2A2E", "hoverThumbBorderColor": "#ffd866", @@ -553,7 +581,7 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#3a3a3c", + "background": "#221F22", "foreground": "#939293" }, "Header": { @@ -565,20 +593,29 @@ }, "SearchField": { "background": "#2D2A2E", - "borderColor": "#3a3a3c", + "borderColor": "#221F22", "infoForeground": "#939293" }, "Tab": { - "active.foreground": "#ffd866", - "selectedForeground": "#ffd866", + "active.foreground": "#FFFFFF", + "selectedForeground": "#FFFFFF", "selectedBackground": "#5b595c" } }, "SearchMatch": { "endBackground": "#ffd866", - "startBackground": "#ffd866" + "startBackground": "#ffd866", + "endColor": "#ffd866", + "startColor": "#ffd866" }, "SearchField.errorBackground": "#363437", + "SearchOption": { + "selectedBackground": "#4A474B" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#939293", + "Repeated.File.Foreground": "#fcfcfa" + }, "Separator": { "background": "#403E41", "foreground": "#403E41", @@ -608,7 +645,7 @@ "background": "#2D2A2E", "border": "3,3,3,3", "foreground": "#fcfcfa", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "SplitPane": { "background": "#2D2A2E", @@ -616,15 +653,17 @@ }, "SplitPaneDivider.draggingColor": "#403E41", "StatusBar": { - "borderColor": "#2D2A2E" + "borderColor": "#2D2A2E", + "hoverBackground": "#5b595c", + "LightEditBackground": "#4A474B" }, "TabbedPane": { "background": "#2D2A2E", "contentAreaColor": "#5b595c", "contentBorderInsets": "3,1,1,1", "darkShadow": "#2d2a2e", - "disabledForeground": "#5b595c", - "disabledUnderlineColor": "#5b595c", + "disabledForeground": "#727072", + "disabledUnderlineColor": "#727072", "focus": "#4A474B", "focusColor": "#4A474B", "fontSizeOffset": 0, @@ -632,7 +671,7 @@ "highlight": "#2d2a2e", "hoverColor": "#5b595c", "labelShift": 0, - "selectedForeground": "#ffd866", + "selectedForeground": "#FFFFFF", "selectedLabelShift": 0, "selectedTabPadInsets": "0,0,0,0", "tabsOverlapBorder": true, @@ -643,35 +682,39 @@ }, "TabbedPane.mt.tab.background": "#2D2A2E", "Table": { + "alternativeRowBackground": "#221F22", "background": "#2D2A2E", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#727072", "dropLineColor": "#ffd866", "dropLineShortColor": "#ffd866", "focusCellBackground": "#4A474B", - "focusCellForeground": "#ffd866", + "focusCellForeground": "#FFFFFF", "foreground": "#fcfcfa", "gridColor": "#2D2A2E", "highlightOuter": "#4A474B", - "lightSelectionForeground": "#ffd866", + "hoverBackground": "#403E4170", + "hoverInactiveBackground": "#4A474B", + "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#939293", "lightSelectionInactiveBackground": "#403E41", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866", + "selectionForeground": "#FFFFFF", "selectionInactiveBackground": "#4A474B", "selectionInactiveForeground": "#FFFFFF", "sortIconColor": "#fcfcfa", - "stripeColor": "#3a3a3c" + "stripeColor": "#221F22" }, "TableHeader": { "background": "#2D2A2E", "borderColor": "#2D2A2E", "bottomSeparatorColor": "#403E41", "cellBorder": "4,0,4,0", - "disabledForeground": "#5b595c", + "disabledForeground": "#727072", "foreground": "#fcfcfa", "focusCellBackground": "#4A474B", - "focusCellForeground": "#ffd866", + "focusCellForeground": "#FFFFFF", "height": 25, "separatorColor": "#403E41" }, @@ -682,28 +725,28 @@ "background": "#2D2A2E", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "TextField": { "background": "#2D2A2E", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "TextPane": { "background": "#2D2A2E", "caretForeground": "#ffd866", "foreground": "#fcfcfa", - "inactiveForeground": "#5b595c", + "inactiveForeground": "#727072", "selectionBackground": "#4A474B", - "selectionForeground": "#ffd866" + "selectionForeground": "#FFFFFF" }, "TitlePane": { - "background": "#3a3a3c", + "background": "#221F22", "Button.hoverBackground": "#5b595c", "inactiveBackground": "#2D2A2E", "infoForeground": "#939293", @@ -713,7 +756,7 @@ "ToggleButton": { "borderColor": "#403E41", "buttonColor": "#fcfcfa", - "disabledText": "#5b595c", + "disabledText": "#727072", "foreground": "#fcfcfa", "offForeground": "#2D2A2E", "offBackground": "#2D2A2E", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#2D2A2E", "Actions.infoForeground": "#939293", - "background": "#2D2A2E", - "borderColor": "#5b595c", + "background": "#363437", + "borderColor": "#2d2a2e", "foreground": "#fcfcfa", "infoForeground": "#939293", "separatorColor": "#2d2a2e", @@ -739,8 +782,8 @@ "ToolWindow": { "Button": { "hoverBackground": "#4A474B", - "selectedForeground": "#ffd866", - "selectedBackground": "#3a3a3c" + "selectedForeground": "#FFFFFF", + "selectedBackground": "#221F22" }, "Header": { "background": "#2D2A2E", @@ -751,50 +794,93 @@ "background": "#2D2A2E" }, "HeaderTab": { + "borderColor": "#5b595c", "hoverBackground": "#5b595c", - "hoverInactiveBackground": "#403E41", + "hoverInactiveBackground": "#5b595c", "inactiveUnderlineColor": "#ffd866", - "selectedBackground": "#3a3a3c", - "selectedInactiveBackground": "#3a3a3c", + "selectedBackground": "#221F22", + "selectedInactiveBackground": "#221F22", "underlineColor": "#ffd866", - "underlinedTabBackground": "#5b595c", - "underlinedTabInactiveBackground": "#403E41" + "underlinedTabBackground": "#4A474B", + "underlinedTabInactiveBackground": "#403E41", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#fcfcfa" } }, "Tree": { "background": "#2D2A2E", "foreground": "#939293", "hash": "#2d2a2e", + "hoverBackground": "#403E4170", + "hoverInactiveBackground": "#4A474B", "modifiedItemForeground": "#ffd866", "rowHeight": 28, - "selectionBackground": "#403E41", + "selectionBackground": "#403E4170", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#403E41", + "selectionInactiveBackground": "#403E4170", "textBackground": "#2D2A2E" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#2d2a2e", - "ColorPicker.background": "#2D2A2E", - "ColorPicker.foreground": "#fcfcfa", - "Component.borderColor": "#2d2a2e", - "Component.background": "#2D2A2E", - "Component.foreground": "#fcfcfa", - "Connector.borderColor": "#2d2a2e", - "Connector.hoverBorderColor": "#5b595c", - "Canvas.background": "#3a3a3c", + "Canvas.background": "#221F22", + "ColorPicker": { + "background": "#2D2A2E", + "foreground": "#fcfcfa" + }, + "Component": { + "borderColor": "#2d2a2e", + "background": "#2D2A2E", + "foreground": "#fcfcfa", + "hoverBorderColor": "#5b595c" + }, + "Connector": { + "borderColor": "#2d2a2e", + "hoverBorderColor": "#5b595c" + }, + "Canvas.background": "#221F22", "highStroke.foreground": "#fcfcfa", "Label.foreground": "#939293", - "List.selectionBackground": "#403E41", - "Panel.borderColor": "#2d2a2e", - "Panel.background": "#2D2A2E", + "List.selectionBackground": "#403E4170", + "motion": { + "borderColor": "#2d2a2e", + "Component.foreground": "#fcfcfa", + "ConstraintSetText.foreground": "#939293", + "ConstraintSet.background": "#403E41", + "CSPanel.SelectedFocusBackground": "#5B595C", + "CSPanel.SelectedBackground": "#403E4170", + "cs_FocusText.infoForeground": "#939293", + "CursorTextColor.foreground": "#fcfcfa", + "HoverColor.disabledBackground": "#727072", + "motionGraph.background": "#2D2A2E", + "Notification.background": "#363437", + "ourAvg.background": "#403E41", + "ourCS.background": "#403E41", + "ourCS_Border.borderColor": "#2d2a2e", + "ourCS_TextColor.foreground": "#939293", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#4A474B", + "ourCS_SelectedBorder.pressedBorderColor": "#5b595c", + "ourML_BarColor.separatorColor": "#2d2a2e", + "PrimaryPanel.background": "#221F22", + "SecondaryPanel.background": "#2D2A2E", + "SecondaryPanel.header.foreground": "#939293", + "SecondaryPanel.header.background": "#221F22", + "timeLine.disabledBorderColor": "#2d2a2e" + }, + "Panel": { + "borderColor": "#2d2a2e", + "background": "#2D2A2E" + }, "percent.foreground": "#fcfcfa", - "Placeholder.background": "#2D2A2E", - "Placeholder.borderColor": "#2d2a2e", - "Placeholder.foreground": "#fcfcfa", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#2D2A2E", + "borderColor": "#2d2a2e", + "foreground": "#fcfcfa", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#2D2A2E", "stroke.acceleratorForeground": "#939293" }, @@ -819,8 +905,8 @@ }, "HgLog": { "branchIconColor": "#ffd866", - "bookmarkIconColor": "#ffd866", - "closedBranchIconColor": "#5b595c", + "bookmarkIconColor": "#FFFFFF", + "closedBranchIconColor": "#727072", "localTagIconColor": "#939293", "mqTagIconColor": "#939293", "tagIconColor": "#939293", @@ -828,10 +914,11 @@ }, "Log": { "Commit.unmatchedForeground": "#939293", - "Commit.currentBranchBackground": "#403E41" + "Commit.currentBranchBackground": "#403E41", + "Commit.hoveredBackground": "#403E4170" }, "RefLabel": { - "foreground": "#ffd866", + "foreground": "#FFFFFF", "backgroundBase": "#5b595c" } }, @@ -840,18 +927,24 @@ "foreground": "#fcfcfa" }, "WelcomeScreen": { + "AssociatedComponent.background": "#2D2A2E", "background": "#2D2A2E", "borderColor": "#2D2A2E", - "captionBackground": "#3a3a3c", + "captionBackground": "#221F22", "captionForeground": "#fcfcfa", - "footerBackground": "#3a3a3c", + "Details.background": "#2D2A2E", + "footerBackground": "#221F22", "footerForeground": "#fcfcfa", "headerBackground": "#2D2A2E", "headerForeground": "#fcfcfa", + "List.background": "#221F22", "separatorColor": "#2d2a2e", + "SidePanel.background": "#403E41", "Projects": { + "actions.background": "#221F22", + "actions.selectionBackground": "#5b595c", "background": "#403E41", - "selectionBackground": "#6E6C6F", + "selectionBackground": "#5B595C", "selectionInactiveBackground": "#403E41" } }, @@ -862,14 +955,14 @@ }, "icons": { "ColorPalette": { - "#43494A": "#3a3a3c", + "#43494A": "#221F22", "#6B6B6B": "#939293", "#A7A7A7": "#2D2A2E", "#3D6185": "#ffd866", "#466D94": "#ffd866", "#3C3F41": "#2D2A2E", - "#545556": "#5b595c", - "#606060": "#5b595c", + "#545556": "#727072", + "#606060": "#727072", "#9AA7B0": "#fcfcfa", "#675133": "#ffd866", "Actions.Blue": "#A9DC76", @@ -879,20 +972,20 @@ "Actions.GreyInline.Dark": "#fcfcfa", "Actions.Red": "#FF6188", "Actions.Yellow": "#78DCE8", - "Checkbox.Background.Default": "#3a3a3c", - "Checkbox.Background.Default.Dark": "#3a3a3c", + "Checkbox.Background.Default": "#221F22", + "Checkbox.Background.Default.Dark": "#221F22", "Checkbox.Background.Disabled": "#3a3a3c", "Checkbox.Background.Disabled.Dark": "#3a3a3c", "Checkbox.Border.Default": "#2d2a2e", "Checkbox.Border.Default.Dark": "#2d2a2e", - "Checkbox.Border.Disabled": "#5b595c", - "Checkbox.Border.Disabled.Dark": "#5b595c", + "Checkbox.Border.Disabled": "#727072", + "Checkbox.Border.Disabled.Dark": "#727072", "Checkbox.Focus.Thin.Default": "#ffd866", "Checkbox.Focus.Thin.Default.Dark": "#ffd866", "Checkbox.Focus.Wide": "#ffd866", "Checkbox.Focus.Wide.Dark": "#ffd866", - "Checkbox.Foreground.Disabled": "#5b595c", - "Checkbox.Foreground.Disabled.Dark": "#5b595c", + "Checkbox.Foreground.Disabled": "#727072", + "Checkbox.Foreground.Disabled.Dark": "#727072", "Checkbox.Background.Selected": "#ffd866", "Checkbox.Background.Selected.Dark": "#2D2A2E", "Checkbox.Border.Selected": "#ffd866", diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight Contrast.theme.json new file mode 100644 index 00000000..a552b01d --- /dev/null +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight Contrast.theme.json @@ -0,0 +1,1010 @@ +{ + "name": "Moonlight Contrast", + "dark": true, + "author": "Mallowigi", + "editorScheme": "/colors/Moonlight.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/moonlight.svg", + "fill": "scale", + "transparency": 50 + }, + "ui": { + "*": { + "acceleratorSelectionForeground": "#a9b8e8", + "background": "#222436", + "borderColor": "#222436", + "disabledBackground": "#2f334d", + "disabledForeground": "#828bb8", + "disabledText": "#828bb8", + "focusColor": "#444a73", + "focusedBorderColor": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveBackground": "#2f334d", + "inactiveForeground": "#a9b8e8", + "infoForeground": "#a9b8e8", + "selectionBackground": "#444a73", + "selectionBackgroundInactive": "#2f334d", + "selectionForeground": "#FFFFFF", + "selectionInactiveBackground": "#2f334d", + "separatorColor": "#222436" + }, + "activeCaption": "#222436", + "ActionButton": { + "hoverBackground": "#4fd6be50", + "hoverBorderColor": "#4fd6be50", + "hoverSeparatorColor": "#444a73", + "focusedBorderColor": "#4fd6be50", + "pressedBackground": "#4fd6be50", + "pressedBorderColor": "#4fd6be50" + }, + "Autocomplete": { + "selectionBackground": "#444a73" + }, + "Borders.ContrastBorderColor": "#222436", + "Borders.color": "#222436", + "Button": { + "arc": 0, + "background": "#222436", + "default": { + "endBackground": "#2f334d", + "endBorderColor": "#2f334d", + "foreground": "#FFFFFF", + "focusColor": "#4fd6be", + "focusedBorderColor": "#4fd6be", + "shadowColor": "#2f334d", + "startBackground": "#2f334d", + "startBorderColor": "#2f334d" + }, + "disabledBorderColor": "#444a73", + "disabledText": "#828bb8", + "endBackground": "#444a73", + "endBorderColor": "#444a73", + "focus": "#444a73", + "focusedBorderColor": "#4fd6be", + "foreground": "#a9b8e8", + "highlight": "#FFFFFF", + "mt.background": "#444a73", + "mt.foreground": "#a9b8e8", + "mt.selectedForeground": "#FFFFFF", + "mt.selection.color1": "#2f334d", + "mt.selection.color2": "#2f334d", + "startBackground": "#444a73", + "startBorderColor": "#444a73", + "shadowColor": "#444a73", + "shadowWidth": 0 + }, + "Canvas": { + "Tooltip.borderColor": "#222436", + "Tooltip.background": "#191a2a" + }, + "Content": { + "background": "#191a2a", + "selectionBackground": "#444a73" + }, + "CheckBox": { + "background": "#222436", + "disabledText": "#828bb8", + "foreground": "#c8d3f5", + "select": "#4fd6be" + }, + "CheckBoxMenuItem": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#a9b8e8", + "background": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "CodeWithMe": { + "Avatar.foreground": "#c8d3f5", + "AccessEnabled": { + "accessDot": "#4fd6be", + "dropdownBorder": "#2f334d", + "pillBackground": "$second" + } + }, + "ColorChooser": { + "background": "#222436", + "foreground": "#c8d3f5", + "swatchesDefaultRecentColor": "#c8d3f5" + }, + "ComboBoxButton.background": "#444a73", + "ComboBox": { + "ArrowButton": { + "background": "#444a73", + "disabledIconColor": "#828bb8", + "iconColor": "#c8d3f5", + "nonEditableBackground": "#222436" + }, + "background": "#191a2a", + "buttonBackground": "#444a73", + "darcula.hoveredArrowButtonForeground": "#4fd6be", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "modifiedItemForeground": "#4fd6be", + "nonEditableBackground": "#2f334d", + "padding": "5,5,5,5", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "ComboPopup.border": "#222436", + "CompletionPopup": { + "background": "#2f334d", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "matchForeground": "#4fd6be", + "matchSelectionForeground": "#4fd6be", + "nonFocusedState": "false", + "selectedGrayedForeground": "#FFFFFF", + "selectionGrayForeground": "#FFFFFF", + "selectionInactiveInfoForeground": "#a9b8e8", + "selectionInactiveBackground": "#444a7350", + "selectionBackground": "#444a7380", + "selectionForeground": "#FFFFFF", + "selectionInfoForeground": "#FFFFFF" + }, + "Component": { + "arc": 4, + "borderColor": "#444a73", + "disabledBorderColor": "#444a73", + "focusColor": "#4fd6be", + "focusedBorderColor": "#4fd6be", + "hoverIconColor": "#4fd6be", + "infoForeground": "#a9b8e8", + "iconColor": "#c8d3f5" + }, + "control": "#222436", + "controlText": "#a9b8e8", + "Counter": { + "background": "#4fd6be", + "foreground": "#FFFFFF" + }, + "Debugger": { + "Variables": { + "collectingDataForeground": "#a9b8e8", + "changedValueForeground": "#4fd6be", + "errorMessageForeground": "#ff757f", + "evaluatingExpressionForeground": "#a9b8e8", + "exceptionForeground": "#c099ff", + "modifyingValueForeground": "#4fd6be", + "valueForeground": "#4fd6be" + } + }, + "DebuggerTabs": { + "selectedBackground": "#444a73", + "underlinedTabBackground": "#444a73" + }, + "DebuggerPopup": { + "borderColor": "#444a73" + }, + "DefaultTabs": { + "background": "#222436", + "borderColor": "#222436", + "hoverBackground": "#2f334d", + "hoverColor": "#191a2a", + "hoverMaskColor": "#444a73", + "inactiveColoredTabBackground": "#222436", + "inactiveColoredFileBackground": "#444a73", + "inactiveUnderlineColor": "#4fd6be", + "inactiveMaskColor": "#191a2a", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabForeground": "#FFFFFF" + }, + "Desktop.background": "#222436", + "DialogWrapper.southPanelBackground": "#222436", + "DialogWrapper.southPanelDivider": "#222436", + "DragAndDrop": { + "areaBackground": "#222436", + "areaBorderColor": "#222436", + "areaForeground": "#c8d3f5" + }, + "Editor": { + "background": "#191a2a", + "foreground": "#c8d3f5", + "shortcutForeground": "#a9b8e8" + }, + "EditorPane": { + "background": "#191a2a", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveBackground": "#222436", + "inactiveForeground": "#828bb8", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "EditorTabs": { + "borderColor": "#2f334d", + "hoverBackground": "#444a73", + "hoverColor": "#444a73", + "hoverMaskColor": "#444a73", + "inactiveMaskColor": "#222436", + "inactiveColoredFileBackground": "#222436", + "inactiveUnderlineColor": "#828bb8", + "selectedForeground": "#c8d3f5", + "selectedBackground": "#2f334d", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabForeground": "#FFFFFF" + }, + "EditorGroupsTabs": { + "background": "#222436", + "borderColor": "#2f334d", + "hoverBackground": "#444a73", + "hoverColor": "#444a73", + "inactiveUnderlineColor": "#4fd6be", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabForeground": "#c8d3f5" + }, + "FileColor": { + "Green": "#387002", + "Blue": "#004BA0", + "Yellow": "#2f334d", + "Orange": "#B53D00", + "Violet": "#4D2C91", + "Rose": "#A00037" + }, + "FlameGraph": { + "JVMBackground": "#89DDF7", + "JVMFocusBackground": "#82AAFF", + "JVMSearchNotMatchedBackground": "#FF5370", + "JVMFocusSearchNotMatchedBackground": "#AB7967", + "nativeBackground": "#FFCB6B", + "nativeFocusBackground": "#F78C6C", + "nativeSearchNotMatchedBackground": "#C792EA", + "nativeFocusSearchNotMatchedBackground": "#BB80B3" + }, + "Focus.color": "#222436", + "FormattedTextField": { + "background": "#191a2a", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveBackground": "#444a73", + "inactiveForeground": "#828bb8", + "selectionForeground": "#FFFFFF", + "selectionBackground": "#2f334d" + }, + "GotItTooltip.borderColor": "#191a2a", + "Group": { + "disabledSeparatorColor": "#222436", + "separatorColor": "#222436" + }, + "GutterTooltip": { + "infoForeground": "#a9b8e8", + "lineSeparatorColor": "#222436" + }, + "HeaderColor": { + "active": "#222436", + "inactive": "#191a2a" + }, + "HelpTooltip": { + "background": "#222436", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "shortcutForeground": "#a9b8e8" + }, + "Hyperlink.linkColor": "#4fd6be", + "inactiveCaption": "#2f334d", + "inactiveCaptionBorder": "#222436", + "inactiveCaptionText": "#a9b8e8", + "info": "#a9b8e8", + "infoText": "#a9b8e8", + "IdeStatusBar.border": "4,4,4,4", + "InformationHint.borderColor": "#222436", + "InplaceRefactoringPopup": { + "borderColor": "#222436" + }, + "InternalFrame": { + "activeTitleForeground": "#c8d3f5", + "background": "#222436", + "inactiveTitleForeground": "#a9b8e8" + }, + "Label": { + "background": "#222436", + "disabledForeground": "#828bb8", + "disabledShadow": "#222436", + "disabledText": "#828bb8", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#c8d3f5" + }, + "Link": { + "activeForeground": "#4fd6be", + "hoverForeground": "#4fd6be", + "pressedForeground": "#4fd6be", + "secondaryForeground": "#a9b8e8", + "visitedForeground": "#4fd6be" + }, + "link.foreground": "#4fd6be", + "List": { + "background": "#2f334d", + "foreground": "#c8d3f5", + "hoverBackground": "#444a7370", + "hoverInactiveBackground": "#2f334d", + "selectionBackground": "#444a7350", + "selectionForeground": "#FFFFFF", + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#444a7370" + }, + "material": { + "background": "#222436", + "branchColor": "#c8d3f5", + "contrast": "#191a2a", + "foreground": "#c8d3f5", + "mergeCommits": "#444a73", + "primaryColor": "#a9b8e8", + "selectionForeground": "#FFFFFF", + "tab.backgroundColor": "#222436", + "tab.borderColor": "#4fd6be", + "tagColor": "#a9b8e8" + }, + "MemoryIndicator": { + "allocatedBackground": "#2f334d", + "usedColor": "#444a73", + "usedBackground": "#444a73" + }, + "Menu": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#FFFFFF", + "background": "#222436", + "border": "4,2,4,2", + "borderColor": "#2f334d", + "disabledBackground": "#2f334d", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF", + "separatorColor": "#222436" + }, + "MenuBar": { + "background": "#191a2a", + "borderColor": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "highlight": "#222436", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF", + "shadow": "#191a2a" + }, + "MenuItem": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#FFFFFF", + "border": "4,2,4,2", + "background": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "NavBar": { + "arrowColor": "#c8d3f5", + "borderColor": "#222436" + }, + "NewClass": { + "Panel": { + "background": "#222436" + }, + "SearchField": { + "background": "#191a2a" + } + }, + "NewPSD.warning": "#4fd6be", + "Notification": { + "background": "#191a2a", + "borderColor": "#191a2a", + "errorBackground": "#191a2a", + "errorBorderColor": "#191a2a", + "foreground": "#c8d3f5", + "MoreButton": { + "background": "#444a73", + "foreground": "#c8d3f5", + "innerBorderColor": "#444a73" + }, + "ToolWindow": { + "errorBackground": "#191a2a", + "errorBorderColor": "#191a2a", + "informativeBackground": "#191a2a", + "informativeBorderColor": "#191a2a", + "warningBackground": "#191a2a", + "warningBorderColor": "#191a2a" + } + }, + "OnePixelDivider.background": "#222436", + "OptionPane": { + "background": "#222436", + "foreground": "#c8d3f5", + "messageForeground": "#c8d3f5" + }, + "Outline": { + "color": "#444a73", + "focusedColor": "#4fd6be", + "disabledColor": "#828bb8" + }, + "Panel": { + "background": "#222436", + "foreground": "#c8d3f5" + }, + "ParameterInfo": { + "background": "#2f334d", + "borderColor": "#2f334d", + "currentOverloadBackground": "#444a73", + "currentParameterForeground": "#4fd6be", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "lineSeparatorColor": "#2f334d" + }, + "PasswordField": { + "background": "#191a2a", + "capsLockIconColor": "#4fd6be", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "Plugins": { + "background": "#222436", + "disabledForeground": "#828bb8", + "eapTagBackground": "#444a73", + "hoverBackground": "#444a7370", + "lightSelectionBackground": "#2f334d", + "paidTagBackground": "#444a73", + "selectionBackground": "#444a73", + "tagForeground": "#4fd6be", + "tagBackground": "#444a73", + "trialTagBackground": "#444a73", + "Button": { + "installBackground": "#444a73", + "installBorderColor": "#444a73", + "installForeground": "#c8d3f5", + "installFocusedBackground": "#444a73", + "installFillForeground": "#828bb8", + "installFillBackground": "#444a73", + "updateBackground": "#4fd6be", + "updateBorderColor": "#444a73", + "updateForeground": "#c8d3f5" + }, + "SearchField": { + "background": "#191a2a", + "borderColor": "#222436" + }, + "SectionHeader": { + "background": "#2f334d", + "foreground": "#c8d3f5" + }, + "Tab": { + "hoverBackground": "#2f334d", + "selectedForeground": "#FFFFFF", + "selectedBackground": "#2f334d" + } + }, + "Popup": { + "Advertiser": { + "background": "#222436", + "borderColor": "#222436", + "foreground": "#4fd6be" + }, + "borderColor": "#191a2a", + "inactiveBorderColor": "#222436", + "innerBorderColor": "#2f334d", + "Header": { + "activeBackground": "#222436", + "inactiveBackground": "#191a2a" + }, + "paintBorder": true, + "separatorForeground": "#c8d3f5", + "separatorColor": "#2f334d", + "Toolbar": { + "Floating.background": "#191a2a", + "background": "#191a2a", + "borderColor": "#191a2a" + } + }, + "PopupMenu": { + "background": "#222436", + "border": "2,0,2,0", + "foreground": "#c8d3f5", + "translucentBackground": "#222436" + }, + "PopupMenuSeparator.height": 10, + "PopupMenuSeparator.stripeIndent": 5, + "ProgressBar": { + "background": "#222436", + "foreground": "#4fd6be", + "indeterminateEndColor": "#4fd6be", + "indeterminateStartColor": "#4fd6be", + "progressColor": "#4fd6be", + "selectionBackground": "#444a73", + "trackColor": "#444a73" + }, + "PsiViewer": { + "referenceHighlightColor": "#4fd6be" + }, + "RadioButton": { + "background": "#222436", + "disabledText": "#828bb8", + "foreground": "#c8d3f5" + }, + "RadioButtonMenuItem": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#a9b8e8", + "background": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "ScreenView.borderColor": "#222436", + "ScrollBar": { + "background": "#222436", + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "Mac": { + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630", + "Transparent": { + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630" + } + }, + "thumb": "#444a73", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630", + "Transparent": { + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630" + } + }, + "SearchEverywhere": { + "Advertiser": { + "background": "#191a2a", + "foreground": "#a9b8e8" + }, + "Header": { + "background": "#222436" + }, + "List": { + "separatorForeground": "#a9b8e8", + "separatorColor": "#222436" + }, + "SearchField": { + "background": "#222436", + "borderColor": "#191a2a", + "infoForeground": "#a9b8e8" + }, + "Tab": { + "active.foreground": "#FFFFFF", + "selectedForeground": "#FFFFFF", + "selectedBackground": "#444a73" + } + }, + "SearchMatch": { + "endBackground": "#4fd6be", + "startBackground": "#4fd6be", + "endColor": "#4fd6be", + "startColor": "#4fd6be" + }, + "SearchField.errorBackground": "#191a2a", + "SearchOption": { + "selectedBackground": "#2f334d" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#a9b8e8", + "Repeated.File.Foreground": "#c8d3f5" + }, + "Separator": { + "background": "#2f334d", + "foreground": "#2f334d", + "separatorColor": "#2f334d" + }, + "SidePanel": { + "background": "#191a2a" + }, + "Slider": { + "background": "#222436", + "buttonBorderColor": "#4fd6be", + "buttonColor": "#4fd6be", + "foreground": "#c8d3f5", + "majorTickLength": 6, + "tickColor": "#2f334d", + "trackColor": "#2f334d", + "trackWidth": 7, + "thumb": "#4fd6be" + }, + "SpeedSearch": { + "background": "#444a73", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "errorForeground": "#c8d3f5" + }, + "Spinner": { + "background": "#222436", + "border": "3,3,3,3", + "foreground": "#c8d3f5", + "selectionForeground": "#FFFFFF" + }, + "SplitPane": { + "background": "#222436", + "highlight": "#191a2a" + }, + "SplitPaneDivider.draggingColor": "#2f334d", + "StatusBar": { + "borderColor": "#222436", + "hoverBackground": "#444a73", + "LightEditBackground": "#2f334d" + }, + "TabbedPane": { + "background": "#222436", + "contentAreaColor": "#444a73", + "contentBorderInsets": "3,1,1,1", + "darkShadow": "#222436", + "disabledForeground": "#828bb8", + "disabledUnderlineColor": "#828bb8", + "focus": "#2f334d", + "focusColor": "#2f334d", + "fontSizeOffset": 0, + "foreground": "#c8d3f5", + "highlight": "#222436", + "hoverColor": "#444a73", + "labelShift": 0, + "selectedForeground": "#FFFFFF", + "selectedLabelShift": 0, + "selectedTabPadInsets": "0,0,0,0", + "tabsOverlapBorder": true, + "tabHeight": 32, + "tabInsets": "5,10,5,10", + "tabSelectionHeight": 2, + "underlineColor": "#4fd6be" + }, + "TabbedPane.mt.tab.background": "#191a2a", + "Table": { + "alternativeRowBackground": "#191a2a", + "background": "#222436", + "cellNoFocusBorder": "10,5,10,5", + "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#828bb8", + "dropLineColor": "#4fd6be", + "dropLineShortColor": "#4fd6be", + "focusCellBackground": "#2f334d", + "focusCellForeground": "#FFFFFF", + "foreground": "#c8d3f5", + "gridColor": "#222436", + "highlightOuter": "#2f334d", + "hoverBackground": "#444a7370", + "hoverInactiveBackground": "#2f334d", + "lightSelectionForeground": "#FFFFFF", + "lightSelectionInactiveForeground": "#a9b8e8", + "lightSelectionInactiveBackground": "#2f334d", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF", + "selectionInactiveBackground": "#2f334d", + "selectionInactiveForeground": "#FFFFFF", + "sortIconColor": "#c8d3f5", + "stripeColor": "#191a2a" + }, + "TableHeader": { + "background": "#222436", + "borderColor": "#222436", + "bottomSeparatorColor": "#2f334d", + "cellBorder": "4,0,4,0", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "focusCellBackground": "#2f334d", + "focusCellForeground": "#FFFFFF", + "height": 25, + "separatorColor": "#2f334d" + }, + "text": "#a9b8e8", + "textInactiveText": "#a9b8e8", + "textText": "#a9b8e8", + "TextArea": { + "background": "#191a2a", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "TextField": { + "background": "#191a2a", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "TextPane": { + "background": "#191a2a", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "TitlePane": { + "background": "#191a2a", + "Button.hoverBackground": "#444a73", + "inactiveBackground": "#222436", + "infoForeground": "#a9b8e8", + "inactiveInfoForeground": "#a9b8e8" + }, + "TitledBorder.titleColor": "#c8d3f5", + "ToggleButton": { + "borderColor": "#444a73", + "buttonColor": "#c8d3f5", + "disabledText": "#828bb8", + "foreground": "#c8d3f5", + "offForeground": "#222436", + "offBackground": "#222436", + "onBackground": "#4fd6be", + "onForeground": "#4fd6be" + }, + "ToolBar": { + "background": "#191a2a", + "borderHandleColor": "#a9b8e8", + "floatingForeground": "#a9b8e8", + "foreground": "#c8d3f5" + }, + "ToolTip": { + "Actions.background": "#222436", + "Actions.infoForeground": "#a9b8e8", + "background": "#191a2a", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "separatorColor": "#222436", + "shortcutForeground": "#a9b8e8" + }, + "ToolWindow": { + "Button": { + "hoverBackground": "#2f334d", + "selectedForeground": "#FFFFFF", + "selectedBackground": "#191a2a" + }, + "Header": { + "background": "#222436", + "borderColor": "#2f334d", + "inactiveBackground": "#222436" + }, + "HeaderCloseButton": { + "background": "#222436" + }, + "HeaderTab": { + "borderColor": "#444a73", + "hoverBackground": "#444a73", + "hoverInactiveBackground": "#444a73", + "inactiveUnderlineColor": "#4fd6be", + "selectedBackground": "#191a2a", + "selectedInactiveBackground": "#191a2a", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabInactiveBackground": "#2f334d", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#c8d3f5" + } + }, + "Tree": { + "background": "#191a2a", + "foreground": "#a9b8e8", + "hash": "#222436", + "hoverBackground": "#444a7370", + "hoverInactiveBackground": "#2f334d", + "modifiedItemForeground": "#4fd6be", + "rowHeight": 28, + "selectionBackground": "#444a7370", + "selectionForeground": "#FFFFFF", + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#444a7370", + "textBackground": "#191a2a" + }, + "Tree.leftChildIndent": 10, + "Tree.rightChildIndent": 5, + "UIDesigner": { + "Activity.borderColor": "#222436", + "Canvas.background": "#191a2a", + "ColorPicker": { + "background": "#222436", + "foreground": "#c8d3f5" + }, + "Component": { + "borderColor": "#222436", + "background": "#222436", + "foreground": "#c8d3f5", + "hoverBorderColor": "#444a73" + }, + "Connector": { + "borderColor": "#222436", + "hoverBorderColor": "#444a73" + }, + "Canvas.background": "#191a2a", + "highStroke.foreground": "#c8d3f5", + "Label.foreground": "#a9b8e8", + "List.selectionBackground": "#444a7370", + "motion": { + "borderColor": "#222436", + "Component.foreground": "#c8d3f5", + "ConstraintSetText.foreground": "#a9b8e8", + "ConstraintSet.background": "#2f334d", + "CSPanel.SelectedFocusBackground": "#444a73", + "CSPanel.SelectedBackground": "#444a7370", + "cs_FocusText.infoForeground": "#a9b8e8", + "CursorTextColor.foreground": "#c8d3f5", + "HoverColor.disabledBackground": "#828bb8", + "motionGraph.background": "#222436", + "Notification.background": "#191a2a", + "ourAvg.background": "#2f334d", + "ourCS.background": "#2f334d", + "ourCS_Border.borderColor": "#222436", + "ourCS_TextColor.foreground": "#a9b8e8", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#2f334d", + "ourCS_SelectedBorder.pressedBorderColor": "#444a73", + "ourML_BarColor.separatorColor": "#222436", + "PrimaryPanel.background": "#191a2a", + "SecondaryPanel.background": "#222436", + "SecondaryPanel.header.foreground": "#a9b8e8", + "SecondaryPanel.header.background": "#191a2a", + "timeLine.disabledBorderColor": "#222436" + }, + "Panel": { + "borderColor": "#222436", + "background": "#222436" + }, + "percent.foreground": "#c8d3f5", + "Placeholder": { + "background": "#222436", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "selectedForeground": "#FFFFFF" + }, + "Preview.background": "#222436", + "stroke.acceleratorForeground": "#a9b8e8" + }, + "ValidationTooltip": { + "errorBackground": "#191a2a", + "errorBorderColor": "#191a2a", + "warningBackground": "#191a2a", + "warningBorderColor": "#191a2a" + }, + "VersionControl": { + "FileHistory.Commit": { + "selectedBranchBackground": "#222436" + }, + "GitCommits": { + "graphColor": "#444a73" + }, + "GitLog": { + "localBranchIconColor": "#4fd6be", + "otherIconColor": "#a9b8e8", + "remoteBranchIconColor": "#c8d3f5", + "tagIconColor": "#a9b8e8" + }, + "HgLog": { + "branchIconColor": "#4fd6be", + "bookmarkIconColor": "#FFFFFF", + "closedBranchIconColor": "#828bb8", + "localTagIconColor": "#a9b8e8", + "mqTagIconColor": "#a9b8e8", + "tagIconColor": "#a9b8e8", + "tipIconColor": "#a9b8e8" + }, + "Log": { + "Commit.unmatchedForeground": "#a9b8e8", + "Commit.currentBranchBackground": "#2f334d", + "Commit.hoveredBackground": "#444a7370" + }, + "RefLabel": { + "foreground": "#FFFFFF", + "backgroundBase": "#444a73" + } + }, + "Viewport": { + "background": "#191a2a", + "foreground": "#c8d3f5" + }, + "WelcomeScreen": { + "AssociatedComponent.background": "#222436", + "background": "#222436", + "borderColor": "#222436", + "captionBackground": "#191a2a", + "captionForeground": "#c8d3f5", + "Details.background": "#222436", + "footerBackground": "#191a2a", + "footerForeground": "#c8d3f5", + "headerBackground": "#222436", + "headerForeground": "#c8d3f5", + "List.background": "#191a2a", + "separatorColor": "#222436", + "SidePanel.background": "#2f334d", + "Projects": { + "actions.background": "#191a2a", + "actions.selectionBackground": "#444a73", + "background": "#2f334d", + "selectionBackground": "#444a73", + "selectionInactiveBackground": "#2f334d" + } + }, + "window": "#191a2a", + "windowBorder": "#222436", + "windowText": "#a9b8e8", + "Window.border": "#222436" + }, + "icons": { + "ColorPalette": { + "#43494A": "#191a2a", + "#6B6B6B": "#a9b8e8", + "#A7A7A7": "#222436", + "#3D6185": "#4fd6be", + "#466D94": "#4fd6be", + "#3C3F41": "#222436", + "#545556": "#828bb8", + "#606060": "#828bb8", + "#9AA7B0": "#c8d3f5", + "#675133": "#4fd6be", + "Actions.Blue": "#82aaff", + "Actions.Green": "#c3e88d", + "Actions.Grey": "#a9b8e8", + "Actions.GreyInline": "#7a88cf", + "Actions.GreyInline.Dark": "#c8d3f5", + "Actions.Red": "#ff757f", + "Actions.Yellow": "#c099ff", + "Checkbox.Background.Default": "#191a2a", + "Checkbox.Background.Default.Dark": "#191a2a", + "Checkbox.Background.Disabled": "#2f334d", + "Checkbox.Background.Disabled.Dark": "#2f334d", + "Checkbox.Border.Default": "#222436", + "Checkbox.Border.Default.Dark": "#222436", + "Checkbox.Border.Disabled": "#828bb8", + "Checkbox.Border.Disabled.Dark": "#828bb8", + "Checkbox.Focus.Thin.Default": "#4fd6be", + "Checkbox.Focus.Thin.Default.Dark": "#4fd6be", + "Checkbox.Focus.Wide": "#4fd6be", + "Checkbox.Focus.Wide.Dark": "#4fd6be", + "Checkbox.Foreground.Disabled": "#828bb8", + "Checkbox.Foreground.Disabled.Dark": "#828bb8", + "Checkbox.Background.Selected": "#4fd6be", + "Checkbox.Background.Selected.Dark": "#222436", + "Checkbox.Border.Selected": "#4fd6be", + "Checkbox.Border.Selected.Dark": "#4fd6be", + "Checkbox.Foreground.Selected": "#4fd6be", + "Checkbox.Foreground.Selected.Dark": "#4fd6be", + "Checkbox.Focus.Thin.Selected": "#c8d3f5", + "Checkbox.Focus.Thin.Selected.Dark": "#c8d3f5", + "Objects.Grey": "#7a88cf", + "Objects.Blue": "#82aaff", + "Objects.RedStatus": "#ff757f", + "Objects.Red": "#ff757f", + "Objects.Pink": "#c099ff", + "Objects.Yellow": "#c099ff", + "Objects.Green": "#c3e88d", + "Objects.Purple": "#c099ff", + "Objects.BlackText": "#c8d3f5", + "Objects.YellowDark": "#ff966c", + "Objects.GreenAndroid": "#c3e88d" + } + } +} diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight.theme.json new file mode 100644 index 00000000..4ab94a73 --- /dev/null +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Moonlight.theme.json @@ -0,0 +1,1010 @@ +{ + "name": "Moonlight", + "dark": true, + "author": "Mallowigi", + "editorScheme": "/colors/Moonlight.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/moonlight.svg", + "fill": "scale", + "transparency": 50 + }, + "ui": { + "*": { + "acceleratorSelectionForeground": "#a9b8e8", + "background": "#222436", + "borderColor": "#222436", + "disabledBackground": "#2f334d", + "disabledForeground": "#828bb8", + "disabledText": "#828bb8", + "focusColor": "#444a73", + "focusedBorderColor": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveBackground": "#2f334d", + "inactiveForeground": "#a9b8e8", + "infoForeground": "#a9b8e8", + "selectionBackground": "#444a73", + "selectionBackgroundInactive": "#2f334d", + "selectionForeground": "#FFFFFF", + "selectionInactiveBackground": "#2f334d", + "separatorColor": "#222436" + }, + "activeCaption": "#222436", + "ActionButton": { + "hoverBackground": "#4fd6be50", + "hoverBorderColor": "#4fd6be50", + "hoverSeparatorColor": "#444a73", + "focusedBorderColor": "#4fd6be50", + "pressedBackground": "#4fd6be50", + "pressedBorderColor": "#4fd6be50" + }, + "Autocomplete": { + "selectionBackground": "#444a73" + }, + "Borders.ContrastBorderColor": "#222436", + "Borders.color": "#222436", + "Button": { + "arc": 0, + "background": "#222436", + "default": { + "endBackground": "#2f334d", + "endBorderColor": "#2f334d", + "foreground": "#FFFFFF", + "focusColor": "#4fd6be", + "focusedBorderColor": "#4fd6be", + "shadowColor": "#2f334d", + "startBackground": "#2f334d", + "startBorderColor": "#2f334d" + }, + "disabledBorderColor": "#444a73", + "disabledText": "#828bb8", + "endBackground": "#444a73", + "endBorderColor": "#444a73", + "focus": "#444a73", + "focusedBorderColor": "#4fd6be", + "foreground": "#a9b8e8", + "highlight": "#FFFFFF", + "mt.background": "#444a73", + "mt.foreground": "#a9b8e8", + "mt.selectedForeground": "#FFFFFF", + "mt.selection.color1": "#2f334d", + "mt.selection.color2": "#2f334d", + "startBackground": "#444a73", + "startBorderColor": "#444a73", + "shadowColor": "#444a73", + "shadowWidth": 0 + }, + "Canvas": { + "Tooltip.borderColor": "#222436", + "Tooltip.background": "#191a2a" + }, + "Content": { + "background": "#191a2a", + "selectionBackground": "#444a73" + }, + "CheckBox": { + "background": "#222436", + "disabledText": "#828bb8", + "foreground": "#c8d3f5", + "select": "#4fd6be" + }, + "CheckBoxMenuItem": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#a9b8e8", + "background": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "CodeWithMe": { + "Avatar.foreground": "#c8d3f5", + "AccessEnabled": { + "accessDot": "#4fd6be", + "dropdownBorder": "#2f334d", + "pillBackground": "$second" + } + }, + "ColorChooser": { + "background": "#222436", + "foreground": "#c8d3f5", + "swatchesDefaultRecentColor": "#c8d3f5" + }, + "ComboBoxButton.background": "#444a73", + "ComboBox": { + "ArrowButton": { + "background": "#444a73", + "disabledIconColor": "#828bb8", + "iconColor": "#c8d3f5", + "nonEditableBackground": "#222436" + }, + "background": "#222436", + "buttonBackground": "#444a73", + "darcula.hoveredArrowButtonForeground": "#4fd6be", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "modifiedItemForeground": "#4fd6be", + "nonEditableBackground": "#2f334d", + "padding": "5,5,5,5", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "ComboPopup.border": "#222436", + "CompletionPopup": { + "background": "#2f334d", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "matchForeground": "#4fd6be", + "matchSelectionForeground": "#4fd6be", + "nonFocusedState": "false", + "selectedGrayedForeground": "#FFFFFF", + "selectionGrayForeground": "#FFFFFF", + "selectionInactiveInfoForeground": "#a9b8e8", + "selectionInactiveBackground": "#444a7350", + "selectionBackground": "#444a7380", + "selectionForeground": "#FFFFFF", + "selectionInfoForeground": "#FFFFFF" + }, + "Component": { + "arc": 4, + "borderColor": "#444a73", + "disabledBorderColor": "#444a73", + "focusColor": "#4fd6be", + "focusedBorderColor": "#4fd6be", + "hoverIconColor": "#4fd6be", + "infoForeground": "#a9b8e8", + "iconColor": "#c8d3f5" + }, + "control": "#222436", + "controlText": "#a9b8e8", + "Counter": { + "background": "#4fd6be", + "foreground": "#FFFFFF" + }, + "Debugger": { + "Variables": { + "collectingDataForeground": "#a9b8e8", + "changedValueForeground": "#4fd6be", + "errorMessageForeground": "#ff757f", + "evaluatingExpressionForeground": "#a9b8e8", + "exceptionForeground": "#c099ff", + "modifyingValueForeground": "#4fd6be", + "valueForeground": "#4fd6be" + } + }, + "DebuggerTabs": { + "selectedBackground": "#444a73", + "underlinedTabBackground": "#444a73" + }, + "DebuggerPopup": { + "borderColor": "#444a73" + }, + "DefaultTabs": { + "background": "#222436", + "borderColor": "#222436", + "hoverBackground": "#2f334d", + "hoverColor": "#222436", + "hoverMaskColor": "#444a73", + "inactiveColoredTabBackground": "#222436", + "inactiveColoredFileBackground": "#444a73", + "inactiveUnderlineColor": "#4fd6be", + "inactiveMaskColor": "#222436", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabForeground": "#FFFFFF" + }, + "Desktop.background": "#222436", + "DialogWrapper.southPanelBackground": "#222436", + "DialogWrapper.southPanelDivider": "#222436", + "DragAndDrop": { + "areaBackground": "#222436", + "areaBorderColor": "#222436", + "areaForeground": "#c8d3f5" + }, + "Editor": { + "background": "#222436", + "foreground": "#c8d3f5", + "shortcutForeground": "#a9b8e8" + }, + "EditorPane": { + "background": "#222436", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveBackground": "#222436", + "inactiveForeground": "#828bb8", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "EditorTabs": { + "borderColor": "#2f334d", + "hoverBackground": "#444a73", + "hoverColor": "#444a73", + "hoverMaskColor": "#444a73", + "inactiveMaskColor": "#222436", + "inactiveColoredFileBackground": "#222436", + "inactiveUnderlineColor": "#828bb8", + "selectedForeground": "#c8d3f5", + "selectedBackground": "#2f334d", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabForeground": "#FFFFFF" + }, + "EditorGroupsTabs": { + "background": "#222436", + "borderColor": "#2f334d", + "hoverBackground": "#444a73", + "hoverColor": "#444a73", + "inactiveUnderlineColor": "#4fd6be", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabForeground": "#c8d3f5" + }, + "FileColor": { + "Green": "#387002", + "Blue": "#004BA0", + "Yellow": "#2f334d", + "Orange": "#B53D00", + "Violet": "#4D2C91", + "Rose": "#A00037" + }, + "FlameGraph": { + "JVMBackground": "#89DDF7", + "JVMFocusBackground": "#82AAFF", + "JVMSearchNotMatchedBackground": "#FF5370", + "JVMFocusSearchNotMatchedBackground": "#AB7967", + "nativeBackground": "#FFCB6B", + "nativeFocusBackground": "#F78C6C", + "nativeSearchNotMatchedBackground": "#C792EA", + "nativeFocusSearchNotMatchedBackground": "#BB80B3" + }, + "Focus.color": "#222436", + "FormattedTextField": { + "background": "#222436", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveBackground": "#444a73", + "inactiveForeground": "#828bb8", + "selectionForeground": "#FFFFFF", + "selectionBackground": "#2f334d" + }, + "GotItTooltip.borderColor": "#191a2a", + "Group": { + "disabledSeparatorColor": "#222436", + "separatorColor": "#222436" + }, + "GutterTooltip": { + "infoForeground": "#a9b8e8", + "lineSeparatorColor": "#222436" + }, + "HeaderColor": { + "active": "#222436", + "inactive": "#191a2a" + }, + "HelpTooltip": { + "background": "#222436", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "shortcutForeground": "#a9b8e8" + }, + "Hyperlink.linkColor": "#4fd6be", + "inactiveCaption": "#2f334d", + "inactiveCaptionBorder": "#222436", + "inactiveCaptionText": "#a9b8e8", + "info": "#a9b8e8", + "infoText": "#a9b8e8", + "IdeStatusBar.border": "4,4,4,4", + "InformationHint.borderColor": "#222436", + "InplaceRefactoringPopup": { + "borderColor": "#222436" + }, + "InternalFrame": { + "activeTitleForeground": "#c8d3f5", + "background": "#222436", + "inactiveTitleForeground": "#a9b8e8" + }, + "Label": { + "background": "#222436", + "disabledForeground": "#828bb8", + "disabledShadow": "#222436", + "disabledText": "#828bb8", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#c8d3f5" + }, + "Link": { + "activeForeground": "#4fd6be", + "hoverForeground": "#4fd6be", + "pressedForeground": "#4fd6be", + "secondaryForeground": "#a9b8e8", + "visitedForeground": "#4fd6be" + }, + "link.foreground": "#4fd6be", + "List": { + "background": "#2f334d", + "foreground": "#c8d3f5", + "hoverBackground": "#444a7370", + "hoverInactiveBackground": "#2f334d", + "selectionBackground": "#444a7350", + "selectionForeground": "#FFFFFF", + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#444a7370" + }, + "material": { + "background": "#222436", + "branchColor": "#c8d3f5", + "contrast": "#191a2a", + "foreground": "#c8d3f5", + "mergeCommits": "#444a73", + "primaryColor": "#a9b8e8", + "selectionForeground": "#FFFFFF", + "tab.backgroundColor": "#222436", + "tab.borderColor": "#4fd6be", + "tagColor": "#a9b8e8" + }, + "MemoryIndicator": { + "allocatedBackground": "#2f334d", + "usedColor": "#444a73", + "usedBackground": "#444a73" + }, + "Menu": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#FFFFFF", + "background": "#222436", + "border": "4,2,4,2", + "borderColor": "#2f334d", + "disabledBackground": "#2f334d", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF", + "separatorColor": "#222436" + }, + "MenuBar": { + "background": "#222436", + "borderColor": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "highlight": "#222436", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF", + "shadow": "#222436" + }, + "MenuItem": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#FFFFFF", + "border": "4,2,4,2", + "background": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "NavBar": { + "arrowColor": "#c8d3f5", + "borderColor": "#222436" + }, + "NewClass": { + "Panel": { + "background": "#222436" + }, + "SearchField": { + "background": "#222436" + } + }, + "NewPSD.warning": "#4fd6be", + "Notification": { + "background": "#191a2a", + "borderColor": "#191a2a", + "errorBackground": "#191a2a", + "errorBorderColor": "#191a2a", + "foreground": "#c8d3f5", + "MoreButton": { + "background": "#444a73", + "foreground": "#c8d3f5", + "innerBorderColor": "#444a73" + }, + "ToolWindow": { + "errorBackground": "#191a2a", + "errorBorderColor": "#191a2a", + "informativeBackground": "#191a2a", + "informativeBorderColor": "#191a2a", + "warningBackground": "#191a2a", + "warningBorderColor": "#191a2a" + } + }, + "OnePixelDivider.background": "#222436", + "OptionPane": { + "background": "#222436", + "foreground": "#c8d3f5", + "messageForeground": "#c8d3f5" + }, + "Outline": { + "color": "#444a73", + "focusedColor": "#4fd6be", + "disabledColor": "#828bb8" + }, + "Panel": { + "background": "#222436", + "foreground": "#c8d3f5" + }, + "ParameterInfo": { + "background": "#2f334d", + "borderColor": "#2f334d", + "currentOverloadBackground": "#444a73", + "currentParameterForeground": "#4fd6be", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "lineSeparatorColor": "#2f334d" + }, + "PasswordField": { + "background": "#222436", + "capsLockIconColor": "#4fd6be", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "Plugins": { + "background": "#222436", + "disabledForeground": "#828bb8", + "eapTagBackground": "#444a73", + "hoverBackground": "#444a7370", + "lightSelectionBackground": "#2f334d", + "paidTagBackground": "#444a73", + "selectionBackground": "#444a73", + "tagForeground": "#4fd6be", + "tagBackground": "#444a73", + "trialTagBackground": "#444a73", + "Button": { + "installBackground": "#444a73", + "installBorderColor": "#444a73", + "installForeground": "#c8d3f5", + "installFocusedBackground": "#444a73", + "installFillForeground": "#828bb8", + "installFillBackground": "#444a73", + "updateBackground": "#4fd6be", + "updateBorderColor": "#444a73", + "updateForeground": "#c8d3f5" + }, + "SearchField": { + "background": "#222436", + "borderColor": "#222436" + }, + "SectionHeader": { + "background": "#2f334d", + "foreground": "#c8d3f5" + }, + "Tab": { + "hoverBackground": "#2f334d", + "selectedForeground": "#FFFFFF", + "selectedBackground": "#2f334d" + } + }, + "Popup": { + "Advertiser": { + "background": "#222436", + "borderColor": "#222436", + "foreground": "#4fd6be" + }, + "borderColor": "#191a2a", + "inactiveBorderColor": "#222436", + "innerBorderColor": "#2f334d", + "Header": { + "activeBackground": "#222436", + "inactiveBackground": "#191a2a" + }, + "paintBorder": true, + "separatorForeground": "#c8d3f5", + "separatorColor": "#2f334d", + "Toolbar": { + "Floating.background": "#191a2a", + "background": "#191a2a", + "borderColor": "#191a2a" + } + }, + "PopupMenu": { + "background": "#222436", + "border": "2,0,2,0", + "foreground": "#c8d3f5", + "translucentBackground": "#222436" + }, + "PopupMenuSeparator.height": 10, + "PopupMenuSeparator.stripeIndent": 5, + "ProgressBar": { + "background": "#222436", + "foreground": "#4fd6be", + "indeterminateEndColor": "#4fd6be", + "indeterminateStartColor": "#4fd6be", + "progressColor": "#4fd6be", + "selectionBackground": "#444a73", + "trackColor": "#444a73" + }, + "PsiViewer": { + "referenceHighlightColor": "#4fd6be" + }, + "RadioButton": { + "background": "#222436", + "disabledText": "#828bb8", + "foreground": "#c8d3f5" + }, + "RadioButtonMenuItem": { + "acceleratorForeground": "#a9b8e8", + "acceleratorSelectionForeground": "#a9b8e8", + "background": "#222436", + "disabledBackground": "#222436", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "selectionBackground": "#444a73", + "selectionForeground": "#FFFFFF" + }, + "ScreenView.borderColor": "#222436", + "ScrollBar": { + "background": "#222436", + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "Mac": { + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630", + "Transparent": { + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630" + } + }, + "thumb": "#444a73", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630", + "Transparent": { + "hoverThumbBorderColor": "#4fd6be", + "hoverThumbColor": "#4fd6be", + "hoverTrackColor": "#22243630", + "thumbBorderColor": "#4fd6be70", + "thumbColor": "#4fd6be70", + "trackColor": "#22243630" + } + }, + "SearchEverywhere": { + "Advertiser": { + "background": "#191a2a", + "foreground": "#a9b8e8" + }, + "Header": { + "background": "#222436" + }, + "List": { + "separatorForeground": "#a9b8e8", + "separatorColor": "#222436" + }, + "SearchField": { + "background": "#222436", + "borderColor": "#191a2a", + "infoForeground": "#a9b8e8" + }, + "Tab": { + "active.foreground": "#FFFFFF", + "selectedForeground": "#FFFFFF", + "selectedBackground": "#444a73" + } + }, + "SearchMatch": { + "endBackground": "#4fd6be", + "startBackground": "#4fd6be", + "endColor": "#4fd6be", + "startColor": "#4fd6be" + }, + "SearchField.errorBackground": "#191a2a", + "SearchOption": { + "selectedBackground": "#2f334d" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#a9b8e8", + "Repeated.File.Foreground": "#c8d3f5" + }, + "Separator": { + "background": "#2f334d", + "foreground": "#2f334d", + "separatorColor": "#2f334d" + }, + "SidePanel": { + "background": "#222436" + }, + "Slider": { + "background": "#222436", + "buttonBorderColor": "#4fd6be", + "buttonColor": "#4fd6be", + "foreground": "#c8d3f5", + "majorTickLength": 6, + "tickColor": "#2f334d", + "trackColor": "#2f334d", + "trackWidth": 7, + "thumb": "#4fd6be" + }, + "SpeedSearch": { + "background": "#444a73", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "errorForeground": "#c8d3f5" + }, + "Spinner": { + "background": "#222436", + "border": "3,3,3,3", + "foreground": "#c8d3f5", + "selectionForeground": "#FFFFFF" + }, + "SplitPane": { + "background": "#222436", + "highlight": "#222436" + }, + "SplitPaneDivider.draggingColor": "#2f334d", + "StatusBar": { + "borderColor": "#222436", + "hoverBackground": "#444a73", + "LightEditBackground": "#2f334d" + }, + "TabbedPane": { + "background": "#222436", + "contentAreaColor": "#444a73", + "contentBorderInsets": "3,1,1,1", + "darkShadow": "#222436", + "disabledForeground": "#828bb8", + "disabledUnderlineColor": "#828bb8", + "focus": "#2f334d", + "focusColor": "#2f334d", + "fontSizeOffset": 0, + "foreground": "#c8d3f5", + "highlight": "#222436", + "hoverColor": "#444a73", + "labelShift": 0, + "selectedForeground": "#FFFFFF", + "selectedLabelShift": 0, + "selectedTabPadInsets": "0,0,0,0", + "tabsOverlapBorder": true, + "tabHeight": 32, + "tabInsets": "5,10,5,10", + "tabSelectionHeight": 2, + "underlineColor": "#4fd6be" + }, + "TabbedPane.mt.tab.background": "#222436", + "Table": { + "alternativeRowBackground": "#191a2a", + "background": "#222436", + "cellNoFocusBorder": "10,5,10,5", + "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#828bb8", + "dropLineColor": "#4fd6be", + "dropLineShortColor": "#4fd6be", + "focusCellBackground": "#2f334d", + "focusCellForeground": "#FFFFFF", + "foreground": "#c8d3f5", + "gridColor": "#222436", + "highlightOuter": "#2f334d", + "hoverBackground": "#444a7370", + "hoverInactiveBackground": "#2f334d", + "lightSelectionForeground": "#FFFFFF", + "lightSelectionInactiveForeground": "#a9b8e8", + "lightSelectionInactiveBackground": "#2f334d", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF", + "selectionInactiveBackground": "#2f334d", + "selectionInactiveForeground": "#FFFFFF", + "sortIconColor": "#c8d3f5", + "stripeColor": "#191a2a" + }, + "TableHeader": { + "background": "#222436", + "borderColor": "#222436", + "bottomSeparatorColor": "#2f334d", + "cellBorder": "4,0,4,0", + "disabledForeground": "#828bb8", + "foreground": "#c8d3f5", + "focusCellBackground": "#2f334d", + "focusCellForeground": "#FFFFFF", + "height": 25, + "separatorColor": "#2f334d" + }, + "text": "#a9b8e8", + "textInactiveText": "#a9b8e8", + "textText": "#a9b8e8", + "TextArea": { + "background": "#222436", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "TextField": { + "background": "#222436", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "TextPane": { + "background": "#222436", + "caretForeground": "#4fd6be", + "foreground": "#c8d3f5", + "inactiveForeground": "#828bb8", + "selectionBackground": "#2f334d", + "selectionForeground": "#FFFFFF" + }, + "TitlePane": { + "background": "#191a2a", + "Button.hoverBackground": "#444a73", + "inactiveBackground": "#222436", + "infoForeground": "#a9b8e8", + "inactiveInfoForeground": "#a9b8e8" + }, + "TitledBorder.titleColor": "#c8d3f5", + "ToggleButton": { + "borderColor": "#444a73", + "buttonColor": "#c8d3f5", + "disabledText": "#828bb8", + "foreground": "#c8d3f5", + "offForeground": "#222436", + "offBackground": "#222436", + "onBackground": "#4fd6be", + "onForeground": "#4fd6be" + }, + "ToolBar": { + "background": "#222436", + "borderHandleColor": "#a9b8e8", + "floatingForeground": "#a9b8e8", + "foreground": "#c8d3f5" + }, + "ToolTip": { + "Actions.background": "#222436", + "Actions.infoForeground": "#a9b8e8", + "background": "#191a2a", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "infoForeground": "#a9b8e8", + "separatorColor": "#222436", + "shortcutForeground": "#a9b8e8" + }, + "ToolWindow": { + "Button": { + "hoverBackground": "#2f334d", + "selectedForeground": "#FFFFFF", + "selectedBackground": "#191a2a" + }, + "Header": { + "background": "#222436", + "borderColor": "#2f334d", + "inactiveBackground": "#222436" + }, + "HeaderCloseButton": { + "background": "#222436" + }, + "HeaderTab": { + "borderColor": "#444a73", + "hoverBackground": "#444a73", + "hoverInactiveBackground": "#444a73", + "inactiveUnderlineColor": "#4fd6be", + "selectedBackground": "#191a2a", + "selectedInactiveBackground": "#191a2a", + "underlineColor": "#4fd6be", + "underlinedTabBackground": "#2f334d", + "underlinedTabInactiveBackground": "#2f334d", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#c8d3f5" + } + }, + "Tree": { + "background": "#222436", + "foreground": "#a9b8e8", + "hash": "#222436", + "hoverBackground": "#444a7370", + "hoverInactiveBackground": "#2f334d", + "modifiedItemForeground": "#4fd6be", + "rowHeight": 28, + "selectionBackground": "#444a7370", + "selectionForeground": "#FFFFFF", + "selectionInactiveForeground": "#FFFFFF", + "selectionInactiveBackground": "#444a7370", + "textBackground": "#222436" + }, + "Tree.leftChildIndent": 10, + "Tree.rightChildIndent": 5, + "UIDesigner": { + "Activity.borderColor": "#222436", + "Canvas.background": "#191a2a", + "ColorPicker": { + "background": "#222436", + "foreground": "#c8d3f5" + }, + "Component": { + "borderColor": "#222436", + "background": "#222436", + "foreground": "#c8d3f5", + "hoverBorderColor": "#444a73" + }, + "Connector": { + "borderColor": "#222436", + "hoverBorderColor": "#444a73" + }, + "Canvas.background": "#191a2a", + "highStroke.foreground": "#c8d3f5", + "Label.foreground": "#a9b8e8", + "List.selectionBackground": "#444a7370", + "motion": { + "borderColor": "#222436", + "Component.foreground": "#c8d3f5", + "ConstraintSetText.foreground": "#a9b8e8", + "ConstraintSet.background": "#2f334d", + "CSPanel.SelectedFocusBackground": "#444a73", + "CSPanel.SelectedBackground": "#444a7370", + "cs_FocusText.infoForeground": "#a9b8e8", + "CursorTextColor.foreground": "#c8d3f5", + "HoverColor.disabledBackground": "#828bb8", + "motionGraph.background": "#222436", + "Notification.background": "#191a2a", + "ourAvg.background": "#2f334d", + "ourCS.background": "#2f334d", + "ourCS_Border.borderColor": "#222436", + "ourCS_TextColor.foreground": "#a9b8e8", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#2f334d", + "ourCS_SelectedBorder.pressedBorderColor": "#444a73", + "ourML_BarColor.separatorColor": "#222436", + "PrimaryPanel.background": "#191a2a", + "SecondaryPanel.background": "#222436", + "SecondaryPanel.header.foreground": "#a9b8e8", + "SecondaryPanel.header.background": "#191a2a", + "timeLine.disabledBorderColor": "#222436" + }, + "Panel": { + "borderColor": "#222436", + "background": "#222436" + }, + "percent.foreground": "#c8d3f5", + "Placeholder": { + "background": "#222436", + "borderColor": "#222436", + "foreground": "#c8d3f5", + "selectedForeground": "#FFFFFF" + }, + "Preview.background": "#222436", + "stroke.acceleratorForeground": "#a9b8e8" + }, + "ValidationTooltip": { + "errorBackground": "#191a2a", + "errorBorderColor": "#191a2a", + "warningBackground": "#191a2a", + "warningBorderColor": "#191a2a" + }, + "VersionControl": { + "FileHistory.Commit": { + "selectedBranchBackground": "#222436" + }, + "GitCommits": { + "graphColor": "#444a73" + }, + "GitLog": { + "localBranchIconColor": "#4fd6be", + "otherIconColor": "#a9b8e8", + "remoteBranchIconColor": "#c8d3f5", + "tagIconColor": "#a9b8e8" + }, + "HgLog": { + "branchIconColor": "#4fd6be", + "bookmarkIconColor": "#FFFFFF", + "closedBranchIconColor": "#828bb8", + "localTagIconColor": "#a9b8e8", + "mqTagIconColor": "#a9b8e8", + "tagIconColor": "#a9b8e8", + "tipIconColor": "#a9b8e8" + }, + "Log": { + "Commit.unmatchedForeground": "#a9b8e8", + "Commit.currentBranchBackground": "#2f334d", + "Commit.hoveredBackground": "#444a7370" + }, + "RefLabel": { + "foreground": "#FFFFFF", + "backgroundBase": "#444a73" + } + }, + "Viewport": { + "background": "#222436", + "foreground": "#c8d3f5" + }, + "WelcomeScreen": { + "AssociatedComponent.background": "#222436", + "background": "#222436", + "borderColor": "#222436", + "captionBackground": "#191a2a", + "captionForeground": "#c8d3f5", + "Details.background": "#222436", + "footerBackground": "#191a2a", + "footerForeground": "#c8d3f5", + "headerBackground": "#222436", + "headerForeground": "#c8d3f5", + "List.background": "#191a2a", + "separatorColor": "#222436", + "SidePanel.background": "#2f334d", + "Projects": { + "actions.background": "#191a2a", + "actions.selectionBackground": "#444a73", + "background": "#2f334d", + "selectionBackground": "#444a73", + "selectionInactiveBackground": "#2f334d" + } + }, + "window": "#222436", + "windowBorder": "#222436", + "windowText": "#a9b8e8", + "Window.border": "#222436" + }, + "icons": { + "ColorPalette": { + "#43494A": "#191a2a", + "#6B6B6B": "#a9b8e8", + "#A7A7A7": "#222436", + "#3D6185": "#4fd6be", + "#466D94": "#4fd6be", + "#3C3F41": "#222436", + "#545556": "#828bb8", + "#606060": "#828bb8", + "#9AA7B0": "#c8d3f5", + "#675133": "#4fd6be", + "Actions.Blue": "#82aaff", + "Actions.Green": "#c3e88d", + "Actions.Grey": "#a9b8e8", + "Actions.GreyInline": "#7a88cf", + "Actions.GreyInline.Dark": "#c8d3f5", + "Actions.Red": "#ff757f", + "Actions.Yellow": "#c099ff", + "Checkbox.Background.Default": "#191a2a", + "Checkbox.Background.Default.Dark": "#191a2a", + "Checkbox.Background.Disabled": "#2f334d", + "Checkbox.Background.Disabled.Dark": "#2f334d", + "Checkbox.Border.Default": "#222436", + "Checkbox.Border.Default.Dark": "#222436", + "Checkbox.Border.Disabled": "#828bb8", + "Checkbox.Border.Disabled.Dark": "#828bb8", + "Checkbox.Focus.Thin.Default": "#4fd6be", + "Checkbox.Focus.Thin.Default.Dark": "#4fd6be", + "Checkbox.Focus.Wide": "#4fd6be", + "Checkbox.Focus.Wide.Dark": "#4fd6be", + "Checkbox.Foreground.Disabled": "#828bb8", + "Checkbox.Foreground.Disabled.Dark": "#828bb8", + "Checkbox.Background.Selected": "#4fd6be", + "Checkbox.Background.Selected.Dark": "#222436", + "Checkbox.Border.Selected": "#4fd6be", + "Checkbox.Border.Selected.Dark": "#4fd6be", + "Checkbox.Foreground.Selected": "#4fd6be", + "Checkbox.Foreground.Selected.Dark": "#4fd6be", + "Checkbox.Focus.Thin.Selected": "#c8d3f5", + "Checkbox.Focus.Thin.Selected.Dark": "#c8d3f5", + "Objects.Grey": "#7a88cf", + "Objects.Blue": "#82aaff", + "Objects.RedStatus": "#ff757f", + "Objects.Red": "#ff757f", + "Objects.Pink": "#c099ff", + "Objects.Yellow": "#c099ff", + "Objects.Green": "#c3e88d", + "Objects.Purple": "#c099ff", + "Objects.BlackText": "#c8d3f5", + "Objects.YellowDark": "#ff966c", + "Objects.GreenAndroid": "#c3e88d" + } + } +} diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl Contrast.theme.json index 2e6a6b24..a8a0314a 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl Contrast.theme.json @@ -3,176 +3,196 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Night Owl.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/nightowl.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { - "acceleratorSelectionForeground": "#5f7e97", + "acceleratorSelectionForeground": "#607d8b", "background": "#011627", - "borderColor": "#122d42", - "disabledBackground": "#0e293f", - "disabledForeground": "#697098", - "disabledText": "#697098", - "focusColor": "#084d81", + "borderColor": "#2a373e", + "disabledBackground": "#0B253A", + "disabledForeground": "#2e3c42", + "disabledText": "#2e3c42", + "focusColor": "#152C3B", "focusedBorderColor": "#7e57c2", - "foreground": "#d6deeb", - "inactiveBackground": "#0e293f", - "inactiveForeground": "#5f7e97", - "infoForeground": "#5f7e97", - "selectionBackground": "#5f7e97", - "selectionBackgroundInactive": "#0b2942", + "foreground": "#b0bec5", + "inactiveBackground": "#0B253A", + "inactiveForeground": "#607d8b", + "infoForeground": "#607d8b", + "selectionBackground": "#152C3B", + "selectionBackgroundInactive": "#011627", "selectionForeground": "#ffffff", - "selectionInactiveBackground": "#0b2942", - "separatorColor": "#122d42" + "selectionInactiveBackground": "#011627", + "separatorColor": "#2a373e" }, "activeCaption": "#011627", "ActionButton": { "hoverBackground": "#7e57c250", "hoverBorderColor": "#7e57c250", - "hoverSeparatorColor": "#0b253a", + "hoverSeparatorColor": "#2e3c43", "focusedBorderColor": "#7e57c250", "pressedBackground": "#7e57c250", "pressedBorderColor": "#7e57c250" }, "Autocomplete": { - "selectionBackground": "#5f7e97" + "selectionBackground": "#152C3B" }, "Borders.ContrastBorderColor": "#011627", - "Borders.color": "#122d42", + "Borders.color": "#2a373e", "Button": { "arc": 0, "background": "#011627", "default": { - "endBackground": "#13344f", - "endBorderColor": "#13344f", + "endBackground": "#152C3B", + "endBorderColor": "#152C3B", "foreground": "#ffffff", "focusColor": "#7e57c2", "focusedBorderColor": "#7e57c2", - "shadowColor": "#13344f", - "startBackground": "#13344f", - "startBorderColor": "#13344f" + "shadowColor": "#152C3B", + "startBackground": "#152C3B", + "startBorderColor": "#152C3B" }, - "disabledBorderColor": "#0b253a", - "disabledText": "#697098", - "endBackground": "#0b253a", - "endBorderColor": "#0b253a", - "focus": "#084d81", + "disabledBorderColor": "#2e3c43", + "disabledText": "#2e3c42", + "endBackground": "#2e3c43", + "endBorderColor": "#2e3c43", + "focus": "#152C3B", "focusedBorderColor": "#7e57c2", - "foreground": "#5f7e97", + "foreground": "#607d8b", "highlight": "#ffffff", - "mt.background": "#0b253a", - "mt.foreground": "#5f7e97", + "mt.background": "#2e3c43", + "mt.foreground": "#607d8b", "mt.selectedForeground": "#ffffff", - "mt.selection.color1": "#13344f", - "mt.selection.color2": "#13344f", - "startBackground": "#0b253a", - "startBorderColor": "#0b253a", - "shadowColor": "#0b253a", + "mt.selection.color1": "#152C3B", + "mt.selection.color2": "#152C3B", + "startBackground": "#2e3c43", + "startBorderColor": "#2e3c43", + "shadowColor": "#2e3c43", "shadowWidth": 0 }, "Canvas": { - "Tooltip.borderColor": "#122d42", - "Tooltip.background": "#01111d" + "Tooltip.borderColor": "#2a373e", + "Tooltip.background": "#152C3B" + }, + "Content": { + "background": "#001424", + "selectionBackground": "#152C3B" }, - "Content.background": "#010e1a", "CheckBox": { "background": "#011627", - "disabledText": "#697098", - "foreground": "#d6deeb", + "disabledText": "#2e3c42", + "foreground": "#b0bec5", "select": "#7e57c2" }, "CheckBoxMenuItem": { - "acceleratorForeground": "#5f7e97", - "acceleratorSelectionForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", + "acceleratorSelectionForeground": "#607d8b", "background": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, + "CodeWithMe": { + "Avatar.foreground": "#b0bec5", + "AccessEnabled": { + "accessDot": "#7e57c2", + "dropdownBorder": "#011627", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#011627", - "foreground": "#d6deeb", - "swatchesDefaultRecentColor": "#d6deeb" + "foreground": "#b0bec5", + "swatchesDefaultRecentColor": "#b0bec5" }, - "ComboBoxButton.background": "#0b253a", + "ComboBoxButton.background": "#2e3c43", "ComboBox": { "ArrowButton": { - "background": "#0b253a", - "disabledIconColor": "#697098", - "iconColor": "#d6deeb", + "background": "#2e3c43", + "disabledIconColor": "#2e3c42", + "iconColor": "#b0bec5", "nonEditableBackground": "#011627" }, - "background": "#010e1a", - "buttonBackground": "#0b253a", - "disabledForeground": "#697098", - "foreground": "#d6deeb", + "background": "#001424", + "buttonBackground": "#2e3c43", + "darcula.hoveredArrowButtonForeground": "#7e57c2", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", "modifiedItemForeground": "#7e57c2", - "nonEditableBackground": "#0b2942", + "nonEditableBackground": "#011627", "padding": "5,5,5,5", - "selectionBackground": "#13344f", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, - "ComboPopup.border": "#122d42", + "ComboPopup.border": "#2a373e", "CompletionPopup": { - "background": "#0b2942", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", + "background": "#011627", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", "matchForeground": "#7e57c2", "matchSelectionForeground": "#7e57c2", "nonFocusedState": "false", "selectedGrayedForeground": "#ffffff", "selectionGrayForeground": "#ffffff", - "selectionInactiveInfoForeground": "#5f7e97", - "selectionInactiveBackground": "#5f7e9750", - "selectionBackground": "#5f7e9780", + "selectionInactiveInfoForeground": "#607d8b", + "selectionInactiveBackground": "#152C3B50", + "selectionBackground": "#152C3B80", "selectionForeground": "#ffffff", "selectionInfoForeground": "#ffffff" }, "Component": { "arc": 4, - "borderColor": "#084d81", - "disabledBorderColor": "#0b253a", + "borderColor": "#152C3B", + "disabledBorderColor": "#2e3c43", "focusColor": "#7e57c2", "focusedBorderColor": "#7e57c2", "hoverIconColor": "#7e57c2", - "infoForeground": "#5f7e97", - "iconColor": "#d6deeb" + "infoForeground": "#607d8b", + "iconColor": "#b0bec5" }, "control": "#011627", - "controlText": "#5f7e97", + "controlText": "#607d8b", "Counter": { "background": "#7e57c2", "foreground": "#ffffff" }, "Debugger": { "Variables": { - "collectingDataForeground": "#5f7e97", + "collectingDataForeground": "#607d8b", "changedValueForeground": "#7e57c2", "errorMessageForeground": "#7fdbca", - "evaluatingExpressionForeground": "#5f7e97", + "evaluatingExpressionForeground": "#607d8b", "exceptionForeground": "#FAD430", "modifyingValueForeground": "#7e57c2", "valueForeground": "#7e57c2" } }, "DebuggerTabs": { - "selectedBackground": "#084d81", - "underlinedTabBackground": "#084d81" + "selectedBackground": "#152C3B", + "underlinedTabBackground": "#152C3B" }, "DebuggerPopup": { - "borderColor": "#084d81" + "borderColor": "#152C3B" }, "DefaultTabs": { "background": "#011627", "borderColor": "#011627", - "hoverBackground": "#13344f", - "hoverColor": "#010e1a", - "hoverMaskColor": "#084d81", - "inactiveColoredFileBackground": "#0b253a", - "inactiveUnderlineColor": "#697098", - "inactiveMaskColor": "#010e1a", + "hoverBackground": "#152C3B", + "hoverColor": "#001424", + "hoverMaskColor": "#152C3B", + "inactiveColoredTabBackground": "#011627", + "inactiveColoredFileBackground": "#2e3c43", + "inactiveUnderlineColor": "#7e57c2", + "inactiveMaskColor": "#001424", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#13344f" + "underlinedTabBackground": "#152C3B", + "underlinedTabForeground": "#ffffff" }, "Desktop.background": "#011627", "DialogWrapper.southPanelBackground": "#011627", @@ -180,48 +200,50 @@ "DragAndDrop": { "areaBackground": "#011627", "areaBorderColor": "#011627", - "areaForeground": "#d6deeb" + "areaForeground": "#b0bec5" }, "Editor": { - "background": "#010e1a", - "foreground": "#d6deeb", - "shortcutForeground": "#5f7e97" + "background": "#001424", + "foreground": "#b0bec5", + "shortcutForeground": "#607d8b" }, "EditorPane": { - "background": "#010e1a", + "background": "#001424", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "inactiveBackground": "#011627", - "inactiveForeground": "#697098", - "selectionBackground": "#5f7e97", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "EditorTabs": { - "borderColor": "#0b2942", - "hoverColor": "#084d81", - "hoverMaskColor": "#084d81", + "borderColor": "#011627", + "hoverBackground": "#152C3B", + "hoverColor": "#152C3B", + "hoverMaskColor": "#152C3B", "inactiveMaskColor": "#011627", - "inactiveColoredFileBackground": "#0116272", - "inactiveUnderlineColor": "#697098", - "selectedForeground": "#d6deeb", - "selectedBackground": "#13344f", + "inactiveColoredFileBackground": "#011627", + "inactiveUnderlineColor": "#2e3c42", + "selectedForeground": "#b0bec5", + "selectedBackground": "#152C3B", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#13344f" + "underlinedTabBackground": "#152C3B", + "underlinedTabForeground": "#ffffff" }, "EditorGroupsTabs": { "background": "#011627", - "borderColor": "#0b2942", - "hoverBackground": "#084d81", - "hoverColor": "#084d81", + "borderColor": "#011627", + "hoverBackground": "#152C3B", + "hoverColor": "#152C3B", "inactiveUnderlineColor": "#7e57c2", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#13344f", - "underlinedTabForeground": "#d6deeb" + "underlinedTabBackground": "#152C3B", + "underlinedTabForeground": "#b0bec5" }, "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#0e293f", + "Yellow": "#0B253A", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -236,130 +258,134 @@ "nativeSearchNotMatchedBackground": "#C792EA", "nativeFocusSearchNotMatchedBackground": "#BB80B3" }, - "Focus.color": "#122d42", + "Focus.color": "#2a373e", "FormattedTextField": { - "background": "#010e1a", + "background": "#001424", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveBackground": "#0b253a", - "inactiveForeground": "#697098", + "foreground": "#b0bec5", + "inactiveBackground": "#2e3c43", + "inactiveForeground": "#2e3c42", "selectionForeground": "#ffffff", - "selectionBackground": "#13344f" + "selectionBackground": "#152C3B" }, + "GotItTooltip.borderColor": "#152C3B", "Group": { - "disabledSeparatorColor": "#122d42", - "separatorColor": "#122d42" + "disabledSeparatorColor": "#2a373e", + "separatorColor": "#2a373e" }, "GutterTooltip": { - "infoForeground": "#d6deeb", + "infoForeground": "#607d8b", "lineSeparatorColor": "#011627" }, "HeaderColor": { "active": "#011627", - "inactive": "#010e1a" + "inactive": "#001424" }, "HelpTooltip": { "background": "#011627", - "borderColor": "#122d42", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "shortcutForeground": "#5f7e97" + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "shortcutForeground": "#607d8b" }, "Hyperlink.linkColor": "#7e57c2", - "inactiveCaption": "#0b2942", + "inactiveCaption": "#011627", "inactiveCaptionBorder": "#011627", - "inactiveCaptionText": "#5f7e97", - "info": "#5f7e97", - "infoText": "#5f7e97", + "inactiveCaptionText": "#607d8b", + "info": "#607d8b", + "infoText": "#607d8b", "IdeStatusBar.border": "4,4,4,4", - "InformationHint.borderColor": "#122d42", + "InformationHint.borderColor": "#2a373e", "InplaceRefactoringPopup": { "borderColor": "#011627" }, "InternalFrame": { - "activeTitleForeground": "#d6deeb", + "activeTitleForeground": "#b0bec5", "background": "#011627", - "inactiveTitleForeground": "#5f7e97" + "inactiveTitleForeground": "#607d8b" }, "Label": { "background": "#011627", - "disabledForeground": "#697098", + "disabledForeground": "#2e3c42", "disabledShadow": "#011627", - "disabledText": "#697098", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "selectedForeground": "#ffffff" + "disabledText": "#2e3c42", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "selectedForeground": "#ffffff", + "selectedDisabledForeground": "#b0bec5" }, "Link": { "activeForeground": "#7e57c2", "hoverForeground": "#7e57c2", "pressedForeground": "#7e57c2", - "secondaryForeground": "#5f7e97", + "secondaryForeground": "#607d8b", "visitedForeground": "#7e57c2" }, "link.foreground": "#7e57c2", "List": { - "background": "#0b2942", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e9750", + "background": "#011627", + "foreground": "#b0bec5", + "hoverBackground": "#152C3B70", + "hoverInactiveBackground": "#152C3B", + "selectionBackground": "#152C3B50", "selectionForeground": "#ffffff", "selectionInactiveForeground": "#ffffff", - "selectionInactiveBackground": "#13344f50" + "selectionInactiveBackground": "#152C3B70" }, "material": { "background": "#011627", - "branchColor": "#d6deeb", - "contrast": "#010e1a", - "foreground": "#d6deeb", - "mergeCommits": "#0b253a", - "primaryColor": "#5f7e97", + "branchColor": "#b0bec5", + "contrast": "#001424", + "foreground": "#b0bec5", + "mergeCommits": "#2e3c43", + "primaryColor": "#607d8b", "selectionForeground": "#ffffff", "tab.backgroundColor": "#011627", "tab.borderColor": "#7e57c2", - "tagColor": "#5f7e97" + "tagColor": "#607d8b" }, "MemoryIndicator": { - "allocatedBackground": "#0b2942", - "usedColor": "#084d81", - "usedBackground": "#084d81" + "allocatedBackground": "#011627", + "usedColor": "#152C3B", + "usedBackground": "#152C3B" }, "Menu": { - "acceleratorForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", "acceleratorSelectionForeground": "#ffffff", "background": "#011627", "border": "4,2,4,2", - "borderColor": "#0b2942", - "disabledBackground": "#0b2942", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", - "selectionForeground": "#ffffff", - "separatorColor": "#122d42" - }, - "MenuBar": { - "background": "#010e1a", "borderColor": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "highlight": "#011627", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff", - "shadow": "#010e1a" + "separatorColor": "#2a373e" + }, + "MenuBar": { + "background": "#001424", + "borderColor": "#011627", + "disabledBackground": "#011627", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "highlight": "#011627", + "selectionBackground": "#152C3B", + "selectionForeground": "#ffffff", + "shadow": "#001424" }, "MenuItem": { - "acceleratorForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", "acceleratorSelectionForeground": "#ffffff", "border": "4,2,4,2", "background": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "NavBar": { - "arrowColor": "#d6deeb", + "arrowColor": "#b0bec5", "borderColor": "#011627" }, "NewClass": { @@ -367,97 +393,98 @@ "background": "#011627" }, "SearchField": { - "background": "#010e1a" + "background": "#001424" } }, "NewPSD.warning": "#7e57c2", "Notification": { - "background": "#01111d", - "borderColor": "#01111d", - "errorBackground": "#01111d", - "errorBorderColor": "#01111d", - "foreground": "#d6deeb", + "background": "#152C3B", + "borderColor": "#152C3B", + "errorBackground": "#152C3B", + "errorBorderColor": "#152C3B", + "foreground": "#b0bec5", "MoreButton": { - "background": "#0b253a", - "foreground": "#d6deeb", - "innerBorderColor": "#0b253a" + "background": "#2e3c43", + "foreground": "#b0bec5", + "innerBorderColor": "#2e3c43" }, "ToolWindow": { - "errorBackground": "#01111d", - "errorBorderColor": "#01111d", - "informativeBackground": "#01111d", - "informativeBorderColor": "#01111d", - "warningBackground": "#01111d", - "warningBorderColor": "#01111d" + "errorBackground": "#152C3B", + "errorBorderColor": "#152C3B", + "informativeBackground": "#152C3B", + "informativeBorderColor": "#152C3B", + "warningBackground": "#152C3B", + "warningBorderColor": "#152C3B" } }, - "OnePixelDivider.background": "#122d42", + "OnePixelDivider.background": "#2a373e", "OptionPane": { "background": "#011627", - "foreground": "#d6deeb", - "messageForeground": "#d6deeb" + "foreground": "#b0bec5", + "messageForeground": "#b0bec5" }, "Outline": { - "color": "#0b253a", + "color": "#2e3c43", "focusedColor": "#7e57c2", - "disabledColor": "#697098" + "disabledColor": "#2e3c42" }, "Panel": { "background": "#011627", - "foreground": "#d6deeb" + "foreground": "#b0bec5" }, "ParameterInfo": { - "background": "#0b2942", - "borderColor": "#13344f", - "currentOverloadBackground": "#13344f", + "background": "#011627", + "borderColor": "#152C3B", + "currentOverloadBackground": "#152C3B", "currentParameterForeground": "#7e57c2", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "lineSeparatorColor": "#13344f" + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "lineSeparatorColor": "#152C3B" }, "PasswordField": { - "background": "#010e1a", + "background": "#001424", "capsLockIconColor": "#7e57c2", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "Plugins": { "background": "#011627", - "disabledForeground": "#697098", - "eapTagBackground": "#084d81", - "lightSelectionBackground": "#5f7e97", - "paidTagBackground": "#084d81", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "eapTagBackground": "#152C3B", + "hoverBackground": "#152C3B70", + "lightSelectionBackground": "#152C3B", + "paidTagBackground": "#152C3B", + "selectionBackground": "#152C3B", "tagForeground": "#7e57c2", - "tagBackground": "#084d81", - "trialTagBackground": "#084d81", + "tagBackground": "#152C3B", + "trialTagBackground": "#152C3B", "Button": { - "installBackground": "#0b253a", - "installBorderColor": "#0b253a", - "installForeground": "#d6deeb", - "installFocusedBackground": "#084d81", - "installFillForeground": "#697098", - "installFillBackground": "#0b253a", - "updateBackground": "#0b253a", - "updateBorderColor": "#0b253a", - "updateForeground": "#d6deeb" + "installBackground": "#2e3c43", + "installBorderColor": "#2e3c43", + "installForeground": "#b0bec5", + "installFocusedBackground": "#152C3B", + "installFillForeground": "#2e3c42", + "installFillBackground": "#2e3c43", + "updateBackground": "#7e57c2", + "updateBorderColor": "#2e3c43", + "updateForeground": "#b0bec5" }, "SearchField": { - "background": "#010e1a", - "borderColor": "#122d42" + "background": "#001424", + "borderColor": "#2a373e" }, "SectionHeader": { - "background": "#0b2942", - "foreground": "#d6deeb" + "background": "#011627", + "foreground": "#b0bec5" }, "Tab": { - "hoverBackground": "#13344f", + "hoverBackground": "#152C3B", "selectedForeground": "#ffffff", - "selectedBackground": "#13344f" + "selectedBackground": "#152C3B" } }, "Popup": { @@ -466,26 +493,26 @@ "borderColor": "#011627", "foreground": "#7e57c2" }, - "borderColor": "#010e1a", + "borderColor": "#001424", "inactiveBorderColor": "#011627", - "innerBorderColor": "#0b2942", + "innerBorderColor": "#011627", "Header": { "activeBackground": "#011627", - "inactiveBackground": "#010e1a" + "inactiveBackground": "#001424" }, "paintBorder": true, - "separatorForeground": "#d6deeb", - "separatorColor": "#0b2942", + "separatorForeground": "#b0bec5", + "separatorColor": "#011627", "Toolbar": { - "Floating.background": "#010e1a", - "background": "#010e1a", - "borderColor": "#010e1a" + "Floating.background": "#001424", + "background": "#001424", + "borderColor": "#001424" } }, "PopupMenu": { "background": "#011627", "border": "2,0,2,0", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "translucentBackground": "#011627" }, "PopupMenuSeparator.height": 10, @@ -496,27 +523,28 @@ "indeterminateEndColor": "#7e57c2", "indeterminateStartColor": "#7e57c2", "progressColor": "#7e57c2", - "selectionBackground": "#084d81", - "trackColor": "#084d81" + "selectionBackground": "#152C3B", + "trackColor": "#152C3B" }, "PsiViewer": { "referenceHighlightColor": "#7e57c2" }, "RadioButton": { "background": "#011627", - "disabledText": "#697098", - "foreground": "#d6deeb" + "disabledText": "#2e3c42", + "foreground": "#b0bec5" }, "RadioButtonMenuItem": { - "acceleratorForeground": "#5f7e97", - "acceleratorSelectionForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", + "acceleratorSelectionForeground": "#607d8b", "background": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, + "ScreenView.borderColor": "#2a373e", "ScrollBar": { "background": "#011627", "hoverThumbBorderColor": "#7e57c2", @@ -538,7 +566,7 @@ "trackColor": "#01162730" } }, - "thumb": "#084d81", + "thumb": "#152C3B", "thumbBorderColor": "#7e57c270", "thumbColor": "#7e57c270", "trackColor": "#01162730", @@ -553,84 +581,95 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#010e1a", - "foreground": "#5f7e97" + "background": "#001424", + "foreground": "#607d8b" }, "Header": { "background": "#011627" }, "List": { - "separatorForeground": "#5f7e97", - "separatorColor": "#122d42" + "separatorForeground": "#607d8b", + "separatorColor": "#2a373e" }, "SearchField": { "background": "#011627", - "borderColor": "#010e1a", - "infoForeground": "#5f7e97" + "borderColor": "#001424", + "infoForeground": "#607d8b" }, "Tab": { "active.foreground": "#ffffff", "selectedForeground": "#ffffff", - "selectedBackground": "#084d81" + "selectedBackground": "#152C3B" } }, "SearchMatch": { "endBackground": "#7e57c2", - "startBackground": "#7e57c2" + "startBackground": "#7e57c2", + "endColor": "#7e57c2", + "startColor": "#7e57c2" + }, + "SearchField.errorBackground": "#152C3B", + "SearchOption": { + "selectedBackground": "#152C3B" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#607d8b", + "Repeated.File.Foreground": "#b0bec5" }, - "SearchField.errorBackground": "#01111d", "Separator": { - "background": "#0b2942", - "foreground": "#0b2942", - "separatorColor": "#0b2942" + "background": "#011627", + "foreground": "#011627", + "separatorColor": "#011627" }, "SidePanel": { - "background": "#010e1a" + "background": "#001424" }, "Slider": { "background": "#011627", "buttonBorderColor": "#7e57c2", "buttonColor": "#7e57c2", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "majorTickLength": 6, - "tickColor": "#0b2942", - "trackColor": "#13344f", + "tickColor": "#011627", + "trackColor": "#152C3B", "trackWidth": 7, "thumb": "#7e57c2" }, "SpeedSearch": { - "background": "#084d81", - "borderColor": "#122d42", - "foreground": "#d6deeb", - "errorForeground": "#d6deeb" + "background": "#152C3B", + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "errorForeground": "#b0bec5" }, "Spinner": { "background": "#011627", "border": "3,3,3,3", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "selectionForeground": "#ffffff" }, "SplitPane": { "background": "#011627", - "highlight": "#010e1a" + "highlight": "#001424" }, - "SplitPaneDivider.draggingColor": "#0b2942", + "SplitPaneDivider.draggingColor": "#011627", "StatusBar": { - "borderColor": "#011627" + "borderColor": "#011627", + "hoverBackground": "#152C3B", + "LightEditBackground": "#152C3B" }, "TabbedPane": { "background": "#011627", - "contentAreaColor": "#084d81", + "contentAreaColor": "#152C3B", "contentBorderInsets": "3,1,1,1", - "darkShadow": "#122d42", - "disabledForeground": "#697098", - "disabledUnderlineColor": "#697098", - "focus": "#13344f", - "focusColor": "#13344f", + "darkShadow": "#2a373e", + "disabledForeground": "#2e3c42", + "disabledUnderlineColor": "#2e3c42", + "focus": "#152C3B", + "focusColor": "#152C3B", "fontSizeOffset": 0, - "foreground": "#d6deeb", - "highlight": "#122d42", - "hoverColor": "#084d81", + "foreground": "#b0bec5", + "highlight": "#2a373e", + "hoverColor": "#152C3B", "labelShift": 0, "selectedForeground": "#ffffff", "selectedLabelShift": 0, @@ -641,266 +680,320 @@ "tabSelectionHeight": 2, "underlineColor": "#7e57c2" }, - "TabbedPane.mt.tab.background": "#010e1a", + "TabbedPane.mt.tab.background": "#001424", "Table": { + "alternativeRowBackground": "#001424", "background": "#011627", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#2e3c42", "dropLineColor": "#7e57c2", "dropLineShortColor": "#7e57c2", - "focusCellBackground": "#13344f", + "focusCellBackground": "#152C3B", "focusCellForeground": "#ffffff", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "gridColor": "#011627", - "highlightOuter": "#13344f", + "highlightOuter": "#152C3B", + "hoverBackground": "#152C3B70", + "hoverInactiveBackground": "#152C3B", "lightSelectionForeground": "#ffffff", - "lightSelectionInactiveForeground": "#5f7e97", - "lightSelectionInactiveBackground": "#0b2942", - "selectionBackground": "#13344f", + "lightSelectionInactiveForeground": "#607d8b", + "lightSelectionInactiveBackground": "#011627", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff", - "selectionInactiveBackground": "#13344f", + "selectionInactiveBackground": "#152C3B", "selectionInactiveForeground": "#ffffff", - "sortIconColor": "#d6deeb", - "stripeColor": "#010e1a" + "sortIconColor": "#b0bec5", + "stripeColor": "#001424" }, "TableHeader": { "background": "#011627", "borderColor": "#011627", - "bottomSeparatorColor": "#0b2942", + "bottomSeparatorColor": "#011627", "cellBorder": "4,0,4,0", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "focusCellBackground": "#13344f", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "focusCellBackground": "#152C3B", "focusCellForeground": "#ffffff", "height": 25, - "separatorColor": "#0b2942" + "separatorColor": "#011627" }, - "text": "#5f7e97", - "textInactiveText": "#5f7e97", - "textText": "#5f7e97", + "text": "#607d8b", + "textInactiveText": "#607d8b", + "textText": "#607d8b", "TextArea": { - "background": "#010e1a", + "background": "#001424", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "TextField": { - "background": "#010e1a", + "background": "#001424", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "TextPane": { - "background": "#010e1a", + "background": "#001424", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "TitlePane": { - "background": "#010e1a", - "Button.hoverBackground": "#084d81", + "background": "#001424", + "Button.hoverBackground": "#152C3B", "inactiveBackground": "#011627", - "infoForeground": "#5f7e97", - "inactiveInfoForeground": "#5f7e97" + "infoForeground": "#607d8b", + "inactiveInfoForeground": "#607d8b" }, - "TitledBorder.titleColor": "#d6deeb", + "TitledBorder.titleColor": "#b0bec5", "ToggleButton": { - "borderColor": "#0b253a", - "buttonColor": "#d6deeb", - "disabledText": "#697098", - "foreground": "#d6deeb", + "borderColor": "#2e3c43", + "buttonColor": "#b0bec5", + "disabledText": "#2e3c42", + "foreground": "#b0bec5", "offForeground": "#011627", "offBackground": "#011627", "onBackground": "#7e57c2", "onForeground": "#7e57c2" }, "ToolBar": { - "background": "#010e1a", - "borderHandleColor": "#5f7e97", - "floatingForeground": "#5f7e97", - "foreground": "#d6deeb" + "background": "#001424", + "borderHandleColor": "#607d8b", + "floatingForeground": "#607d8b", + "foreground": "#b0bec5" }, "ToolTip": { "Actions.background": "#011627", - "Actions.infoForeground": "#5f7e97", - "background": "#011627", - "borderColor": "#084d81", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "separatorColor": "#122d42", - "shortcutForeground": "#5f7e97" + "Actions.infoForeground": "#607d8b", + "background": "#152C3B", + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "separatorColor": "#2a373e", + "shortcutForeground": "#607d8b" }, "ToolWindow": { "Button": { - "hoverBackground": "#13344f", + "hoverBackground": "#152C3B", "selectedForeground": "#ffffff", - "selectedBackground": "#010e1a" + "selectedBackground": "#001424" }, "Header": { "background": "#011627", - "borderColor": "#0b2942", + "borderColor": "#011627", "inactiveBackground": "#011627" }, "HeaderCloseButton": { "background": "#011627" }, "HeaderTab": { - "hoverBackground": "#084d81", - "hoverInactiveBackground": "#0b2942", + "borderColor": "#152C3B", + "hoverBackground": "#152C3B", + "hoverInactiveBackground": "#152C3B", "inactiveUnderlineColor": "#7e57c2", - "selectedBackground": "#010e1a", - "selectedInactiveBackground": "#010e1a", + "selectedBackground": "#001424", + "selectedInactiveBackground": "#001424", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#084d81", - "underlinedTabInactiveBackground": "#0b2942" + "underlinedTabBackground": "#152C3B", + "underlinedTabInactiveBackground": "#011627", + "underlinedTabForeground": "#ffffff", + "underlinedTabInactiveForeground": "#b0bec5" } }, "Tree": { - "background": "#010e1a", - "foreground": "#5f7e97", - "hash": "#122d42", + "background": "#001424", + "foreground": "#607d8b", + "hash": "#2a373e", + "hoverBackground": "#152C3B70", + "hoverInactiveBackground": "#152C3B", "modifiedItemForeground": "#7e57c2", "rowHeight": 28, - "selectionBackground": "#13344f50", + "selectionBackground": "#152C3B70", "selectionForeground": "#ffffff", "selectionInactiveForeground": "#ffffff", - "selectionInactiveBackground": "#13344f50", - "textBackground": "#010e1a" + "selectionInactiveBackground": "#152C3B70", + "textBackground": "#001424" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { - "Activity.borderColor": "#122d42", - "ColorPicker.background": "#011627", - "ColorPicker.foreground": "#d6deeb", - "Component.borderColor": "#122d42", - "Component.background": "#011627", - "Component.foreground": "#d6deeb", - "Connector.borderColor": "#122d42", - "Connector.hoverBorderColor": "#084d81", - "Canvas.background": "#010e1a", - "highStroke.foreground": "#d6deeb", - "Label.foreground": "#5f7e97", - "List.selectionBackground": "#13344f50", - "Panel.borderColor": "#122d42", - "Panel.background": "#011627", - "percent.foreground": "#d6deeb", - "Placeholder.background": "#011627", - "Placeholder.borderColor": "#122d42", - "Placeholder.foreground": "#d6deeb", - "Placeholder.selectedForeground": "#ffffff", + "UIDesigner": { + "Activity.borderColor": "#2a373e", + "Canvas.background": "#001424", + "ColorPicker": { + "background": "#011627", + "foreground": "#b0bec5" + }, + "Component": { + "borderColor": "#2a373e", + "background": "#011627", + "foreground": "#b0bec5", + "hoverBorderColor": "#152C3B" + }, + "Connector": { + "borderColor": "#2a373e", + "hoverBorderColor": "#152C3B" + }, + "Canvas.background": "#001424", + "highStroke.foreground": "#b0bec5", + "Label.foreground": "#607d8b", + "List.selectionBackground": "#152C3B70", + "motion": { + "borderColor": "#2a373e", + "Component.foreground": "#b0bec5", + "ConstraintSetText.foreground": "#607d8b", + "ConstraintSet.background": "#011627", + "CSPanel.SelectedFocusBackground": "#152C3B", + "CSPanel.SelectedBackground": "#152C3B70", + "cs_FocusText.infoForeground": "#607d8b", + "CursorTextColor.foreground": "#b0bec5", + "HoverColor.disabledBackground": "#2e3c42", + "motionGraph.background": "#011627", + "Notification.background": "#152C3B", + "ourAvg.background": "#011627", + "ourCS.background": "#011627", + "ourCS_Border.borderColor": "#2a373e", + "ourCS_TextColor.foreground": "#607d8b", + "ourCS_SelectedFocusBackground.selectionForeground": "#ffffff", + "ourCS_SelectedBackground.selectionInactiveBackground": "#152C3B", + "ourCS_SelectedBorder.pressedBorderColor": "#152C3B", + "ourML_BarColor.separatorColor": "#2a373e", + "PrimaryPanel.background": "#001424", + "SecondaryPanel.background": "#011627", + "SecondaryPanel.header.foreground": "#607d8b", + "SecondaryPanel.header.background": "#001424", + "timeLine.disabledBorderColor": "#2a373e" + }, + "Panel": { + "borderColor": "#2a373e", + "background": "#011627" + }, + "percent.foreground": "#b0bec5", + "Placeholder": { + "background": "#011627", + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "selectedForeground": "#ffffff" + }, "Preview.background": "#011627", - "stroke.acceleratorForeground": "#5f7e97" + "stroke.acceleratorForeground": "#607d8b" }, "ValidationTooltip": { - "errorBackground": "#01111d", - "errorBorderColor": "#01111d", - "warningBackground": "#01111d", - "warningBorderColor": "#01111d" + "errorBackground": "#152C3B", + "errorBorderColor": "#152C3B", + "warningBackground": "#152C3B", + "warningBorderColor": "#152C3B" }, "VersionControl": { "FileHistory.Commit": { "selectedBranchBackground": "#011627" }, "GitCommits": { - "graphColor": "#084d81" + "graphColor": "#152C3B" }, "GitLog": { "localBranchIconColor": "#7e57c2", - "otherIconColor": "#5f7e97", - "remoteBranchIconColor": "#d6deeb", - "tagIconColor": "#5f7e97" + "otherIconColor": "#607d8b", + "remoteBranchIconColor": "#b0bec5", + "tagIconColor": "#607d8b" }, "HgLog": { "branchIconColor": "#7e57c2", "bookmarkIconColor": "#ffffff", - "closedBranchIconColor": "#697098", - "localTagIconColor": "#5f7e97", - "mqTagIconColor": "#5f7e97", - "tagIconColor": "#5f7e97", - "tipIconColor": "#5f7e97" + "closedBranchIconColor": "#2e3c42", + "localTagIconColor": "#607d8b", + "mqTagIconColor": "#607d8b", + "tagIconColor": "#607d8b", + "tipIconColor": "#607d8b" }, "Log": { - "Commit.unmatchedForeground": "#5f7e97", - "Commit.currentBranchBackground": "#0b2942" + "Commit.unmatchedForeground": "#607d8b", + "Commit.currentBranchBackground": "#011627", + "Commit.hoveredBackground": "#152C3B70" }, "RefLabel": { "foreground": "#ffffff", - "backgroundBase": "#084d81" + "backgroundBase": "#152C3B" } }, "Viewport": { - "background": "#010e1a", - "foreground": "#d6deeb" + "background": "#001424", + "foreground": "#b0bec5" }, "WelcomeScreen": { + "AssociatedComponent.background": "#011627", "background": "#011627", "borderColor": "#011627", - "captionBackground": "#010e1a", - "captionForeground": "#d6deeb", - "footerBackground": "#010e1a", - "footerForeground": "#d6deeb", + "captionBackground": "#001424", + "captionForeground": "#b0bec5", + "Details.background": "#011627", + "footerBackground": "#001424", + "footerForeground": "#b0bec5", "headerBackground": "#011627", - "headerForeground": "#d6deeb", - "separatorColor": "#122d42", + "headerForeground": "#b0bec5", + "List.background": "#001424", + "separatorColor": "#2a373e", + "SidePanel.background": "#011627", "Projects": { - "background": "#0b2942", - "selectionBackground": "#5f7e97", - "selectionInactiveBackground": "#0b2942" + "actions.background": "#001424", + "actions.selectionBackground": "#152C3B", + "background": "#011627", + "selectionBackground": "#152C3B", + "selectionInactiveBackground": "#011627" } }, - "window": "#010e1a", - "windowBorder": "#122d42", - "windowText": "#5f7e97", - "Window.border": "#122d42" + "window": "#001424", + "windowBorder": "#2a373e", + "windowText": "#607d8b", + "Window.border": "#2a373e" }, "icons": { "ColorPalette": { - "#43494A": "#010e1a", - "#6B6B6B": "#5f7e97", + "#43494A": "#001424", + "#6B6B6B": "#607d8b", "#A7A7A7": "#011627", "#3D6185": "#7e57c2", "#466D94": "#7e57c2", "#3C3F41": "#011627", - "#545556": "#697098", - "#606060": "#697098", - "#9AA7B0": "#d6deeb", + "#545556": "#2e3c42", + "#606060": "#2e3c42", + "#9AA7B0": "#b0bec5", "#675133": "#7e57c2", "Actions.Blue": "#82AAFF", "Actions.Green": "#ecc48d", - "Actions.Grey": "#5f7e97", + "Actions.Grey": "#607d8b", "Actions.GreyInline": "#637777", - "Actions.GreyInline.Dark": "#d6deeb", + "Actions.GreyInline.Dark": "#b0bec5", "Actions.Red": "#7fdbca", "Actions.Yellow": "#FAD430", - "Checkbox.Background.Default": "#010e1a", - "Checkbox.Background.Default.Dark": "#010e1a", - "Checkbox.Background.Disabled": "#0e293f", - "Checkbox.Background.Disabled.Dark": "#0e293f", - "Checkbox.Border.Default": "#122d42", - "Checkbox.Border.Default.Dark": "#122d42", - "Checkbox.Border.Disabled": "#697098", - "Checkbox.Border.Disabled.Dark": "#697098", + "Checkbox.Background.Default": "#001424", + "Checkbox.Background.Default.Dark": "#001424", + "Checkbox.Background.Disabled": "#0B253A", + "Checkbox.Background.Disabled.Dark": "#0B253A", + "Checkbox.Border.Default": "#2a373e", + "Checkbox.Border.Default.Dark": "#2a373e", + "Checkbox.Border.Disabled": "#2e3c42", + "Checkbox.Border.Disabled.Dark": "#2e3c42", "Checkbox.Focus.Thin.Default": "#7e57c2", "Checkbox.Focus.Thin.Default.Dark": "#7e57c2", "Checkbox.Focus.Wide": "#7e57c2", "Checkbox.Focus.Wide.Dark": "#7e57c2", - "Checkbox.Foreground.Disabled": "#697098", - "Checkbox.Foreground.Disabled.Dark": "#697098", + "Checkbox.Foreground.Disabled": "#2e3c42", + "Checkbox.Foreground.Disabled.Dark": "#2e3c42", "Checkbox.Background.Selected": "#7e57c2", "Checkbox.Background.Selected.Dark": "#011627", "Checkbox.Border.Selected": "#7e57c2", "Checkbox.Border.Selected.Dark": "#7e57c2", "Checkbox.Foreground.Selected": "#7e57c2", "Checkbox.Foreground.Selected.Dark": "#7e57c2", - "Checkbox.Focus.Thin.Selected": "#d6deeb", - "Checkbox.Focus.Thin.Selected.Dark": "#d6deeb", + "Checkbox.Focus.Thin.Selected": "#b0bec5", + "Checkbox.Focus.Thin.Selected.Dark": "#b0bec5", "Objects.Grey": "#637777", "Objects.Blue": "#82AAFF", "Objects.RedStatus": "#7fdbca", @@ -909,7 +1002,7 @@ "Objects.Yellow": "#FAD430", "Objects.Green": "#ecc48d", "Objects.Purple": "#c792ea", - "Objects.BlackText": "#d6deeb", + "Objects.BlackText": "#b0bec5", "Objects.YellowDark": "#f78c6c", "Objects.GreenAndroid": "#ecc48d" } diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl.theme.json index 1412b1ce..36e60be7 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Night Owl.theme.json @@ -3,176 +3,196 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Night Owl.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/nightowl.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { - "acceleratorSelectionForeground": "#5f7e97", + "acceleratorSelectionForeground": "#607d8b", "background": "#011627", - "borderColor": "#122d42", - "disabledBackground": "#0e293f", - "disabledForeground": "#697098", - "disabledText": "#697098", - "focusColor": "#084d81", + "borderColor": "#2a373e", + "disabledBackground": "#0B253A", + "disabledForeground": "#2e3c42", + "disabledText": "#2e3c42", + "focusColor": "#152C3B", "focusedBorderColor": "#7e57c2", - "foreground": "#d6deeb", - "inactiveBackground": "#0e293f", - "inactiveForeground": "#5f7e97", - "infoForeground": "#5f7e97", - "selectionBackground": "#5f7e97", - "selectionBackgroundInactive": "#0b2942", + "foreground": "#b0bec5", + "inactiveBackground": "#0B253A", + "inactiveForeground": "#607d8b", + "infoForeground": "#607d8b", + "selectionBackground": "#152C3B", + "selectionBackgroundInactive": "#011627", "selectionForeground": "#ffffff", - "selectionInactiveBackground": "#0b2942", - "separatorColor": "#122d42" + "selectionInactiveBackground": "#011627", + "separatorColor": "#2a373e" }, "activeCaption": "#011627", "ActionButton": { "hoverBackground": "#7e57c250", "hoverBorderColor": "#7e57c250", - "hoverSeparatorColor": "#0b253a", + "hoverSeparatorColor": "#2e3c43", "focusedBorderColor": "#7e57c250", "pressedBackground": "#7e57c250", "pressedBorderColor": "#7e57c250" }, "Autocomplete": { - "selectionBackground": "#5f7e97" + "selectionBackground": "#152C3B" }, "Borders.ContrastBorderColor": "#011627", - "Borders.color": "#122d42", + "Borders.color": "#2a373e", "Button": { "arc": 0, "background": "#011627", "default": { - "endBackground": "#13344f", - "endBorderColor": "#13344f", + "endBackground": "#152C3B", + "endBorderColor": "#152C3B", "foreground": "#ffffff", "focusColor": "#7e57c2", "focusedBorderColor": "#7e57c2", - "shadowColor": "#13344f", - "startBackground": "#13344f", - "startBorderColor": "#13344f" + "shadowColor": "#152C3B", + "startBackground": "#152C3B", + "startBorderColor": "#152C3B" }, - "disabledBorderColor": "#0b253a", - "disabledText": "#697098", - "endBackground": "#0b253a", - "endBorderColor": "#0b253a", - "focus": "#084d81", + "disabledBorderColor": "#2e3c43", + "disabledText": "#2e3c42", + "endBackground": "#2e3c43", + "endBorderColor": "#2e3c43", + "focus": "#152C3B", "focusedBorderColor": "#7e57c2", - "foreground": "#5f7e97", + "foreground": "#607d8b", "highlight": "#ffffff", - "mt.background": "#0b253a", - "mt.foreground": "#5f7e97", + "mt.background": "#2e3c43", + "mt.foreground": "#607d8b", "mt.selectedForeground": "#ffffff", - "mt.selection.color1": "#13344f", - "mt.selection.color2": "#13344f", - "startBackground": "#0b253a", - "startBorderColor": "#0b253a", - "shadowColor": "#0b253a", + "mt.selection.color1": "#152C3B", + "mt.selection.color2": "#152C3B", + "startBackground": "#2e3c43", + "startBorderColor": "#2e3c43", + "shadowColor": "#2e3c43", "shadowWidth": 0 }, "Canvas": { - "Tooltip.borderColor": "#122d42", - "Tooltip.background": "#01111d" + "Tooltip.borderColor": "#2a373e", + "Tooltip.background": "#152C3B" + }, + "Content": { + "background": "#001424", + "selectionBackground": "#152C3B" }, - "Content.background": "#010e1a", "CheckBox": { "background": "#011627", - "disabledText": "#697098", - "foreground": "#d6deeb", + "disabledText": "#2e3c42", + "foreground": "#b0bec5", "select": "#7e57c2" }, "CheckBoxMenuItem": { - "acceleratorForeground": "#5f7e97", - "acceleratorSelectionForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", + "acceleratorSelectionForeground": "#607d8b", "background": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, + "CodeWithMe": { + "Avatar.foreground": "#b0bec5", + "AccessEnabled": { + "accessDot": "#7e57c2", + "dropdownBorder": "#011627", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#011627", - "foreground": "#d6deeb", - "swatchesDefaultRecentColor": "#d6deeb" + "foreground": "#b0bec5", + "swatchesDefaultRecentColor": "#b0bec5" }, - "ComboBoxButton.background": "#0b253a", + "ComboBoxButton.background": "#2e3c43", "ComboBox": { "ArrowButton": { - "background": "#0b253a", - "disabledIconColor": "#697098", - "iconColor": "#d6deeb", + "background": "#2e3c43", + "disabledIconColor": "#2e3c42", + "iconColor": "#b0bec5", "nonEditableBackground": "#011627" }, "background": "#011627", - "buttonBackground": "#0b253a", - "disabledForeground": "#697098", - "foreground": "#d6deeb", + "buttonBackground": "#2e3c43", + "darcula.hoveredArrowButtonForeground": "#7e57c2", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", "modifiedItemForeground": "#7e57c2", - "nonEditableBackground": "#0b2942", + "nonEditableBackground": "#011627", "padding": "5,5,5,5", - "selectionBackground": "#13344f", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, - "ComboPopup.border": "#122d42", + "ComboPopup.border": "#2a373e", "CompletionPopup": { - "background": "#0b2942", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", + "background": "#011627", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", "matchForeground": "#7e57c2", "matchSelectionForeground": "#7e57c2", "nonFocusedState": "false", "selectedGrayedForeground": "#ffffff", "selectionGrayForeground": "#ffffff", - "selectionInactiveInfoForeground": "#5f7e97", - "selectionInactiveBackground": "#5f7e9750", - "selectionBackground": "#5f7e9780", + "selectionInactiveInfoForeground": "#607d8b", + "selectionInactiveBackground": "#152C3B50", + "selectionBackground": "#152C3B80", "selectionForeground": "#ffffff", "selectionInfoForeground": "#ffffff" }, "Component": { "arc": 4, - "borderColor": "#084d81", - "disabledBorderColor": "#0b253a", + "borderColor": "#152C3B", + "disabledBorderColor": "#2e3c43", "focusColor": "#7e57c2", "focusedBorderColor": "#7e57c2", "hoverIconColor": "#7e57c2", - "infoForeground": "#5f7e97", - "iconColor": "#d6deeb" + "infoForeground": "#607d8b", + "iconColor": "#b0bec5" }, "control": "#011627", - "controlText": "#5f7e97", + "controlText": "#607d8b", "Counter": { "background": "#7e57c2", "foreground": "#ffffff" }, "Debugger": { "Variables": { - "collectingDataForeground": "#5f7e97", + "collectingDataForeground": "#607d8b", "changedValueForeground": "#7e57c2", "errorMessageForeground": "#7fdbca", - "evaluatingExpressionForeground": "#5f7e97", + "evaluatingExpressionForeground": "#607d8b", "exceptionForeground": "#FAD430", "modifyingValueForeground": "#7e57c2", "valueForeground": "#7e57c2" } }, "DebuggerTabs": { - "selectedBackground": "#084d81", - "underlinedTabBackground": "#084d81" + "selectedBackground": "#152C3B", + "underlinedTabBackground": "#152C3B" }, "DebuggerPopup": { - "borderColor": "#084d81" + "borderColor": "#152C3B" }, "DefaultTabs": { "background": "#011627", "borderColor": "#011627", - "hoverBackground": "#13344f", + "hoverBackground": "#152C3B", "hoverColor": "#011627", - "hoverMaskColor": "#084d81", - "inactiveColoredFileBackground": "#0b253a", - "inactiveUnderlineColor": "#697098", + "hoverMaskColor": "#152C3B", + "inactiveColoredTabBackground": "#011627", + "inactiveColoredFileBackground": "#2e3c43", + "inactiveUnderlineColor": "#7e57c2", "inactiveMaskColor": "#011627", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#13344f" + "underlinedTabBackground": "#152C3B", + "underlinedTabForeground": "#ffffff" }, "Desktop.background": "#011627", "DialogWrapper.southPanelBackground": "#011627", @@ -180,48 +200,50 @@ "DragAndDrop": { "areaBackground": "#011627", "areaBorderColor": "#011627", - "areaForeground": "#d6deeb" + "areaForeground": "#b0bec5" }, "Editor": { "background": "#011627", - "foreground": "#d6deeb", - "shortcutForeground": "#5f7e97" + "foreground": "#b0bec5", + "shortcutForeground": "#607d8b" }, "EditorPane": { "background": "#011627", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "inactiveBackground": "#011627", - "inactiveForeground": "#697098", - "selectionBackground": "#5f7e97", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "EditorTabs": { - "borderColor": "#0b2942", - "hoverColor": "#084d81", - "hoverMaskColor": "#084d81", + "borderColor": "#011627", + "hoverBackground": "#152C3B", + "hoverColor": "#152C3B", + "hoverMaskColor": "#152C3B", "inactiveMaskColor": "#011627", - "inactiveColoredFileBackground": "#0116272", - "inactiveUnderlineColor": "#697098", - "selectedForeground": "#d6deeb", - "selectedBackground": "#13344f", + "inactiveColoredFileBackground": "#011627", + "inactiveUnderlineColor": "#2e3c42", + "selectedForeground": "#b0bec5", + "selectedBackground": "#152C3B", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#13344f" + "underlinedTabBackground": "#152C3B", + "underlinedTabForeground": "#ffffff" }, "EditorGroupsTabs": { "background": "#011627", - "borderColor": "#0b2942", - "hoverBackground": "#084d81", - "hoverColor": "#084d81", + "borderColor": "#011627", + "hoverBackground": "#152C3B", + "hoverColor": "#152C3B", "inactiveUnderlineColor": "#7e57c2", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#13344f", - "underlinedTabForeground": "#d6deeb" + "underlinedTabBackground": "#152C3B", + "underlinedTabForeground": "#b0bec5" }, "FileColor": { "Green": "#387002", "Blue": "#004BA0", - "Yellow": "#0e293f", + "Yellow": "#0B253A", "Orange": "#B53D00", "Violet": "#4D2C91", "Rose": "#A00037" @@ -236,130 +258,134 @@ "nativeSearchNotMatchedBackground": "#C792EA", "nativeFocusSearchNotMatchedBackground": "#BB80B3" }, - "Focus.color": "#122d42", + "Focus.color": "#2a373e", "FormattedTextField": { "background": "#011627", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveBackground": "#0b253a", - "inactiveForeground": "#697098", + "foreground": "#b0bec5", + "inactiveBackground": "#2e3c43", + "inactiveForeground": "#2e3c42", "selectionForeground": "#ffffff", - "selectionBackground": "#13344f" + "selectionBackground": "#152C3B" }, + "GotItTooltip.borderColor": "#152C3B", "Group": { - "disabledSeparatorColor": "#122d42", - "separatorColor": "#122d42" + "disabledSeparatorColor": "#2a373e", + "separatorColor": "#2a373e" }, "GutterTooltip": { - "infoForeground": "#d6deeb", + "infoForeground": "#607d8b", "lineSeparatorColor": "#011627" }, "HeaderColor": { "active": "#011627", - "inactive": "#010e1a" + "inactive": "#001424" }, "HelpTooltip": { "background": "#011627", - "borderColor": "#122d42", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "shortcutForeground": "#5f7e97" + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "shortcutForeground": "#607d8b" }, "Hyperlink.linkColor": "#7e57c2", - "inactiveCaption": "#0b2942", + "inactiveCaption": "#011627", "inactiveCaptionBorder": "#011627", - "inactiveCaptionText": "#5f7e97", - "info": "#5f7e97", - "infoText": "#5f7e97", + "inactiveCaptionText": "#607d8b", + "info": "#607d8b", + "infoText": "#607d8b", "IdeStatusBar.border": "4,4,4,4", - "InformationHint.borderColor": "#122d42", + "InformationHint.borderColor": "#2a373e", "InplaceRefactoringPopup": { "borderColor": "#011627" }, "InternalFrame": { - "activeTitleForeground": "#d6deeb", + "activeTitleForeground": "#b0bec5", "background": "#011627", - "inactiveTitleForeground": "#5f7e97" + "inactiveTitleForeground": "#607d8b" }, "Label": { "background": "#011627", - "disabledForeground": "#697098", + "disabledForeground": "#2e3c42", "disabledShadow": "#011627", - "disabledText": "#697098", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "selectedForeground": "#ffffff" + "disabledText": "#2e3c42", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "selectedForeground": "#ffffff", + "selectedDisabledForeground": "#b0bec5" }, "Link": { "activeForeground": "#7e57c2", "hoverForeground": "#7e57c2", "pressedForeground": "#7e57c2", - "secondaryForeground": "#5f7e97", + "secondaryForeground": "#607d8b", "visitedForeground": "#7e57c2" }, "link.foreground": "#7e57c2", "List": { - "background": "#0b2942", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e9750", + "background": "#011627", + "foreground": "#b0bec5", + "hoverBackground": "#152C3B70", + "hoverInactiveBackground": "#152C3B", + "selectionBackground": "#152C3B50", "selectionForeground": "#ffffff", "selectionInactiveForeground": "#ffffff", - "selectionInactiveBackground": "#13344f50" + "selectionInactiveBackground": "#152C3B70" }, "material": { "background": "#011627", - "branchColor": "#d6deeb", - "contrast": "#010e1a", - "foreground": "#d6deeb", - "mergeCommits": "#0b253a", - "primaryColor": "#5f7e97", + "branchColor": "#b0bec5", + "contrast": "#001424", + "foreground": "#b0bec5", + "mergeCommits": "#2e3c43", + "primaryColor": "#607d8b", "selectionForeground": "#ffffff", "tab.backgroundColor": "#011627", "tab.borderColor": "#7e57c2", - "tagColor": "#5f7e97" + "tagColor": "#607d8b" }, "MemoryIndicator": { - "allocatedBackground": "#0b2942", - "usedColor": "#084d81", - "usedBackground": "#084d81" + "allocatedBackground": "#011627", + "usedColor": "#152C3B", + "usedBackground": "#152C3B" }, "Menu": { - "acceleratorForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", "acceleratorSelectionForeground": "#ffffff", "background": "#011627", "border": "4,2,4,2", - "borderColor": "#0b2942", - "disabledBackground": "#0b2942", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "borderColor": "#011627", + "disabledBackground": "#011627", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff", - "separatorColor": "#122d42" + "separatorColor": "#2a373e" }, "MenuBar": { "background": "#011627", "borderColor": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", "highlight": "#011627", - "selectionBackground": "#5f7e97", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff", "shadow": "#011627" }, "MenuItem": { - "acceleratorForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", "acceleratorSelectionForeground": "#ffffff", "border": "4,2,4,2", "background": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "NavBar": { - "arrowColor": "#d6deeb", + "arrowColor": "#b0bec5", "borderColor": "#011627" }, "NewClass": { @@ -372,92 +398,93 @@ }, "NewPSD.warning": "#7e57c2", "Notification": { - "background": "#01111d", - "borderColor": "#01111d", - "errorBackground": "#01111d", - "errorBorderColor": "#01111d", - "foreground": "#d6deeb", + "background": "#152C3B", + "borderColor": "#152C3B", + "errorBackground": "#152C3B", + "errorBorderColor": "#152C3B", + "foreground": "#b0bec5", "MoreButton": { - "background": "#0b253a", - "foreground": "#d6deeb", - "innerBorderColor": "#0b253a" + "background": "#2e3c43", + "foreground": "#b0bec5", + "innerBorderColor": "#2e3c43" }, "ToolWindow": { - "errorBackground": "#01111d", - "errorBorderColor": "#01111d", - "informativeBackground": "#01111d", - "informativeBorderColor": "#01111d", - "warningBackground": "#01111d", - "warningBorderColor": "#01111d" + "errorBackground": "#152C3B", + "errorBorderColor": "#152C3B", + "informativeBackground": "#152C3B", + "informativeBorderColor": "#152C3B", + "warningBackground": "#152C3B", + "warningBorderColor": "#152C3B" } }, - "OnePixelDivider.background": "#122d42", + "OnePixelDivider.background": "#2a373e", "OptionPane": { "background": "#011627", - "foreground": "#d6deeb", - "messageForeground": "#d6deeb" + "foreground": "#b0bec5", + "messageForeground": "#b0bec5" }, "Outline": { - "color": "#0b253a", + "color": "#2e3c43", "focusedColor": "#7e57c2", - "disabledColor": "#697098" + "disabledColor": "#2e3c42" }, "Panel": { "background": "#011627", - "foreground": "#d6deeb" + "foreground": "#b0bec5" }, "ParameterInfo": { - "background": "#0b2942", - "borderColor": "#13344f", - "currentOverloadBackground": "#13344f", + "background": "#011627", + "borderColor": "#152C3B", + "currentOverloadBackground": "#152C3B", "currentParameterForeground": "#7e57c2", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "lineSeparatorColor": "#13344f" + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "lineSeparatorColor": "#152C3B" }, "PasswordField": { "background": "#011627", "capsLockIconColor": "#7e57c2", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "Plugins": { "background": "#011627", - "disabledForeground": "#697098", - "eapTagBackground": "#084d81", - "lightSelectionBackground": "#5f7e97", - "paidTagBackground": "#084d81", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "eapTagBackground": "#152C3B", + "hoverBackground": "#152C3B70", + "lightSelectionBackground": "#152C3B", + "paidTagBackground": "#152C3B", + "selectionBackground": "#152C3B", "tagForeground": "#7e57c2", - "tagBackground": "#084d81", - "trialTagBackground": "#084d81", + "tagBackground": "#152C3B", + "trialTagBackground": "#152C3B", "Button": { - "installBackground": "#0b253a", - "installBorderColor": "#0b253a", - "installForeground": "#d6deeb", - "installFocusedBackground": "#084d81", - "installFillForeground": "#697098", - "installFillBackground": "#0b253a", - "updateBackground": "#0b253a", - "updateBorderColor": "#0b253a", - "updateForeground": "#d6deeb" + "installBackground": "#2e3c43", + "installBorderColor": "#2e3c43", + "installForeground": "#b0bec5", + "installFocusedBackground": "#152C3B", + "installFillForeground": "#2e3c42", + "installFillBackground": "#2e3c43", + "updateBackground": "#7e57c2", + "updateBorderColor": "#2e3c43", + "updateForeground": "#b0bec5" }, "SearchField": { "background": "#011627", - "borderColor": "#122d42" + "borderColor": "#2a373e" }, "SectionHeader": { - "background": "#0b2942", - "foreground": "#d6deeb" + "background": "#011627", + "foreground": "#b0bec5" }, "Tab": { - "hoverBackground": "#13344f", + "hoverBackground": "#152C3B", "selectedForeground": "#ffffff", - "selectedBackground": "#13344f" + "selectedBackground": "#152C3B" } }, "Popup": { @@ -466,26 +493,26 @@ "borderColor": "#011627", "foreground": "#7e57c2" }, - "borderColor": "#010e1a", + "borderColor": "#001424", "inactiveBorderColor": "#011627", - "innerBorderColor": "#0b2942", + "innerBorderColor": "#011627", "Header": { "activeBackground": "#011627", - "inactiveBackground": "#010e1a" + "inactiveBackground": "#001424" }, "paintBorder": true, - "separatorForeground": "#d6deeb", - "separatorColor": "#0b2942", + "separatorForeground": "#b0bec5", + "separatorColor": "#011627", "Toolbar": { - "Floating.background": "#010e1a", - "background": "#010e1a", - "borderColor": "#010e1a" + "Floating.background": "#001424", + "background": "#001424", + "borderColor": "#001424" } }, "PopupMenu": { "background": "#011627", "border": "2,0,2,0", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "translucentBackground": "#011627" }, "PopupMenuSeparator.height": 10, @@ -496,27 +523,28 @@ "indeterminateEndColor": "#7e57c2", "indeterminateStartColor": "#7e57c2", "progressColor": "#7e57c2", - "selectionBackground": "#084d81", - "trackColor": "#084d81" + "selectionBackground": "#152C3B", + "trackColor": "#152C3B" }, "PsiViewer": { "referenceHighlightColor": "#7e57c2" }, "RadioButton": { "background": "#011627", - "disabledText": "#697098", - "foreground": "#d6deeb" + "disabledText": "#2e3c42", + "foreground": "#b0bec5" }, "RadioButtonMenuItem": { - "acceleratorForeground": "#5f7e97", - "acceleratorSelectionForeground": "#5f7e97", + "acceleratorForeground": "#607d8b", + "acceleratorSelectionForeground": "#607d8b", "background": "#011627", "disabledBackground": "#011627", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "selectionBackground": "#5f7e97", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, + "ScreenView.borderColor": "#2a373e", "ScrollBar": { "background": "#011627", "hoverThumbBorderColor": "#7e57c2", @@ -538,7 +566,7 @@ "trackColor": "#01162730" } }, - "thumb": "#084d81", + "thumb": "#152C3B", "thumbBorderColor": "#7e57c270", "thumbColor": "#7e57c270", "trackColor": "#01162730", @@ -553,36 +581,45 @@ }, "SearchEverywhere": { "Advertiser": { - "background": "#010e1a", - "foreground": "#5f7e97" + "background": "#001424", + "foreground": "#607d8b" }, "Header": { "background": "#011627" }, "List": { - "separatorForeground": "#5f7e97", - "separatorColor": "#122d42" + "separatorForeground": "#607d8b", + "separatorColor": "#2a373e" }, "SearchField": { "background": "#011627", - "borderColor": "#010e1a", - "infoForeground": "#5f7e97" + "borderColor": "#001424", + "infoForeground": "#607d8b" }, "Tab": { "active.foreground": "#ffffff", "selectedForeground": "#ffffff", - "selectedBackground": "#084d81" + "selectedBackground": "#152C3B" } }, "SearchMatch": { "endBackground": "#7e57c2", - "startBackground": "#7e57c2" + "startBackground": "#7e57c2", + "endColor": "#7e57c2", + "startColor": "#7e57c2" + }, + "SearchField.errorBackground": "#152C3B", + "SearchOption": { + "selectedBackground": "#152C3B" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#607d8b", + "Repeated.File.Foreground": "#b0bec5" }, - "SearchField.errorBackground": "#01111d", "Separator": { - "background": "#0b2942", - "foreground": "#0b2942", - "separatorColor": "#0b2942" + "background": "#011627", + "foreground": "#011627", + "separatorColor": "#011627" }, "SidePanel": { "background": "#011627" @@ -591,46 +628,48 @@ "background": "#011627", "buttonBorderColor": "#7e57c2", "buttonColor": "#7e57c2", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "majorTickLength": 6, - "tickColor": "#0b2942", - "trackColor": "#13344f", + "tickColor": "#011627", + "trackColor": "#152C3B", "trackWidth": 7, "thumb": "#7e57c2" }, "SpeedSearch": { - "background": "#084d81", - "borderColor": "#122d42", - "foreground": "#d6deeb", - "errorForeground": "#d6deeb" + "background": "#152C3B", + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "errorForeground": "#b0bec5" }, "Spinner": { "background": "#011627", "border": "3,3,3,3", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "selectionForeground": "#ffffff" }, "SplitPane": { "background": "#011627", "highlight": "#011627" }, - "SplitPaneDivider.draggingColor": "#0b2942", + "SplitPaneDivider.draggingColor": "#011627", "StatusBar": { - "borderColor": "#011627" + "borderColor": "#011627", + "hoverBackground": "#152C3B", + "LightEditBackground": "#152C3B" }, "TabbedPane": { "background": "#011627", - "contentAreaColor": "#084d81", + "contentAreaColor": "#152C3B", "contentBorderInsets": "3,1,1,1", - "darkShadow": "#122d42", - "disabledForeground": "#697098", - "disabledUnderlineColor": "#697098", - "focus": "#13344f", - "focusColor": "#13344f", + "darkShadow": "#2a373e", + "disabledForeground": "#2e3c42", + "disabledUnderlineColor": "#2e3c42", + "focus": "#152C3B", + "focusColor": "#152C3B", "fontSizeOffset": 0, - "foreground": "#d6deeb", - "highlight": "#122d42", - "hoverColor": "#084d81", + "foreground": "#b0bec5", + "highlight": "#2a373e", + "hoverColor": "#152C3B", "labelShift": 0, "selectedForeground": "#ffffff", "selectedLabelShift": 0, @@ -643,78 +682,82 @@ }, "TabbedPane.mt.tab.background": "#011627", "Table": { + "alternativeRowBackground": "#001424", "background": "#011627", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#2e3c42", "dropLineColor": "#7e57c2", "dropLineShortColor": "#7e57c2", - "focusCellBackground": "#13344f", + "focusCellBackground": "#152C3B", "focusCellForeground": "#ffffff", - "foreground": "#d6deeb", + "foreground": "#b0bec5", "gridColor": "#011627", - "highlightOuter": "#13344f", + "highlightOuter": "#152C3B", + "hoverBackground": "#152C3B70", + "hoverInactiveBackground": "#152C3B", "lightSelectionForeground": "#ffffff", - "lightSelectionInactiveForeground": "#5f7e97", - "lightSelectionInactiveBackground": "#0b2942", - "selectionBackground": "#13344f", + "lightSelectionInactiveForeground": "#607d8b", + "lightSelectionInactiveBackground": "#011627", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff", - "selectionInactiveBackground": "#13344f", + "selectionInactiveBackground": "#152C3B", "selectionInactiveForeground": "#ffffff", - "sortIconColor": "#d6deeb", - "stripeColor": "#010e1a" + "sortIconColor": "#b0bec5", + "stripeColor": "#001424" }, "TableHeader": { "background": "#011627", "borderColor": "#011627", - "bottomSeparatorColor": "#0b2942", + "bottomSeparatorColor": "#011627", "cellBorder": "4,0,4,0", - "disabledForeground": "#697098", - "foreground": "#d6deeb", - "focusCellBackground": "#13344f", + "disabledForeground": "#2e3c42", + "foreground": "#b0bec5", + "focusCellBackground": "#152C3B", "focusCellForeground": "#ffffff", "height": 25, - "separatorColor": "#0b2942" + "separatorColor": "#011627" }, - "text": "#5f7e97", - "textInactiveText": "#5f7e97", - "textText": "#5f7e97", + "text": "#607d8b", + "textInactiveText": "#607d8b", + "textText": "#607d8b", "TextArea": { "background": "#011627", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "TextField": { "background": "#011627", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "TextPane": { "background": "#011627", "caretForeground": "#7e57c2", - "foreground": "#d6deeb", - "inactiveForeground": "#697098", - "selectionBackground": "#13344f", + "foreground": "#b0bec5", + "inactiveForeground": "#2e3c42", + "selectionBackground": "#152C3B", "selectionForeground": "#ffffff" }, "TitlePane": { - "background": "#010e1a", - "Button.hoverBackground": "#084d81", + "background": "#001424", + "Button.hoverBackground": "#152C3B", "inactiveBackground": "#011627", - "infoForeground": "#5f7e97", - "inactiveInfoForeground": "#5f7e97" + "infoForeground": "#607d8b", + "inactiveInfoForeground": "#607d8b" }, - "TitledBorder.titleColor": "#d6deeb", + "TitledBorder.titleColor": "#b0bec5", "ToggleButton": { - "borderColor": "#0b253a", - "buttonColor": "#d6deeb", - "disabledText": "#697098", - "foreground": "#d6deeb", + "borderColor": "#2e3c43", + "buttonColor": "#b0bec5", + "disabledText": "#2e3c42", + "foreground": "#b0bec5", "offForeground": "#011627", "offBackground": "#011627", "onBackground": "#7e57c2", @@ -722,185 +765,235 @@ }, "ToolBar": { "background": "#011627", - "borderHandleColor": "#5f7e97", - "floatingForeground": "#5f7e97", - "foreground": "#d6deeb" + "borderHandleColor": "#607d8b", + "floatingForeground": "#607d8b", + "foreground": "#b0bec5" }, "ToolTip": { "Actions.background": "#011627", - "Actions.infoForeground": "#5f7e97", - "background": "#011627", - "borderColor": "#084d81", - "foreground": "#d6deeb", - "infoForeground": "#5f7e97", - "separatorColor": "#122d42", - "shortcutForeground": "#5f7e97" + "Actions.infoForeground": "#607d8b", + "background": "#152C3B", + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "infoForeground": "#607d8b", + "separatorColor": "#2a373e", + "shortcutForeground": "#607d8b" }, "ToolWindow": { "Button": { - "hoverBackground": "#13344f", + "hoverBackground": "#152C3B", "selectedForeground": "#ffffff", - "selectedBackground": "#010e1a" + "selectedBackground": "#001424" }, "Header": { "background": "#011627", - "borderColor": "#0b2942", + "borderColor": "#011627", "inactiveBackground": "#011627" }, "HeaderCloseButton": { "background": "#011627" }, "HeaderTab": { - "hoverBackground": "#084d81", - "hoverInactiveBackground": "#0b2942", + "borderColor": "#152C3B", + "hoverBackground": "#152C3B", + "hoverInactiveBackground": "#152C3B", "inactiveUnderlineColor": "#7e57c2", - "selectedBackground": "#010e1a", - "selectedInactiveBackground": "#010e1a", + "selectedBackground": "#001424", + "selectedInactiveBackground": "#001424", "underlineColor": "#7e57c2", - "underlinedTabBackground": "#084d81", - "underlinedTabInactiveBackground": "#0b2942" + "underlinedTabBackground": "#152C3B", + "underlinedTabInactiveBackground": "#011627", + "underlinedTabForeground": "#ffffff", + "underlinedTabInactiveForeground": "#b0bec5" } }, "Tree": { "background": "#011627", - "foreground": "#5f7e97", - "hash": "#122d42", + "foreground": "#607d8b", + "hash": "#2a373e", + "hoverBackground": "#152C3B70", + "hoverInactiveBackground": "#152C3B", "modifiedItemForeground": "#7e57c2", "rowHeight": 28, - "selectionBackground": "#13344f50", + "selectionBackground": "#152C3B70", "selectionForeground": "#ffffff", "selectionInactiveForeground": "#ffffff", - "selectionInactiveBackground": "#13344f50", + "selectionInactiveBackground": "#152C3B70", "textBackground": "#011627" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { - "Activity.borderColor": "#122d42", - "ColorPicker.background": "#011627", - "ColorPicker.foreground": "#d6deeb", - "Component.borderColor": "#122d42", - "Component.background": "#011627", - "Component.foreground": "#d6deeb", - "Connector.borderColor": "#122d42", - "Connector.hoverBorderColor": "#084d81", - "Canvas.background": "#010e1a", - "highStroke.foreground": "#d6deeb", - "Label.foreground": "#5f7e97", - "List.selectionBackground": "#13344f50", - "Panel.borderColor": "#122d42", - "Panel.background": "#011627", - "percent.foreground": "#d6deeb", - "Placeholder.background": "#011627", - "Placeholder.borderColor": "#122d42", - "Placeholder.foreground": "#d6deeb", - "Placeholder.selectedForeground": "#ffffff", + "UIDesigner": { + "Activity.borderColor": "#2a373e", + "Canvas.background": "#001424", + "ColorPicker": { + "background": "#011627", + "foreground": "#b0bec5" + }, + "Component": { + "borderColor": "#2a373e", + "background": "#011627", + "foreground": "#b0bec5", + "hoverBorderColor": "#152C3B" + }, + "Connector": { + "borderColor": "#2a373e", + "hoverBorderColor": "#152C3B" + }, + "Canvas.background": "#001424", + "highStroke.foreground": "#b0bec5", + "Label.foreground": "#607d8b", + "List.selectionBackground": "#152C3B70", + "motion": { + "borderColor": "#2a373e", + "Component.foreground": "#b0bec5", + "ConstraintSetText.foreground": "#607d8b", + "ConstraintSet.background": "#011627", + "CSPanel.SelectedFocusBackground": "#152C3B", + "CSPanel.SelectedBackground": "#152C3B70", + "cs_FocusText.infoForeground": "#607d8b", + "CursorTextColor.foreground": "#b0bec5", + "HoverColor.disabledBackground": "#2e3c42", + "motionGraph.background": "#011627", + "Notification.background": "#152C3B", + "ourAvg.background": "#011627", + "ourCS.background": "#011627", + "ourCS_Border.borderColor": "#2a373e", + "ourCS_TextColor.foreground": "#607d8b", + "ourCS_SelectedFocusBackground.selectionForeground": "#ffffff", + "ourCS_SelectedBackground.selectionInactiveBackground": "#152C3B", + "ourCS_SelectedBorder.pressedBorderColor": "#152C3B", + "ourML_BarColor.separatorColor": "#2a373e", + "PrimaryPanel.background": "#001424", + "SecondaryPanel.background": "#011627", + "SecondaryPanel.header.foreground": "#607d8b", + "SecondaryPanel.header.background": "#001424", + "timeLine.disabledBorderColor": "#2a373e" + }, + "Panel": { + "borderColor": "#2a373e", + "background": "#011627" + }, + "percent.foreground": "#b0bec5", + "Placeholder": { + "background": "#011627", + "borderColor": "#2a373e", + "foreground": "#b0bec5", + "selectedForeground": "#ffffff" + }, "Preview.background": "#011627", - "stroke.acceleratorForeground": "#5f7e97" + "stroke.acceleratorForeground": "#607d8b" }, "ValidationTooltip": { - "errorBackground": "#01111d", - "errorBorderColor": "#01111d", - "warningBackground": "#01111d", - "warningBorderColor": "#01111d" + "errorBackground": "#152C3B", + "errorBorderColor": "#152C3B", + "warningBackground": "#152C3B", + "warningBorderColor": "#152C3B" }, "VersionControl": { "FileHistory.Commit": { "selectedBranchBackground": "#011627" }, "GitCommits": { - "graphColor": "#084d81" + "graphColor": "#152C3B" }, "GitLog": { "localBranchIconColor": "#7e57c2", - "otherIconColor": "#5f7e97", - "remoteBranchIconColor": "#d6deeb", - "tagIconColor": "#5f7e97" + "otherIconColor": "#607d8b", + "remoteBranchIconColor": "#b0bec5", + "tagIconColor": "#607d8b" }, "HgLog": { "branchIconColor": "#7e57c2", "bookmarkIconColor": "#ffffff", - "closedBranchIconColor": "#697098", - "localTagIconColor": "#5f7e97", - "mqTagIconColor": "#5f7e97", - "tagIconColor": "#5f7e97", - "tipIconColor": "#5f7e97" + "closedBranchIconColor": "#2e3c42", + "localTagIconColor": "#607d8b", + "mqTagIconColor": "#607d8b", + "tagIconColor": "#607d8b", + "tipIconColor": "#607d8b" }, "Log": { - "Commit.unmatchedForeground": "#5f7e97", - "Commit.currentBranchBackground": "#0b2942" + "Commit.unmatchedForeground": "#607d8b", + "Commit.currentBranchBackground": "#011627", + "Commit.hoveredBackground": "#152C3B70" }, "RefLabel": { "foreground": "#ffffff", - "backgroundBase": "#084d81" + "backgroundBase": "#152C3B" } }, "Viewport": { "background": "#011627", - "foreground": "#d6deeb" + "foreground": "#b0bec5" }, "WelcomeScreen": { + "AssociatedComponent.background": "#011627", "background": "#011627", "borderColor": "#011627", - "captionBackground": "#010e1a", - "captionForeground": "#d6deeb", - "footerBackground": "#010e1a", - "footerForeground": "#d6deeb", + "captionBackground": "#001424", + "captionForeground": "#b0bec5", + "Details.background": "#011627", + "footerBackground": "#001424", + "footerForeground": "#b0bec5", "headerBackground": "#011627", - "headerForeground": "#d6deeb", - "separatorColor": "#122d42", + "headerForeground": "#b0bec5", + "List.background": "#001424", + "separatorColor": "#2a373e", + "SidePanel.background": "#011627", "Projects": { - "background": "#0b2942", - "selectionBackground": "#5f7e97", - "selectionInactiveBackground": "#0b2942" + "actions.background": "#001424", + "actions.selectionBackground": "#152C3B", + "background": "#011627", + "selectionBackground": "#152C3B", + "selectionInactiveBackground": "#011627" } }, "window": "#011627", - "windowBorder": "#122d42", - "windowText": "#5f7e97", - "Window.border": "#122d42" + "windowBorder": "#2a373e", + "windowText": "#607d8b", + "Window.border": "#2a373e" }, "icons": { "ColorPalette": { - "#43494A": "#010e1a", - "#6B6B6B": "#5f7e97", + "#43494A": "#001424", + "#6B6B6B": "#607d8b", "#A7A7A7": "#011627", "#3D6185": "#7e57c2", "#466D94": "#7e57c2", "#3C3F41": "#011627", - "#545556": "#697098", - "#606060": "#697098", - "#9AA7B0": "#d6deeb", + "#545556": "#2e3c42", + "#606060": "#2e3c42", + "#9AA7B0": "#b0bec5", "#675133": "#7e57c2", "Actions.Blue": "#82AAFF", "Actions.Green": "#ecc48d", - "Actions.Grey": "#5f7e97", + "Actions.Grey": "#607d8b", "Actions.GreyInline": "#637777", - "Actions.GreyInline.Dark": "#d6deeb", + "Actions.GreyInline.Dark": "#b0bec5", "Actions.Red": "#7fdbca", "Actions.Yellow": "#FAD430", - "Checkbox.Background.Default": "#010e1a", - "Checkbox.Background.Default.Dark": "#010e1a", - "Checkbox.Background.Disabled": "#0e293f", - "Checkbox.Background.Disabled.Dark": "#0e293f", - "Checkbox.Border.Default": "#122d42", - "Checkbox.Border.Default.Dark": "#122d42", - "Checkbox.Border.Disabled": "#697098", - "Checkbox.Border.Disabled.Dark": "#697098", + "Checkbox.Background.Default": "#001424", + "Checkbox.Background.Default.Dark": "#001424", + "Checkbox.Background.Disabled": "#0B253A", + "Checkbox.Background.Disabled.Dark": "#0B253A", + "Checkbox.Border.Default": "#2a373e", + "Checkbox.Border.Default.Dark": "#2a373e", + "Checkbox.Border.Disabled": "#2e3c42", + "Checkbox.Border.Disabled.Dark": "#2e3c42", "Checkbox.Focus.Thin.Default": "#7e57c2", "Checkbox.Focus.Thin.Default.Dark": "#7e57c2", "Checkbox.Focus.Wide": "#7e57c2", "Checkbox.Focus.Wide.Dark": "#7e57c2", - "Checkbox.Foreground.Disabled": "#697098", - "Checkbox.Foreground.Disabled.Dark": "#697098", + "Checkbox.Foreground.Disabled": "#2e3c42", + "Checkbox.Foreground.Disabled.Dark": "#2e3c42", "Checkbox.Background.Selected": "#7e57c2", "Checkbox.Background.Selected.Dark": "#011627", "Checkbox.Border.Selected": "#7e57c2", "Checkbox.Border.Selected.Dark": "#7e57c2", "Checkbox.Foreground.Selected": "#7e57c2", "Checkbox.Foreground.Selected.Dark": "#7e57c2", - "Checkbox.Focus.Thin.Selected": "#d6deeb", - "Checkbox.Focus.Thin.Selected.Dark": "#d6deeb", + "Checkbox.Focus.Thin.Selected": "#b0bec5", + "Checkbox.Focus.Thin.Selected.Dark": "#b0bec5", "Objects.Grey": "#637777", "Objects.Blue": "#82AAFF", "Objects.RedStatus": "#7fdbca", @@ -909,7 +1002,7 @@ "Objects.Yellow": "#FAD430", "Objects.Green": "#ecc48d", "Objects.Purple": "#c792ea", - "Objects.BlackText": "#d6deeb", + "Objects.BlackText": "#b0bec5", "Objects.YellowDark": "#f78c6c", "Objects.GreenAndroid": "#ecc48d" } diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark Contrast.theme.json index 218f50e6..0f3616ad 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark Contrast.theme.json @@ -1,8 +1,14 @@ { - "name": "Material Solarized Dark Contrast", + "name": "Solarized Dark Contrast", "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Solarized Dark.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/solardark.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#586e75", @@ -11,7 +17,7 @@ "disabledBackground": "#083F4D", "disabledForeground": "#2E5861", "disabledText": "#2E5861", - "focusColor": "#005a6f", + "focusColor": "#11353F", "focusedBorderColor": "#d33682", "foreground": "#839496", "inactiveBackground": "#083F4D", @@ -41,28 +47,28 @@ "arc": 0, "background": "#002B36", "default": { - "endBackground": "#003946", - "endBorderColor": "#003946", + "endBackground": "#11353F", + "endBorderColor": "#11353F", "foreground": "#FFFFFF", "focusColor": "#d33682", "focusedBorderColor": "#d33682", - "shadowColor": "#003946", - "startBackground": "#003946", - "startBorderColor": "#003946" + "shadowColor": "#11353F", + "startBackground": "#11353F", + "startBorderColor": "#11353F" }, "disabledBorderColor": "#073642", "disabledText": "#2E5861", "endBackground": "#073642", "endBorderColor": "#073642", - "focus": "#005a6f", + "focus": "#11353F", "focusedBorderColor": "#d33682", "foreground": "#586e75", "highlight": "#FFFFFF", "mt.background": "#073642", "mt.foreground": "#586e75", "mt.selectedForeground": "#FFFFFF", - "mt.selection.color1": "#003946", - "mt.selection.color2": "#003946", + "mt.selection.color1": "#11353F", + "mt.selection.color2": "#11353F", "startBackground": "#073642", "startBorderColor": "#073642", "shadowColor": "#073642", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#0D3640", "Tooltip.background": "#2E4C52" }, - "Content.background": "#00252E", + "Content": { + "background": "#00252E", + "selectionBackground": "#2E4C52" + }, "CheckBox": { "background": "#002B36", "disabledText": "#2E5861", @@ -89,6 +98,14 @@ "selectionBackground": "#2E4C52", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#839496", + "AccessEnabled": { + "accessDot": "#d33682", + "dropdownBorder": "#003745", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#002B36", "foreground": "#839496", @@ -104,12 +121,13 @@ }, "background": "#00252E", "buttonBackground": "#073642", + "darcula.hoveredArrowButtonForeground": "#d33682", "disabledForeground": "#2E5861", "foreground": "#839496", "modifiedItemForeground": "#d33682", "nonEditableBackground": "#003745", "padding": "5,5,5,5", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "ComboPopup.border": "#0D3640", @@ -130,7 +148,7 @@ }, "Component": { "arc": 4, - "borderColor": "#005a6f", + "borderColor": "#11353F", "disabledBorderColor": "#073642", "focusColor": "#d33682", "focusedBorderColor": "#d33682", @@ -156,23 +174,25 @@ } }, "DebuggerTabs": { - "selectedBackground": "#005a6f", - "underlinedTabBackground": "#005a6f" + "selectedBackground": "#11353F", + "underlinedTabBackground": "#11353F" }, "DebuggerPopup": { - "borderColor": "#005a6f" + "borderColor": "#11353F" }, "DefaultTabs": { "background": "#002B36", "borderColor": "#002B36", - "hoverBackground": "#003946", + "hoverBackground": "#11353F", "hoverColor": "#00252E", - "hoverMaskColor": "#005a6f", + "hoverMaskColor": "#11353F", + "inactiveColoredTabBackground": "#002B36", "inactiveColoredFileBackground": "#073642", - "inactiveUnderlineColor": "#2E5861", + "inactiveUnderlineColor": "#d33682", "inactiveMaskColor": "#00252E", "underlineColor": "#d33682", - "underlinedTabBackground": "#003946" + "underlinedTabBackground": "#11353F", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#002B36", "DialogWrapper.southPanelBackground": "#002B36", @@ -198,24 +218,26 @@ }, "EditorTabs": { "borderColor": "#003745", - "hoverColor": "#005a6f", - "hoverMaskColor": "#005a6f", + "hoverBackground": "#11353F", + "hoverColor": "#11353F", + "hoverMaskColor": "#11353F", "inactiveMaskColor": "#002B36", - "inactiveColoredFileBackground": "#002B362", + "inactiveColoredFileBackground": "#002B36", "inactiveUnderlineColor": "#2E5861", "selectedForeground": "#839496", - "selectedBackground": "#003946", + "selectedBackground": "#11353F", "underlineColor": "#d33682", - "underlinedTabBackground": "#003946" + "underlinedTabBackground": "#11353F", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#002B36", "borderColor": "#003745", - "hoverBackground": "#005a6f", - "hoverColor": "#005a6f", + "hoverBackground": "#11353F", + "hoverColor": "#11353F", "inactiveUnderlineColor": "#d33682", "underlineColor": "#d33682", - "underlinedTabBackground": "#003946", + "underlinedTabBackground": "#11353F", "underlinedTabForeground": "#839496" }, "FileColor": { @@ -244,14 +266,15 @@ "inactiveBackground": "#073642", "inactiveForeground": "#2E5861", "selectionForeground": "#FFFFFF", - "selectionBackground": "#003946" + "selectionBackground": "#11353F" }, + "GotItTooltip.borderColor": "#2E4C52", "Group": { "disabledSeparatorColor": "#0D3640", "separatorColor": "#0D3640" }, "GutterTooltip": { - "infoForeground": "#839496", + "infoForeground": "#586e75", "lineSeparatorColor": "#002B36" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#2E5861", "foreground": "#839496", "infoForeground": "#586e75", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#839496" }, "Link": { "activeForeground": "#d33682", @@ -301,10 +325,12 @@ "List": { "background": "#003745", "foreground": "#839496", + "hoverBackground": "#2E4C5270", + "hoverInactiveBackground": "#11353F", "selectionBackground": "#2E4C5250", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#2E4C5280" + "selectionInactiveBackground": "#2E4C5270" }, "material": { "background": "#002B36", @@ -320,8 +346,8 @@ }, "MemoryIndicator": { "allocatedBackground": "#003745", - "usedColor": "#005a6f", - "usedBackground": "#005a6f" + "usedColor": "#11353F", + "usedBackground": "#11353F" }, "Menu": { "acceleratorForeground": "#586e75", @@ -408,13 +434,13 @@ }, "ParameterInfo": { "background": "#003745", - "borderColor": "#003946", - "currentOverloadBackground": "#003946", + "borderColor": "#11353F", + "currentOverloadBackground": "#11353F", "currentParameterForeground": "#d33682", "disabledForeground": "#2E5861", "foreground": "#839496", "infoForeground": "#586e75", - "lineSeparatorColor": "#003946" + "lineSeparatorColor": "#11353F" }, "PasswordField": { "background": "#00252E", @@ -422,27 +448,28 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "Plugins": { "background": "#002B36", "disabledForeground": "#2E5861", - "eapTagBackground": "#005a6f", - "lightSelectionBackground": "#2E4C52", - "paidTagBackground": "#005a6f", + "eapTagBackground": "#11353F", + "hoverBackground": "#2E4C5270", + "lightSelectionBackground": "#11353F", + "paidTagBackground": "#11353F", "selectionBackground": "#2E4C52", "tagForeground": "#d33682", - "tagBackground": "#005a6f", - "trialTagBackground": "#005a6f", + "tagBackground": "#11353F", + "trialTagBackground": "#11353F", "Button": { "installBackground": "#073642", "installBorderColor": "#073642", "installForeground": "#839496", - "installFocusedBackground": "#005a6f", + "installFocusedBackground": "#11353F", "installFillForeground": "#2E5861", "installFillBackground": "#073642", - "updateBackground": "#073642", + "updateBackground": "#d33682", "updateBorderColor": "#073642", "updateForeground": "#839496" }, @@ -455,9 +482,9 @@ "foreground": "#839496" }, "Tab": { - "hoverBackground": "#003946", + "hoverBackground": "#11353F", "selectedForeground": "#FFFFFF", - "selectedBackground": "#003946" + "selectedBackground": "#11353F" } }, "Popup": { @@ -496,8 +523,8 @@ "indeterminateEndColor": "#d33682", "indeterminateStartColor": "#d33682", "progressColor": "#d33682", - "selectionBackground": "#005a6f", - "trackColor": "#005a6f" + "selectionBackground": "#11353F", + "trackColor": "#11353F" }, "PsiViewer": { "referenceHighlightColor": "#d33682" @@ -517,6 +544,7 @@ "selectionBackground": "#2E4C52", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#0D3640", "ScrollBar": { "background": "#002B36", "hoverThumbBorderColor": "#d33682", @@ -538,7 +566,7 @@ "trackColor": "#002B3630" } }, - "thumb": "#005a6f", + "thumb": "#11353F", "thumbBorderColor": "#d3368270", "thumbColor": "#d3368270", "trackColor": "#002B3630", @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#FFFFFF", "selectedForeground": "#FFFFFF", - "selectedBackground": "#005a6f" + "selectedBackground": "#11353F" } }, "SearchMatch": { "endBackground": "#d33682", - "startBackground": "#d33682" + "startBackground": "#d33682", + "endColor": "#d33682", + "startColor": "#d33682" }, "SearchField.errorBackground": "#2E4C52", + "SearchOption": { + "selectedBackground": "#11353F" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#586e75", + "Repeated.File.Foreground": "#839496" + }, "Separator": { "background": "#003745", "foreground": "#003745", @@ -594,12 +631,12 @@ "foreground": "#839496", "majorTickLength": 6, "tickColor": "#003745", - "trackColor": "#003946", + "trackColor": "#11353F", "trackWidth": 7, "thumb": "#d33682" }, "SpeedSearch": { - "background": "#005a6f", + "background": "#11353F", "borderColor": "#0D3640", "foreground": "#839496", "errorForeground": "#839496" @@ -616,21 +653,23 @@ }, "SplitPaneDivider.draggingColor": "#003745", "StatusBar": { - "borderColor": "#002B36" + "borderColor": "#002B36", + "hoverBackground": "#11353F", + "LightEditBackground": "#11353F" }, "TabbedPane": { "background": "#002B36", - "contentAreaColor": "#005a6f", + "contentAreaColor": "#11353F", "contentBorderInsets": "3,1,1,1", "darkShadow": "#0D3640", "disabledForeground": "#2E5861", "disabledUnderlineColor": "#2E5861", - "focus": "#003946", - "focusColor": "#003946", + "focus": "#11353F", + "focusColor": "#11353F", "fontSizeOffset": 0, "foreground": "#839496", "highlight": "#0D3640", - "hoverColor": "#005a6f", + "hoverColor": "#11353F", "labelShift": 0, "selectedForeground": "#FFFFFF", "selectedLabelShift": 0, @@ -643,22 +682,26 @@ }, "TabbedPane.mt.tab.background": "#00252E", "Table": { + "alternativeRowBackground": "#00252E", "background": "#002B36", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#2E5861", "dropLineColor": "#d33682", "dropLineShortColor": "#d33682", - "focusCellBackground": "#003946", + "focusCellBackground": "#11353F", "focusCellForeground": "#FFFFFF", "foreground": "#839496", "gridColor": "#002B36", - "highlightOuter": "#003946", + "highlightOuter": "#11353F", + "hoverBackground": "#2E4C5270", + "hoverInactiveBackground": "#11353F", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#586e75", "lightSelectionInactiveBackground": "#003745", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF", - "selectionInactiveBackground": "#003946", + "selectionInactiveBackground": "#11353F", "selectionInactiveForeground": "#FFFFFF", "sortIconColor": "#839496", "stripeColor": "#00252E" @@ -670,7 +713,7 @@ "cellBorder": "4,0,4,0", "disabledForeground": "#2E5861", "foreground": "#839496", - "focusCellBackground": "#003946", + "focusCellBackground": "#11353F", "focusCellForeground": "#FFFFFF", "height": 25, "separatorColor": "#003745" @@ -683,7 +726,7 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "TextField": { @@ -691,7 +734,7 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "TextPane": { @@ -699,12 +742,12 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "TitlePane": { "background": "#00252E", - "Button.hoverBackground": "#005a6f", + "Button.hoverBackground": "#11353F", "inactiveBackground": "#002B36", "infoForeground": "#586e75", "inactiveInfoForeground": "#586e75" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#002B36", "Actions.infoForeground": "#586e75", - "background": "#002B36", - "borderColor": "#005a6f", + "background": "#2E4C52", + "borderColor": "#0D3640", "foreground": "#839496", "infoForeground": "#586e75", "separatorColor": "#0D3640", @@ -738,7 +781,7 @@ }, "ToolWindow": { "Button": { - "hoverBackground": "#003946", + "hoverBackground": "#11353F", "selectedForeground": "#FFFFFF", "selectedBackground": "#00252E" }, @@ -751,50 +794,93 @@ "background": "#002B36" }, "HeaderTab": { - "hoverBackground": "#005a6f", - "hoverInactiveBackground": "#003745", + "borderColor": "#11353F", + "hoverBackground": "#11353F", + "hoverInactiveBackground": "#11353F", "inactiveUnderlineColor": "#d33682", "selectedBackground": "#00252E", "selectedInactiveBackground": "#00252E", "underlineColor": "#d33682", - "underlinedTabBackground": "#005a6f", - "underlinedTabInactiveBackground": "#003745" + "underlinedTabBackground": "#11353F", + "underlinedTabInactiveBackground": "#003745", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#839496" } }, "Tree": { "background": "#00252E", "foreground": "#586e75", "hash": "#0D3640", + "hoverBackground": "#2E4C5270", + "hoverInactiveBackground": "#11353F", "modifiedItemForeground": "#d33682", "rowHeight": 28, - "selectionBackground": "#2E4C5280", + "selectionBackground": "#2E4C5270", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#2E4C5280", + "selectionInactiveBackground": "#2E4C5270", "textBackground": "#00252E" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#0D3640", - "ColorPicker.background": "#002B36", - "ColorPicker.foreground": "#839496", - "Component.borderColor": "#0D3640", - "Component.background": "#002B36", - "Component.foreground": "#839496", - "Connector.borderColor": "#0D3640", - "Connector.hoverBorderColor": "#005a6f", + "Canvas.background": "#00252E", + "ColorPicker": { + "background": "#002B36", + "foreground": "#839496" + }, + "Component": { + "borderColor": "#0D3640", + "background": "#002B36", + "foreground": "#839496", + "hoverBorderColor": "#11353F" + }, + "Connector": { + "borderColor": "#0D3640", + "hoverBorderColor": "#11353F" + }, "Canvas.background": "#00252E", "highStroke.foreground": "#839496", "Label.foreground": "#586e75", - "List.selectionBackground": "#2E4C5280", - "Panel.borderColor": "#0D3640", - "Panel.background": "#002B36", + "List.selectionBackground": "#2E4C5270", + "motion": { + "borderColor": "#0D3640", + "Component.foreground": "#839496", + "ConstraintSetText.foreground": "#586e75", + "ConstraintSet.background": "#003745", + "CSPanel.SelectedFocusBackground": "#2E4C52", + "CSPanel.SelectedBackground": "#2E4C5270", + "cs_FocusText.infoForeground": "#586e75", + "CursorTextColor.foreground": "#839496", + "HoverColor.disabledBackground": "#2E5861", + "motionGraph.background": "#002B36", + "Notification.background": "#2E4C52", + "ourAvg.background": "#003745", + "ourCS.background": "#003745", + "ourCS_Border.borderColor": "#0D3640", + "ourCS_TextColor.foreground": "#586e75", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#11353F", + "ourCS_SelectedBorder.pressedBorderColor": "#11353F", + "ourML_BarColor.separatorColor": "#0D3640", + "PrimaryPanel.background": "#00252E", + "SecondaryPanel.background": "#002B36", + "SecondaryPanel.header.foreground": "#586e75", + "SecondaryPanel.header.background": "#00252E", + "timeLine.disabledBorderColor": "#0D3640" + }, + "Panel": { + "borderColor": "#0D3640", + "background": "#002B36" + }, "percent.foreground": "#839496", - "Placeholder.background": "#002B36", - "Placeholder.borderColor": "#0D3640", - "Placeholder.foreground": "#839496", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#002B36", + "borderColor": "#0D3640", + "foreground": "#839496", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#002B36", "stroke.acceleratorForeground": "#586e75" }, @@ -809,7 +895,7 @@ "selectedBranchBackground": "#002B36" }, "GitCommits": { - "graphColor": "#005a6f" + "graphColor": "#11353F" }, "GitLog": { "localBranchIconColor": "#d33682", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#586e75", - "Commit.currentBranchBackground": "#003745" + "Commit.currentBranchBackground": "#003745", + "Commit.hoveredBackground": "#2E4C5270" }, "RefLabel": { "foreground": "#FFFFFF", - "backgroundBase": "#005a6f" + "backgroundBase": "#11353F" } }, "Viewport": { @@ -840,16 +927,22 @@ "foreground": "#839496" }, "WelcomeScreen": { + "AssociatedComponent.background": "#002B36", "background": "#002B36", "borderColor": "#002B36", "captionBackground": "#00252E", "captionForeground": "#839496", + "Details.background": "#002B36", "footerBackground": "#00252E", "footerForeground": "#839496", "headerBackground": "#002B36", "headerForeground": "#839496", + "List.background": "#00252E", "separatorColor": "#0D3640", + "SidePanel.background": "#003745", "Projects": { + "actions.background": "#00252E", + "actions.selectionBackground": "#11353F", "background": "#003745", "selectionBackground": "#2E4C52", "selectionInactiveBackground": "#003745" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark.theme.json index 77c18cf1..bc03015d 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Dark.theme.json @@ -3,6 +3,12 @@ "dark": true, "author": "Mallowigi", "editorScheme": "/colors/Solarized Dark.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/solardark.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#586e75", @@ -11,7 +17,7 @@ "disabledBackground": "#083F4D", "disabledForeground": "#2E5861", "disabledText": "#2E5861", - "focusColor": "#005a6f", + "focusColor": "#11353F", "focusedBorderColor": "#d33682", "foreground": "#839496", "inactiveBackground": "#083F4D", @@ -41,28 +47,28 @@ "arc": 0, "background": "#002B36", "default": { - "endBackground": "#003946", - "endBorderColor": "#003946", + "endBackground": "#11353F", + "endBorderColor": "#11353F", "foreground": "#FFFFFF", "focusColor": "#d33682", "focusedBorderColor": "#d33682", - "shadowColor": "#003946", - "startBackground": "#003946", - "startBorderColor": "#003946" + "shadowColor": "#11353F", + "startBackground": "#11353F", + "startBorderColor": "#11353F" }, "disabledBorderColor": "#073642", "disabledText": "#2E5861", "endBackground": "#073642", "endBorderColor": "#073642", - "focus": "#005a6f", + "focus": "#11353F", "focusedBorderColor": "#d33682", "foreground": "#586e75", "highlight": "#FFFFFF", "mt.background": "#073642", "mt.foreground": "#586e75", "mt.selectedForeground": "#FFFFFF", - "mt.selection.color1": "#003946", - "mt.selection.color2": "#003946", + "mt.selection.color1": "#11353F", + "mt.selection.color2": "#11353F", "startBackground": "#073642", "startBorderColor": "#073642", "shadowColor": "#073642", @@ -72,7 +78,10 @@ "Tooltip.borderColor": "#0D3640", "Tooltip.background": "#2E4C52" }, - "Content.background": "#00252E", + "Content": { + "background": "#00252E", + "selectionBackground": "#2E4C52" + }, "CheckBox": { "background": "#002B36", "disabledText": "#2E5861", @@ -89,6 +98,14 @@ "selectionBackground": "#2E4C52", "selectionForeground": "#FFFFFF" }, + "CodeWithMe": { + "Avatar.foreground": "#839496", + "AccessEnabled": { + "accessDot": "#d33682", + "dropdownBorder": "#003745", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#002B36", "foreground": "#839496", @@ -104,12 +121,13 @@ }, "background": "#002B36", "buttonBackground": "#073642", + "darcula.hoveredArrowButtonForeground": "#d33682", "disabledForeground": "#2E5861", "foreground": "#839496", "modifiedItemForeground": "#d33682", "nonEditableBackground": "#003745", "padding": "5,5,5,5", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "ComboPopup.border": "#0D3640", @@ -130,7 +148,7 @@ }, "Component": { "arc": 4, - "borderColor": "#005a6f", + "borderColor": "#11353F", "disabledBorderColor": "#073642", "focusColor": "#d33682", "focusedBorderColor": "#d33682", @@ -156,23 +174,25 @@ } }, "DebuggerTabs": { - "selectedBackground": "#005a6f", - "underlinedTabBackground": "#005a6f" + "selectedBackground": "#11353F", + "underlinedTabBackground": "#11353F" }, "DebuggerPopup": { - "borderColor": "#005a6f" + "borderColor": "#11353F" }, "DefaultTabs": { "background": "#002B36", "borderColor": "#002B36", - "hoverBackground": "#003946", + "hoverBackground": "#11353F", "hoverColor": "#002B36", - "hoverMaskColor": "#005a6f", + "hoverMaskColor": "#11353F", + "inactiveColoredTabBackground": "#002B36", "inactiveColoredFileBackground": "#073642", - "inactiveUnderlineColor": "#2E5861", + "inactiveUnderlineColor": "#d33682", "inactiveMaskColor": "#002B36", "underlineColor": "#d33682", - "underlinedTabBackground": "#003946" + "underlinedTabBackground": "#11353F", + "underlinedTabForeground": "#FFFFFF" }, "Desktop.background": "#002B36", "DialogWrapper.southPanelBackground": "#002B36", @@ -198,24 +218,26 @@ }, "EditorTabs": { "borderColor": "#003745", - "hoverColor": "#005a6f", - "hoverMaskColor": "#005a6f", + "hoverBackground": "#11353F", + "hoverColor": "#11353F", + "hoverMaskColor": "#11353F", "inactiveMaskColor": "#002B36", - "inactiveColoredFileBackground": "#002B362", + "inactiveColoredFileBackground": "#002B36", "inactiveUnderlineColor": "#2E5861", "selectedForeground": "#839496", - "selectedBackground": "#003946", + "selectedBackground": "#11353F", "underlineColor": "#d33682", - "underlinedTabBackground": "#003946" + "underlinedTabBackground": "#11353F", + "underlinedTabForeground": "#FFFFFF" }, "EditorGroupsTabs": { "background": "#002B36", "borderColor": "#003745", - "hoverBackground": "#005a6f", - "hoverColor": "#005a6f", + "hoverBackground": "#11353F", + "hoverColor": "#11353F", "inactiveUnderlineColor": "#d33682", "underlineColor": "#d33682", - "underlinedTabBackground": "#003946", + "underlinedTabBackground": "#11353F", "underlinedTabForeground": "#839496" }, "FileColor": { @@ -244,14 +266,15 @@ "inactiveBackground": "#073642", "inactiveForeground": "#2E5861", "selectionForeground": "#FFFFFF", - "selectionBackground": "#003946" + "selectionBackground": "#11353F" }, + "GotItTooltip.borderColor": "#2E4C52", "Group": { "disabledSeparatorColor": "#0D3640", "separatorColor": "#0D3640" }, "GutterTooltip": { - "infoForeground": "#839496", + "infoForeground": "#586e75", "lineSeparatorColor": "#002B36" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#2E5861", "foreground": "#839496", "infoForeground": "#586e75", - "selectedForeground": "#FFFFFF" + "selectedForeground": "#FFFFFF", + "selectedDisabledForeground": "#839496" }, "Link": { "activeForeground": "#d33682", @@ -301,10 +325,12 @@ "List": { "background": "#003745", "foreground": "#839496", + "hoverBackground": "#2E4C5270", + "hoverInactiveBackground": "#11353F", "selectionBackground": "#2E4C5250", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#2E4C5280" + "selectionInactiveBackground": "#2E4C5270" }, "material": { "background": "#002B36", @@ -320,8 +346,8 @@ }, "MemoryIndicator": { "allocatedBackground": "#003745", - "usedColor": "#005a6f", - "usedBackground": "#005a6f" + "usedColor": "#11353F", + "usedBackground": "#11353F" }, "Menu": { "acceleratorForeground": "#586e75", @@ -408,13 +434,13 @@ }, "ParameterInfo": { "background": "#003745", - "borderColor": "#003946", - "currentOverloadBackground": "#003946", + "borderColor": "#11353F", + "currentOverloadBackground": "#11353F", "currentParameterForeground": "#d33682", "disabledForeground": "#2E5861", "foreground": "#839496", "infoForeground": "#586e75", - "lineSeparatorColor": "#003946" + "lineSeparatorColor": "#11353F" }, "PasswordField": { "background": "#002B36", @@ -422,27 +448,28 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "Plugins": { "background": "#002B36", "disabledForeground": "#2E5861", - "eapTagBackground": "#005a6f", - "lightSelectionBackground": "#2E4C52", - "paidTagBackground": "#005a6f", + "eapTagBackground": "#11353F", + "hoverBackground": "#2E4C5270", + "lightSelectionBackground": "#11353F", + "paidTagBackground": "#11353F", "selectionBackground": "#2E4C52", "tagForeground": "#d33682", - "tagBackground": "#005a6f", - "trialTagBackground": "#005a6f", + "tagBackground": "#11353F", + "trialTagBackground": "#11353F", "Button": { "installBackground": "#073642", "installBorderColor": "#073642", "installForeground": "#839496", - "installFocusedBackground": "#005a6f", + "installFocusedBackground": "#11353F", "installFillForeground": "#2E5861", "installFillBackground": "#073642", - "updateBackground": "#073642", + "updateBackground": "#d33682", "updateBorderColor": "#073642", "updateForeground": "#839496" }, @@ -455,9 +482,9 @@ "foreground": "#839496" }, "Tab": { - "hoverBackground": "#003946", + "hoverBackground": "#11353F", "selectedForeground": "#FFFFFF", - "selectedBackground": "#003946" + "selectedBackground": "#11353F" } }, "Popup": { @@ -496,8 +523,8 @@ "indeterminateEndColor": "#d33682", "indeterminateStartColor": "#d33682", "progressColor": "#d33682", - "selectionBackground": "#005a6f", - "trackColor": "#005a6f" + "selectionBackground": "#11353F", + "trackColor": "#11353F" }, "PsiViewer": { "referenceHighlightColor": "#d33682" @@ -517,6 +544,7 @@ "selectionBackground": "#2E4C52", "selectionForeground": "#FFFFFF" }, + "ScreenView.borderColor": "#0D3640", "ScrollBar": { "background": "#002B36", "hoverThumbBorderColor": "#d33682", @@ -538,7 +566,7 @@ "trackColor": "#002B3630" } }, - "thumb": "#005a6f", + "thumb": "#11353F", "thumbBorderColor": "#d3368270", "thumbColor": "#d3368270", "trackColor": "#002B3630", @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#FFFFFF", "selectedForeground": "#FFFFFF", - "selectedBackground": "#005a6f" + "selectedBackground": "#11353F" } }, "SearchMatch": { "endBackground": "#d33682", - "startBackground": "#d33682" + "startBackground": "#d33682", + "endColor": "#d33682", + "startColor": "#d33682" }, "SearchField.errorBackground": "#2E4C52", + "SearchOption": { + "selectedBackground": "#11353F" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#586e75", + "Repeated.File.Foreground": "#839496" + }, "Separator": { "background": "#003745", "foreground": "#003745", @@ -594,12 +631,12 @@ "foreground": "#839496", "majorTickLength": 6, "tickColor": "#003745", - "trackColor": "#003946", + "trackColor": "#11353F", "trackWidth": 7, "thumb": "#d33682" }, "SpeedSearch": { - "background": "#005a6f", + "background": "#11353F", "borderColor": "#0D3640", "foreground": "#839496", "errorForeground": "#839496" @@ -616,21 +653,23 @@ }, "SplitPaneDivider.draggingColor": "#003745", "StatusBar": { - "borderColor": "#002B36" + "borderColor": "#002B36", + "hoverBackground": "#11353F", + "LightEditBackground": "#11353F" }, "TabbedPane": { "background": "#002B36", - "contentAreaColor": "#005a6f", + "contentAreaColor": "#11353F", "contentBorderInsets": "3,1,1,1", "darkShadow": "#0D3640", "disabledForeground": "#2E5861", "disabledUnderlineColor": "#2E5861", - "focus": "#003946", - "focusColor": "#003946", + "focus": "#11353F", + "focusColor": "#11353F", "fontSizeOffset": 0, "foreground": "#839496", "highlight": "#0D3640", - "hoverColor": "#005a6f", + "hoverColor": "#11353F", "labelShift": 0, "selectedForeground": "#FFFFFF", "selectedLabelShift": 0, @@ -643,22 +682,26 @@ }, "TabbedPane.mt.tab.background": "#002B36", "Table": { + "alternativeRowBackground": "#00252E", "background": "#002B36", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#2E5861", "dropLineColor": "#d33682", "dropLineShortColor": "#d33682", - "focusCellBackground": "#003946", + "focusCellBackground": "#11353F", "focusCellForeground": "#FFFFFF", "foreground": "#839496", "gridColor": "#002B36", - "highlightOuter": "#003946", + "highlightOuter": "#11353F", + "hoverBackground": "#2E4C5270", + "hoverInactiveBackground": "#11353F", "lightSelectionForeground": "#FFFFFF", "lightSelectionInactiveForeground": "#586e75", "lightSelectionInactiveBackground": "#003745", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF", - "selectionInactiveBackground": "#003946", + "selectionInactiveBackground": "#11353F", "selectionInactiveForeground": "#FFFFFF", "sortIconColor": "#839496", "stripeColor": "#00252E" @@ -670,7 +713,7 @@ "cellBorder": "4,0,4,0", "disabledForeground": "#2E5861", "foreground": "#839496", - "focusCellBackground": "#003946", + "focusCellBackground": "#11353F", "focusCellForeground": "#FFFFFF", "height": 25, "separatorColor": "#003745" @@ -683,7 +726,7 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "TextField": { @@ -691,7 +734,7 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "TextPane": { @@ -699,12 +742,12 @@ "caretForeground": "#d33682", "foreground": "#839496", "inactiveForeground": "#2E5861", - "selectionBackground": "#003946", + "selectionBackground": "#11353F", "selectionForeground": "#FFFFFF" }, "TitlePane": { "background": "#00252E", - "Button.hoverBackground": "#005a6f", + "Button.hoverBackground": "#11353F", "inactiveBackground": "#002B36", "infoForeground": "#586e75", "inactiveInfoForeground": "#586e75" @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#002B36", "Actions.infoForeground": "#586e75", - "background": "#002B36", - "borderColor": "#005a6f", + "background": "#2E4C52", + "borderColor": "#0D3640", "foreground": "#839496", "infoForeground": "#586e75", "separatorColor": "#0D3640", @@ -738,7 +781,7 @@ }, "ToolWindow": { "Button": { - "hoverBackground": "#003946", + "hoverBackground": "#11353F", "selectedForeground": "#FFFFFF", "selectedBackground": "#00252E" }, @@ -751,50 +794,93 @@ "background": "#002B36" }, "HeaderTab": { - "hoverBackground": "#005a6f", - "hoverInactiveBackground": "#003745", + "borderColor": "#11353F", + "hoverBackground": "#11353F", + "hoverInactiveBackground": "#11353F", "inactiveUnderlineColor": "#d33682", "selectedBackground": "#00252E", "selectedInactiveBackground": "#00252E", "underlineColor": "#d33682", - "underlinedTabBackground": "#005a6f", - "underlinedTabInactiveBackground": "#003745" + "underlinedTabBackground": "#11353F", + "underlinedTabInactiveBackground": "#003745", + "underlinedTabForeground": "#FFFFFF", + "underlinedTabInactiveForeground": "#839496" } }, "Tree": { "background": "#002B36", "foreground": "#586e75", "hash": "#0D3640", + "hoverBackground": "#2E4C5270", + "hoverInactiveBackground": "#11353F", "modifiedItemForeground": "#d33682", "rowHeight": 28, - "selectionBackground": "#2E4C5280", + "selectionBackground": "#2E4C5270", "selectionForeground": "#FFFFFF", "selectionInactiveForeground": "#FFFFFF", - "selectionInactiveBackground": "#2E4C5280", + "selectionInactiveBackground": "#2E4C5270", "textBackground": "#002B36" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#0D3640", - "ColorPicker.background": "#002B36", - "ColorPicker.foreground": "#839496", - "Component.borderColor": "#0D3640", - "Component.background": "#002B36", - "Component.foreground": "#839496", - "Connector.borderColor": "#0D3640", - "Connector.hoverBorderColor": "#005a6f", + "Canvas.background": "#00252E", + "ColorPicker": { + "background": "#002B36", + "foreground": "#839496" + }, + "Component": { + "borderColor": "#0D3640", + "background": "#002B36", + "foreground": "#839496", + "hoverBorderColor": "#11353F" + }, + "Connector": { + "borderColor": "#0D3640", + "hoverBorderColor": "#11353F" + }, "Canvas.background": "#00252E", "highStroke.foreground": "#839496", "Label.foreground": "#586e75", - "List.selectionBackground": "#2E4C5280", - "Panel.borderColor": "#0D3640", - "Panel.background": "#002B36", + "List.selectionBackground": "#2E4C5270", + "motion": { + "borderColor": "#0D3640", + "Component.foreground": "#839496", + "ConstraintSetText.foreground": "#586e75", + "ConstraintSet.background": "#003745", + "CSPanel.SelectedFocusBackground": "#2E4C52", + "CSPanel.SelectedBackground": "#2E4C5270", + "cs_FocusText.infoForeground": "#586e75", + "CursorTextColor.foreground": "#839496", + "HoverColor.disabledBackground": "#2E5861", + "motionGraph.background": "#002B36", + "Notification.background": "#2E4C52", + "ourAvg.background": "#003745", + "ourCS.background": "#003745", + "ourCS_Border.borderColor": "#0D3640", + "ourCS_TextColor.foreground": "#586e75", + "ourCS_SelectedFocusBackground.selectionForeground": "#FFFFFF", + "ourCS_SelectedBackground.selectionInactiveBackground": "#11353F", + "ourCS_SelectedBorder.pressedBorderColor": "#11353F", + "ourML_BarColor.separatorColor": "#0D3640", + "PrimaryPanel.background": "#00252E", + "SecondaryPanel.background": "#002B36", + "SecondaryPanel.header.foreground": "#586e75", + "SecondaryPanel.header.background": "#00252E", + "timeLine.disabledBorderColor": "#0D3640" + }, + "Panel": { + "borderColor": "#0D3640", + "background": "#002B36" + }, "percent.foreground": "#839496", - "Placeholder.background": "#002B36", - "Placeholder.borderColor": "#0D3640", - "Placeholder.foreground": "#839496", - "Placeholder.selectedForeground": "#FFFFFF", + "Placeholder": { + "background": "#002B36", + "borderColor": "#0D3640", + "foreground": "#839496", + "selectedForeground": "#FFFFFF" + }, "Preview.background": "#002B36", "stroke.acceleratorForeground": "#586e75" }, @@ -809,7 +895,7 @@ "selectedBranchBackground": "#002B36" }, "GitCommits": { - "graphColor": "#005a6f" + "graphColor": "#11353F" }, "GitLog": { "localBranchIconColor": "#d33682", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#586e75", - "Commit.currentBranchBackground": "#003745" + "Commit.currentBranchBackground": "#003745", + "Commit.hoveredBackground": "#2E4C5270" }, "RefLabel": { "foreground": "#FFFFFF", - "backgroundBase": "#005a6f" + "backgroundBase": "#11353F" } }, "Viewport": { @@ -840,16 +927,22 @@ "foreground": "#839496" }, "WelcomeScreen": { + "AssociatedComponent.background": "#002B36", "background": "#002B36", "borderColor": "#002B36", "captionBackground": "#00252E", "captionForeground": "#839496", + "Details.background": "#002B36", "footerBackground": "#00252E", "footerForeground": "#839496", "headerBackground": "#002B36", "headerForeground": "#839496", + "List.background": "#00252E", "separatorColor": "#0D3640", + "SidePanel.background": "#003745", "Projects": { + "actions.background": "#00252E", + "actions.selectionBackground": "#11353F", "background": "#003745", "selectionBackground": "#2E4C52", "selectionInactiveBackground": "#003745" diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light Contrast.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light Contrast.theme.json index 19d5aae6..a6c24d12 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light Contrast.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light Contrast.theme.json @@ -1,8 +1,14 @@ { - "name": "Material Solarized Light Contrast", + "name": "Solarized Light Contrast", "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Solarized Light.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/solarlight.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#93a1a1", @@ -11,13 +17,13 @@ "disabledBackground": "#E3DCC9", "disabledForeground": "#C9CCC3", "disabledText": "#C9CCC3", - "focusColor": "#d1cbb8", + "focusColor": "#F6F0DE", "focusedBorderColor": "#d33682", "foreground": "#586e75", "inactiveBackground": "#E3DCC9", "inactiveForeground": "#93a1a1", "infoForeground": "#93a1a1", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionBackgroundInactive": "#F6F0DE", "selectionForeground": "#002b36", "selectionInactiveBackground": "#F6F0DE", @@ -27,13 +33,13 @@ "ActionButton": { "hoverBackground": "#d3368250", "hoverBorderColor": "#d3368250", - "hoverSeparatorColor": "#d8d4c4", + "hoverSeparatorColor": "#FEFBF1", "focusedBorderColor": "#d3368250", "pressedBackground": "#d3368250", "pressedBorderColor": "#d3368250" }, "Autocomplete": { - "selectionBackground": "#e8dcb6" + "selectionBackground": "#93a1a1" }, "Borders.ContrastBorderColor": "#fdf6e3", "Borders.color": "#edead9", @@ -41,38 +47,41 @@ "arc": 0, "background": "#fdf6e3", "default": { - "endBackground": "#d1cbb8", - "endBorderColor": "#d1cbb8", + "endBackground": "#F6F0DE", + "endBorderColor": "#F6F0DE", "foreground": "#002b36", "focusColor": "#d33682", "focusedBorderColor": "#d33682", - "shadowColor": "#d1cbb8", - "startBackground": "#d1cbb8", - "startBorderColor": "#d1cbb8" + "shadowColor": "#F6F0DE", + "startBackground": "#F6F0DE", + "startBorderColor": "#F6F0DE" }, - "disabledBorderColor": "#d8d4c4", + "disabledBorderColor": "#FEFBF1", "disabledText": "#C9CCC3", - "endBackground": "#d8d4c4", - "endBorderColor": "#d8d4c4", - "focus": "#d1cbb8", + "endBackground": "#FEFBF1", + "endBorderColor": "#FEFBF1", + "focus": "#F6F0DE", "focusedBorderColor": "#d33682", "foreground": "#93a1a1", "highlight": "#002b36", - "mt.background": "#d8d4c4", + "mt.background": "#FEFBF1", "mt.foreground": "#93a1a1", "mt.selectedForeground": "#002b36", - "mt.selection.color1": "#d1cbb8", - "mt.selection.color2": "#d1cbb8", - "startBackground": "#d8d4c4", - "startBorderColor": "#d8d4c4", - "shadowColor": "#d8d4c4", + "mt.selection.color1": "#F6F0DE", + "mt.selection.color2": "#F6F0DE", + "startBackground": "#FEFBF1", + "startBorderColor": "#FEFBF1", + "shadowColor": "#FEFBF1", "shadowWidth": 0 }, "Canvas": { "Tooltip.borderColor": "#edead9", "Tooltip.background": "#EDE8D4" }, - "Content.background": "#eee8d5", + "Content": { + "background": "#eee8d5", + "selectionBackground": "#93a1a1" + }, "CheckBox": { "background": "#fdf6e3", "disabledText": "#C9CCC3", @@ -86,30 +95,39 @@ "disabledBackground": "#fdf6e3", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, + "CodeWithMe": { + "Avatar.foreground": "#586e75", + "AccessEnabled": { + "accessDot": "#d33682", + "dropdownBorder": "#F6F0DE", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#fdf6e3", "foreground": "#586e75", "swatchesDefaultRecentColor": "#586e75" }, - "ComboBoxButton.background": "#d8d4c4", + "ComboBoxButton.background": "#FEFBF1", "ComboBox": { "ArrowButton": { - "background": "#d8d4c4", + "background": "#FEFBF1", "disabledIconColor": "#C9CCC3", "iconColor": "#586e75", "nonEditableBackground": "#fdf6e3" }, "background": "#eee8d5", - "buttonBackground": "#d8d4c4", + "buttonBackground": "#FEFBF1", + "darcula.hoveredArrowButtonForeground": "#d33682", "disabledForeground": "#C9CCC3", "foreground": "#586e75", "modifiedItemForeground": "#d33682", "nonEditableBackground": "#F6F0DE", "padding": "5,5,5,5", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "ComboPopup.border": "#edead9", @@ -123,15 +141,15 @@ "selectedGrayedForeground": "#002b36", "selectionGrayForeground": "#002b36", "selectionInactiveInfoForeground": "#93a1a1", - "selectionInactiveBackground": "#e8dcb650", - "selectionBackground": "#e8dcb680", + "selectionInactiveBackground": "#93a1a150", + "selectionBackground": "#93a1a180", "selectionForeground": "#002b36", "selectionInfoForeground": "#002b36" }, "Component": { "arc": 4, - "borderColor": "#d1cbb8", - "disabledBorderColor": "#d8d4c4", + "borderColor": "#F6F0DE", + "disabledBorderColor": "#FEFBF1", "focusColor": "#d33682", "focusedBorderColor": "#d33682", "hoverIconColor": "#d33682", @@ -156,23 +174,25 @@ } }, "DebuggerTabs": { - "selectedBackground": "#d1cbb8", - "underlinedTabBackground": "#d1cbb8" + "selectedBackground": "#F6F0DE", + "underlinedTabBackground": "#F6F0DE" }, "DebuggerPopup": { - "borderColor": "#d1cbb8" + "borderColor": "#F6F0DE" }, "DefaultTabs": { "background": "#fdf6e3", "borderColor": "#fdf6e3", - "hoverBackground": "#d1cbb8", + "hoverBackground": "#F6F0DE", "hoverColor": "#eee8d5", - "hoverMaskColor": "#d1cbb8", - "inactiveColoredFileBackground": "#d8d4c4", - "inactiveUnderlineColor": "#C9CCC3", + "hoverMaskColor": "#F6F0DE", + "inactiveColoredTabBackground": "#fdf6e3", + "inactiveColoredFileBackground": "#FEFBF1", + "inactiveUnderlineColor": "#d33682", "inactiveMaskColor": "#eee8d5", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8" + "underlinedTabBackground": "#F6F0DE", + "underlinedTabForeground": "#002b36" }, "Desktop.background": "#fdf6e3", "DialogWrapper.southPanelBackground": "#fdf6e3", @@ -193,29 +213,31 @@ "foreground": "#586e75", "inactiveBackground": "#fdf6e3", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, "EditorTabs": { "borderColor": "#F6F0DE", - "hoverColor": "#d1cbb8", - "hoverMaskColor": "#d1cbb8", + "hoverBackground": "#F6F0DE", + "hoverColor": "#F6F0DE", + "hoverMaskColor": "#F6F0DE", "inactiveMaskColor": "#fdf6e3", - "inactiveColoredFileBackground": "#fdf6e32", + "inactiveColoredFileBackground": "#fdf6e3", "inactiveUnderlineColor": "#C9CCC3", "selectedForeground": "#586e75", - "selectedBackground": "#d1cbb8", + "selectedBackground": "#F6F0DE", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8" + "underlinedTabBackground": "#F6F0DE", + "underlinedTabForeground": "#002b36" }, "EditorGroupsTabs": { "background": "#fdf6e3", "borderColor": "#F6F0DE", - "hoverBackground": "#d1cbb8", - "hoverColor": "#d1cbb8", + "hoverBackground": "#F6F0DE", + "hoverColor": "#F6F0DE", "inactiveUnderlineColor": "#d33682", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8", + "underlinedTabBackground": "#F6F0DE", "underlinedTabForeground": "#586e75" }, "FileColor": { @@ -241,17 +263,18 @@ "background": "#eee8d5", "caretForeground": "#d33682", "foreground": "#586e75", - "inactiveBackground": "#d8d4c4", + "inactiveBackground": "#FEFBF1", "inactiveForeground": "#C9CCC3", "selectionForeground": "#002b36", - "selectionBackground": "#d1cbb8" + "selectionBackground": "#F6F0DE" }, + "GotItTooltip.borderColor": "#EDE8D4", "Group": { "disabledSeparatorColor": "#edead9", "separatorColor": "#edead9" }, "GutterTooltip": { - "infoForeground": "#586e75", + "infoForeground": "#93a1a1", "lineSeparatorColor": "#fdf6e3" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#C9CCC3", "foreground": "#586e75", "infoForeground": "#93a1a1", - "selectedForeground": "#002b36" + "selectedForeground": "#002b36", + "selectedDisabledForeground": "#586e75" }, "Link": { "activeForeground": "#d33682", @@ -301,17 +325,19 @@ "List": { "background": "#F6F0DE", "foreground": "#586e75", - "selectionBackground": "#e8dcb650", + "hoverBackground": "#93a1a170", + "hoverInactiveBackground": "#F6F0DE", + "selectionBackground": "#93a1a150", "selectionForeground": "#002b36", "selectionInactiveForeground": "#002b36", - "selectionInactiveBackground": "#e8dcb6b0" + "selectionInactiveBackground": "#93a1a170" }, "material": { "background": "#fdf6e3", "branchColor": "#586e75", "contrast": "#eee8d5", "foreground": "#586e75", - "mergeCommits": "#d8d4c4", + "mergeCommits": "#FEFBF1", "primaryColor": "#93a1a1", "selectionForeground": "#002b36", "tab.backgroundColor": "#fdf6e3", @@ -320,8 +346,8 @@ }, "MemoryIndicator": { "allocatedBackground": "#F6F0DE", - "usedColor": "#d1cbb8", - "usedBackground": "#d1cbb8" + "usedColor": "#F6F0DE", + "usedBackground": "#F6F0DE" }, "Menu": { "acceleratorForeground": "#93a1a1", @@ -332,7 +358,7 @@ "disabledBackground": "#F6F0DE", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36", "separatorColor": "#edead9" }, @@ -343,7 +369,7 @@ "disabledForeground": "#C9CCC3", "foreground": "#586e75", "highlight": "#fdf6e3", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36", "shadow": "#eee8d5" }, @@ -355,7 +381,7 @@ "disabledBackground": "#fdf6e3", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, "NavBar": { @@ -378,9 +404,9 @@ "errorBorderColor": "#EDE8D4", "foreground": "#586e75", "MoreButton": { - "background": "#d8d4c4", + "background": "#FEFBF1", "foreground": "#586e75", - "innerBorderColor": "#d8d4c4" + "innerBorderColor": "#FEFBF1" }, "ToolWindow": { "errorBackground": "#EDE8D4", @@ -398,7 +424,7 @@ "messageForeground": "#586e75" }, "Outline": { - "color": "#d8d4c4", + "color": "#FEFBF1", "focusedColor": "#d33682", "disabledColor": "#C9CCC3" }, @@ -408,13 +434,13 @@ }, "ParameterInfo": { "background": "#F6F0DE", - "borderColor": "#d1cbb8", - "currentOverloadBackground": "#d1cbb8", + "borderColor": "#F6F0DE", + "currentOverloadBackground": "#F6F0DE", "currentParameterForeground": "#d33682", "disabledForeground": "#C9CCC3", "foreground": "#586e75", "infoForeground": "#93a1a1", - "lineSeparatorColor": "#d1cbb8" + "lineSeparatorColor": "#F6F0DE" }, "PasswordField": { "background": "#eee8d5", @@ -422,28 +448,29 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "Plugins": { "background": "#fdf6e3", "disabledForeground": "#C9CCC3", - "eapTagBackground": "#d1cbb8", - "lightSelectionBackground": "#e8dcb6", - "paidTagBackground": "#d1cbb8", - "selectionBackground": "#e8dcb6", + "eapTagBackground": "#F6F0DE", + "hoverBackground": "#93a1a170", + "lightSelectionBackground": "#F6F0DE", + "paidTagBackground": "#F6F0DE", + "selectionBackground": "#93a1a1", "tagForeground": "#d33682", - "tagBackground": "#d1cbb8", - "trialTagBackground": "#d1cbb8", + "tagBackground": "#F6F0DE", + "trialTagBackground": "#F6F0DE", "Button": { - "installBackground": "#d8d4c4", - "installBorderColor": "#d8d4c4", + "installBackground": "#FEFBF1", + "installBorderColor": "#FEFBF1", "installForeground": "#586e75", - "installFocusedBackground": "#d1cbb8", + "installFocusedBackground": "#F6F0DE", "installFillForeground": "#C9CCC3", - "installFillBackground": "#d8d4c4", - "updateBackground": "#d8d4c4", - "updateBorderColor": "#d8d4c4", + "installFillBackground": "#FEFBF1", + "updateBackground": "#d33682", + "updateBorderColor": "#FEFBF1", "updateForeground": "#586e75" }, "SearchField": { @@ -455,9 +482,9 @@ "foreground": "#586e75" }, "Tab": { - "hoverBackground": "#d1cbb8", + "hoverBackground": "#F6F0DE", "selectedForeground": "#002b36", - "selectedBackground": "#d1cbb8" + "selectedBackground": "#F6F0DE" } }, "Popup": { @@ -496,8 +523,8 @@ "indeterminateEndColor": "#d33682", "indeterminateStartColor": "#d33682", "progressColor": "#d33682", - "selectionBackground": "#d1cbb8", - "trackColor": "#d1cbb8" + "selectionBackground": "#F6F0DE", + "trackColor": "#F6F0DE" }, "PsiViewer": { "referenceHighlightColor": "#d33682" @@ -514,9 +541,10 @@ "disabledBackground": "#fdf6e3", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, + "ScreenView.borderColor": "#edead9", "ScrollBar": { "background": "#fdf6e3", "hoverThumbBorderColor": "#d33682", @@ -538,7 +566,7 @@ "trackColor": "#fdf6e330" } }, - "thumb": "#d1cbb8", + "thumb": "#F6F0DE", "thumbBorderColor": "#d3368270", "thumbColor": "#d3368270", "trackColor": "#fdf6e330", @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#002b36", "selectedForeground": "#002b36", - "selectedBackground": "#d1cbb8" + "selectedBackground": "#F6F0DE" } }, "SearchMatch": { "endBackground": "#d33682", - "startBackground": "#d33682" + "startBackground": "#d33682", + "endColor": "#d33682", + "startColor": "#d33682" }, "SearchField.errorBackground": "#EDE8D4", + "SearchOption": { + "selectedBackground": "#F6F0DE" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#93a1a1", + "Repeated.File.Foreground": "#586e75" + }, "Separator": { "background": "#F6F0DE", "foreground": "#F6F0DE", @@ -594,12 +631,12 @@ "foreground": "#586e75", "majorTickLength": 6, "tickColor": "#F6F0DE", - "trackColor": "#d1cbb8", + "trackColor": "#F6F0DE", "trackWidth": 7, "thumb": "#d33682" }, "SpeedSearch": { - "background": "#d1cbb8", + "background": "#F6F0DE", "borderColor": "#edead9", "foreground": "#586e75", "errorForeground": "#586e75" @@ -616,21 +653,23 @@ }, "SplitPaneDivider.draggingColor": "#F6F0DE", "StatusBar": { - "borderColor": "#fdf6e3" + "borderColor": "#fdf6e3", + "hoverBackground": "#F6F0DE", + "LightEditBackground": "#F6F0DE" }, "TabbedPane": { "background": "#fdf6e3", - "contentAreaColor": "#d1cbb8", + "contentAreaColor": "#F6F0DE", "contentBorderInsets": "3,1,1,1", "darkShadow": "#edead9", "disabledForeground": "#C9CCC3", "disabledUnderlineColor": "#C9CCC3", - "focus": "#d1cbb8", - "focusColor": "#d1cbb8", + "focus": "#F6F0DE", + "focusColor": "#F6F0DE", "fontSizeOffset": 0, "foreground": "#586e75", "highlight": "#edead9", - "hoverColor": "#d1cbb8", + "hoverColor": "#F6F0DE", "labelShift": 0, "selectedForeground": "#002b36", "selectedLabelShift": 0, @@ -643,22 +682,26 @@ }, "TabbedPane.mt.tab.background": "#eee8d5", "Table": { + "alternativeRowBackground": "#eee8d5", "background": "#fdf6e3", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#C9CCC3", "dropLineColor": "#d33682", "dropLineShortColor": "#d33682", - "focusCellBackground": "#d1cbb8", + "focusCellBackground": "#F6F0DE", "focusCellForeground": "#002b36", "foreground": "#586e75", "gridColor": "#fdf6e3", - "highlightOuter": "#d1cbb8", + "highlightOuter": "#F6F0DE", + "hoverBackground": "#93a1a170", + "hoverInactiveBackground": "#F6F0DE", "lightSelectionForeground": "#002b36", "lightSelectionInactiveForeground": "#93a1a1", "lightSelectionInactiveBackground": "#F6F0DE", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36", - "selectionInactiveBackground": "#d1cbb8", + "selectionInactiveBackground": "#F6F0DE", "selectionInactiveForeground": "#002b36", "sortIconColor": "#586e75", "stripeColor": "#eee8d5" @@ -670,7 +713,7 @@ "cellBorder": "4,0,4,0", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "focusCellBackground": "#d1cbb8", + "focusCellBackground": "#F6F0DE", "focusCellForeground": "#002b36", "height": 25, "separatorColor": "#F6F0DE" @@ -683,7 +726,7 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "TextField": { @@ -691,7 +734,7 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "TextPane": { @@ -699,19 +742,19 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "TitlePane": { "background": "#eee8d5", - "Button.hoverBackground": "#d1cbb8", + "Button.hoverBackground": "#F6F0DE", "inactiveBackground": "#fdf6e3", "infoForeground": "#93a1a1", "inactiveInfoForeground": "#93a1a1" }, "TitledBorder.titleColor": "#586e75", "ToggleButton": { - "borderColor": "#d8d4c4", + "borderColor": "#FEFBF1", "buttonColor": "#586e75", "disabledText": "#C9CCC3", "foreground": "#586e75", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#fdf6e3", "Actions.infoForeground": "#93a1a1", - "background": "#fdf6e3", - "borderColor": "#d1cbb8", + "background": "#EDE8D4", + "borderColor": "#edead9", "foreground": "#586e75", "infoForeground": "#93a1a1", "separatorColor": "#edead9", @@ -738,7 +781,7 @@ }, "ToolWindow": { "Button": { - "hoverBackground": "#d1cbb8", + "hoverBackground": "#F6F0DE", "selectedForeground": "#002b36", "selectedBackground": "#eee8d5" }, @@ -751,50 +794,93 @@ "background": "#fdf6e3" }, "HeaderTab": { - "hoverBackground": "#d1cbb8", + "borderColor": "#F6F0DE", + "hoverBackground": "#F6F0DE", "hoverInactiveBackground": "#F6F0DE", "inactiveUnderlineColor": "#d33682", "selectedBackground": "#eee8d5", "selectedInactiveBackground": "#eee8d5", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8", - "underlinedTabInactiveBackground": "#F6F0DE" + "underlinedTabBackground": "#F6F0DE", + "underlinedTabInactiveBackground": "#F6F0DE", + "underlinedTabForeground": "#002b36", + "underlinedTabInactiveForeground": "#586e75" } }, "Tree": { "background": "#eee8d5", "foreground": "#93a1a1", "hash": "#edead9", + "hoverBackground": "#93a1a170", + "hoverInactiveBackground": "#F6F0DE", "modifiedItemForeground": "#d33682", "rowHeight": 28, - "selectionBackground": "#e8dcb6b0", + "selectionBackground": "#93a1a170", "selectionForeground": "#002b36", "selectionInactiveForeground": "#002b36", - "selectionInactiveBackground": "#e8dcb6b0", + "selectionInactiveBackground": "#93a1a170", "textBackground": "#eee8d5" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#edead9", - "ColorPicker.background": "#fdf6e3", - "ColorPicker.foreground": "#586e75", - "Component.borderColor": "#edead9", - "Component.background": "#fdf6e3", - "Component.foreground": "#586e75", - "Connector.borderColor": "#edead9", - "Connector.hoverBorderColor": "#d1cbb8", + "Canvas.background": "#eee8d5", + "ColorPicker": { + "background": "#fdf6e3", + "foreground": "#586e75" + }, + "Component": { + "borderColor": "#edead9", + "background": "#fdf6e3", + "foreground": "#586e75", + "hoverBorderColor": "#F6F0DE" + }, + "Connector": { + "borderColor": "#edead9", + "hoverBorderColor": "#F6F0DE" + }, "Canvas.background": "#eee8d5", "highStroke.foreground": "#586e75", "Label.foreground": "#93a1a1", - "List.selectionBackground": "#e8dcb6b0", - "Panel.borderColor": "#edead9", - "Panel.background": "#fdf6e3", + "List.selectionBackground": "#93a1a170", + "motion": { + "borderColor": "#edead9", + "Component.foreground": "#586e75", + "ConstraintSetText.foreground": "#93a1a1", + "ConstraintSet.background": "#F6F0DE", + "CSPanel.SelectedFocusBackground": "#93a1a1", + "CSPanel.SelectedBackground": "#93a1a170", + "cs_FocusText.infoForeground": "#93a1a1", + "CursorTextColor.foreground": "#586e75", + "HoverColor.disabledBackground": "#C9CCC3", + "motionGraph.background": "#fdf6e3", + "Notification.background": "#EDE8D4", + "ourAvg.background": "#F6F0DE", + "ourCS.background": "#F6F0DE", + "ourCS_Border.borderColor": "#edead9", + "ourCS_TextColor.foreground": "#93a1a1", + "ourCS_SelectedFocusBackground.selectionForeground": "#002b36", + "ourCS_SelectedBackground.selectionInactiveBackground": "#F6F0DE", + "ourCS_SelectedBorder.pressedBorderColor": "#F6F0DE", + "ourML_BarColor.separatorColor": "#edead9", + "PrimaryPanel.background": "#eee8d5", + "SecondaryPanel.background": "#fdf6e3", + "SecondaryPanel.header.foreground": "#93a1a1", + "SecondaryPanel.header.background": "#eee8d5", + "timeLine.disabledBorderColor": "#edead9" + }, + "Panel": { + "borderColor": "#edead9", + "background": "#fdf6e3" + }, "percent.foreground": "#586e75", - "Placeholder.background": "#fdf6e3", - "Placeholder.borderColor": "#edead9", - "Placeholder.foreground": "#586e75", - "Placeholder.selectedForeground": "#002b36", + "Placeholder": { + "background": "#fdf6e3", + "borderColor": "#edead9", + "foreground": "#586e75", + "selectedForeground": "#002b36" + }, "Preview.background": "#fdf6e3", "stroke.acceleratorForeground": "#93a1a1" }, @@ -809,7 +895,7 @@ "selectedBranchBackground": "#fdf6e3" }, "GitCommits": { - "graphColor": "#d1cbb8" + "graphColor": "#F6F0DE" }, "GitLog": { "localBranchIconColor": "#d33682", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#93a1a1", - "Commit.currentBranchBackground": "#F6F0DE" + "Commit.currentBranchBackground": "#F6F0DE", + "Commit.hoveredBackground": "#93a1a170" }, "RefLabel": { "foreground": "#002b36", - "backgroundBase": "#d1cbb8" + "backgroundBase": "#F6F0DE" } }, "Viewport": { @@ -840,18 +927,24 @@ "foreground": "#586e75" }, "WelcomeScreen": { + "AssociatedComponent.background": "#fdf6e3", "background": "#fdf6e3", "borderColor": "#fdf6e3", "captionBackground": "#eee8d5", "captionForeground": "#586e75", + "Details.background": "#fdf6e3", "footerBackground": "#eee8d5", "footerForeground": "#586e75", "headerBackground": "#fdf6e3", "headerForeground": "#586e75", + "List.background": "#eee8d5", "separatorColor": "#edead9", + "SidePanel.background": "#F6F0DE", "Projects": { + "actions.background": "#eee8d5", + "actions.selectionBackground": "#F6F0DE", "background": "#F6F0DE", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionInactiveBackground": "#F6F0DE" } }, diff --git a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light.theme.json b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light.theme.json index af9f9ec6..a260b958 100644 --- a/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light.theme.json +++ b/flatlaf-intellij-themes/src/main/resources/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/Solarized Light.theme.json @@ -3,6 +3,12 @@ "dark": false, "author": "Mallowigi", "editorScheme": "/colors/Solarized Light.xml", + "emptyFrameBackground": { + "anchor": "center", + "image": "/walls/solarlight.svg", + "fill": "scale", + "transparency": 50 + }, "ui": { "*": { "acceleratorSelectionForeground": "#93a1a1", @@ -11,13 +17,13 @@ "disabledBackground": "#E3DCC9", "disabledForeground": "#C9CCC3", "disabledText": "#C9CCC3", - "focusColor": "#d1cbb8", + "focusColor": "#F6F0DE", "focusedBorderColor": "#d33682", "foreground": "#586e75", "inactiveBackground": "#E3DCC9", "inactiveForeground": "#93a1a1", "infoForeground": "#93a1a1", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionBackgroundInactive": "#F6F0DE", "selectionForeground": "#002b36", "selectionInactiveBackground": "#F6F0DE", @@ -27,13 +33,13 @@ "ActionButton": { "hoverBackground": "#d3368250", "hoverBorderColor": "#d3368250", - "hoverSeparatorColor": "#d8d4c4", + "hoverSeparatorColor": "#FEFBF1", "focusedBorderColor": "#d3368250", "pressedBackground": "#d3368250", "pressedBorderColor": "#d3368250" }, "Autocomplete": { - "selectionBackground": "#e8dcb6" + "selectionBackground": "#93a1a1" }, "Borders.ContrastBorderColor": "#fdf6e3", "Borders.color": "#edead9", @@ -41,38 +47,41 @@ "arc": 0, "background": "#fdf6e3", "default": { - "endBackground": "#d1cbb8", - "endBorderColor": "#d1cbb8", + "endBackground": "#F6F0DE", + "endBorderColor": "#F6F0DE", "foreground": "#002b36", "focusColor": "#d33682", "focusedBorderColor": "#d33682", - "shadowColor": "#d1cbb8", - "startBackground": "#d1cbb8", - "startBorderColor": "#d1cbb8" + "shadowColor": "#F6F0DE", + "startBackground": "#F6F0DE", + "startBorderColor": "#F6F0DE" }, - "disabledBorderColor": "#d8d4c4", + "disabledBorderColor": "#FEFBF1", "disabledText": "#C9CCC3", - "endBackground": "#d8d4c4", - "endBorderColor": "#d8d4c4", - "focus": "#d1cbb8", + "endBackground": "#FEFBF1", + "endBorderColor": "#FEFBF1", + "focus": "#F6F0DE", "focusedBorderColor": "#d33682", "foreground": "#93a1a1", "highlight": "#002b36", - "mt.background": "#d8d4c4", + "mt.background": "#FEFBF1", "mt.foreground": "#93a1a1", "mt.selectedForeground": "#002b36", - "mt.selection.color1": "#d1cbb8", - "mt.selection.color2": "#d1cbb8", - "startBackground": "#d8d4c4", - "startBorderColor": "#d8d4c4", - "shadowColor": "#d8d4c4", + "mt.selection.color1": "#F6F0DE", + "mt.selection.color2": "#F6F0DE", + "startBackground": "#FEFBF1", + "startBorderColor": "#FEFBF1", + "shadowColor": "#FEFBF1", "shadowWidth": 0 }, "Canvas": { "Tooltip.borderColor": "#edead9", "Tooltip.background": "#EDE8D4" }, - "Content.background": "#eee8d5", + "Content": { + "background": "#eee8d5", + "selectionBackground": "#93a1a1" + }, "CheckBox": { "background": "#fdf6e3", "disabledText": "#C9CCC3", @@ -86,30 +95,39 @@ "disabledBackground": "#fdf6e3", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, + "CodeWithMe": { + "Avatar.foreground": "#586e75", + "AccessEnabled": { + "accessDot": "#d33682", + "dropdownBorder": "#F6F0DE", + "pillBackground": "$second" + } + }, "ColorChooser": { "background": "#fdf6e3", "foreground": "#586e75", "swatchesDefaultRecentColor": "#586e75" }, - "ComboBoxButton.background": "#d8d4c4", + "ComboBoxButton.background": "#FEFBF1", "ComboBox": { "ArrowButton": { - "background": "#d8d4c4", + "background": "#FEFBF1", "disabledIconColor": "#C9CCC3", "iconColor": "#586e75", "nonEditableBackground": "#fdf6e3" }, "background": "#fdf6e3", - "buttonBackground": "#d8d4c4", + "buttonBackground": "#FEFBF1", + "darcula.hoveredArrowButtonForeground": "#d33682", "disabledForeground": "#C9CCC3", "foreground": "#586e75", "modifiedItemForeground": "#d33682", "nonEditableBackground": "#F6F0DE", "padding": "5,5,5,5", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "ComboPopup.border": "#edead9", @@ -123,15 +141,15 @@ "selectedGrayedForeground": "#002b36", "selectionGrayForeground": "#002b36", "selectionInactiveInfoForeground": "#93a1a1", - "selectionInactiveBackground": "#e8dcb650", - "selectionBackground": "#e8dcb680", + "selectionInactiveBackground": "#93a1a150", + "selectionBackground": "#93a1a180", "selectionForeground": "#002b36", "selectionInfoForeground": "#002b36" }, "Component": { "arc": 4, - "borderColor": "#d1cbb8", - "disabledBorderColor": "#d8d4c4", + "borderColor": "#F6F0DE", + "disabledBorderColor": "#FEFBF1", "focusColor": "#d33682", "focusedBorderColor": "#d33682", "hoverIconColor": "#d33682", @@ -156,23 +174,25 @@ } }, "DebuggerTabs": { - "selectedBackground": "#d1cbb8", - "underlinedTabBackground": "#d1cbb8" + "selectedBackground": "#F6F0DE", + "underlinedTabBackground": "#F6F0DE" }, "DebuggerPopup": { - "borderColor": "#d1cbb8" + "borderColor": "#F6F0DE" }, "DefaultTabs": { "background": "#fdf6e3", "borderColor": "#fdf6e3", - "hoverBackground": "#d1cbb8", + "hoverBackground": "#F6F0DE", "hoverColor": "#fdf6e3", - "hoverMaskColor": "#d1cbb8", - "inactiveColoredFileBackground": "#d8d4c4", - "inactiveUnderlineColor": "#C9CCC3", + "hoverMaskColor": "#F6F0DE", + "inactiveColoredTabBackground": "#fdf6e3", + "inactiveColoredFileBackground": "#FEFBF1", + "inactiveUnderlineColor": "#d33682", "inactiveMaskColor": "#fdf6e3", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8" + "underlinedTabBackground": "#F6F0DE", + "underlinedTabForeground": "#002b36" }, "Desktop.background": "#fdf6e3", "DialogWrapper.southPanelBackground": "#fdf6e3", @@ -193,29 +213,31 @@ "foreground": "#586e75", "inactiveBackground": "#fdf6e3", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, "EditorTabs": { "borderColor": "#F6F0DE", - "hoverColor": "#d1cbb8", - "hoverMaskColor": "#d1cbb8", + "hoverBackground": "#F6F0DE", + "hoverColor": "#F6F0DE", + "hoverMaskColor": "#F6F0DE", "inactiveMaskColor": "#fdf6e3", - "inactiveColoredFileBackground": "#fdf6e32", + "inactiveColoredFileBackground": "#fdf6e3", "inactiveUnderlineColor": "#C9CCC3", "selectedForeground": "#586e75", - "selectedBackground": "#d1cbb8", + "selectedBackground": "#F6F0DE", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8" + "underlinedTabBackground": "#F6F0DE", + "underlinedTabForeground": "#002b36" }, "EditorGroupsTabs": { "background": "#fdf6e3", "borderColor": "#F6F0DE", - "hoverBackground": "#d1cbb8", - "hoverColor": "#d1cbb8", + "hoverBackground": "#F6F0DE", + "hoverColor": "#F6F0DE", "inactiveUnderlineColor": "#d33682", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8", + "underlinedTabBackground": "#F6F0DE", "underlinedTabForeground": "#586e75" }, "FileColor": { @@ -241,17 +263,18 @@ "background": "#fdf6e3", "caretForeground": "#d33682", "foreground": "#586e75", - "inactiveBackground": "#d8d4c4", + "inactiveBackground": "#FEFBF1", "inactiveForeground": "#C9CCC3", "selectionForeground": "#002b36", - "selectionBackground": "#d1cbb8" + "selectionBackground": "#F6F0DE" }, + "GotItTooltip.borderColor": "#EDE8D4", "Group": { "disabledSeparatorColor": "#edead9", "separatorColor": "#edead9" }, "GutterTooltip": { - "infoForeground": "#586e75", + "infoForeground": "#93a1a1", "lineSeparatorColor": "#fdf6e3" }, "HeaderColor": { @@ -288,7 +311,8 @@ "disabledText": "#C9CCC3", "foreground": "#586e75", "infoForeground": "#93a1a1", - "selectedForeground": "#002b36" + "selectedForeground": "#002b36", + "selectedDisabledForeground": "#586e75" }, "Link": { "activeForeground": "#d33682", @@ -301,17 +325,19 @@ "List": { "background": "#F6F0DE", "foreground": "#586e75", - "selectionBackground": "#e8dcb650", + "hoverBackground": "#93a1a170", + "hoverInactiveBackground": "#F6F0DE", + "selectionBackground": "#93a1a150", "selectionForeground": "#002b36", "selectionInactiveForeground": "#002b36", - "selectionInactiveBackground": "#e8dcb6b0" + "selectionInactiveBackground": "#93a1a170" }, "material": { "background": "#fdf6e3", "branchColor": "#586e75", "contrast": "#eee8d5", "foreground": "#586e75", - "mergeCommits": "#d8d4c4", + "mergeCommits": "#FEFBF1", "primaryColor": "#93a1a1", "selectionForeground": "#002b36", "tab.backgroundColor": "#fdf6e3", @@ -320,8 +346,8 @@ }, "MemoryIndicator": { "allocatedBackground": "#F6F0DE", - "usedColor": "#d1cbb8", - "usedBackground": "#d1cbb8" + "usedColor": "#F6F0DE", + "usedBackground": "#F6F0DE" }, "Menu": { "acceleratorForeground": "#93a1a1", @@ -332,7 +358,7 @@ "disabledBackground": "#F6F0DE", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36", "separatorColor": "#edead9" }, @@ -343,7 +369,7 @@ "disabledForeground": "#C9CCC3", "foreground": "#586e75", "highlight": "#fdf6e3", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36", "shadow": "#fdf6e3" }, @@ -355,7 +381,7 @@ "disabledBackground": "#fdf6e3", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, "NavBar": { @@ -378,9 +404,9 @@ "errorBorderColor": "#EDE8D4", "foreground": "#586e75", "MoreButton": { - "background": "#d8d4c4", + "background": "#FEFBF1", "foreground": "#586e75", - "innerBorderColor": "#d8d4c4" + "innerBorderColor": "#FEFBF1" }, "ToolWindow": { "errorBackground": "#EDE8D4", @@ -398,7 +424,7 @@ "messageForeground": "#586e75" }, "Outline": { - "color": "#d8d4c4", + "color": "#FEFBF1", "focusedColor": "#d33682", "disabledColor": "#C9CCC3" }, @@ -408,13 +434,13 @@ }, "ParameterInfo": { "background": "#F6F0DE", - "borderColor": "#d1cbb8", - "currentOverloadBackground": "#d1cbb8", + "borderColor": "#F6F0DE", + "currentOverloadBackground": "#F6F0DE", "currentParameterForeground": "#d33682", "disabledForeground": "#C9CCC3", "foreground": "#586e75", "infoForeground": "#93a1a1", - "lineSeparatorColor": "#d1cbb8" + "lineSeparatorColor": "#F6F0DE" }, "PasswordField": { "background": "#fdf6e3", @@ -422,28 +448,29 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "Plugins": { "background": "#fdf6e3", "disabledForeground": "#C9CCC3", - "eapTagBackground": "#d1cbb8", - "lightSelectionBackground": "#e8dcb6", - "paidTagBackground": "#d1cbb8", - "selectionBackground": "#e8dcb6", + "eapTagBackground": "#F6F0DE", + "hoverBackground": "#93a1a170", + "lightSelectionBackground": "#F6F0DE", + "paidTagBackground": "#F6F0DE", + "selectionBackground": "#93a1a1", "tagForeground": "#d33682", - "tagBackground": "#d1cbb8", - "trialTagBackground": "#d1cbb8", + "tagBackground": "#F6F0DE", + "trialTagBackground": "#F6F0DE", "Button": { - "installBackground": "#d8d4c4", - "installBorderColor": "#d8d4c4", + "installBackground": "#FEFBF1", + "installBorderColor": "#FEFBF1", "installForeground": "#586e75", - "installFocusedBackground": "#d1cbb8", + "installFocusedBackground": "#F6F0DE", "installFillForeground": "#C9CCC3", - "installFillBackground": "#d8d4c4", - "updateBackground": "#d8d4c4", - "updateBorderColor": "#d8d4c4", + "installFillBackground": "#FEFBF1", + "updateBackground": "#d33682", + "updateBorderColor": "#FEFBF1", "updateForeground": "#586e75" }, "SearchField": { @@ -455,9 +482,9 @@ "foreground": "#586e75" }, "Tab": { - "hoverBackground": "#d1cbb8", + "hoverBackground": "#F6F0DE", "selectedForeground": "#002b36", - "selectedBackground": "#d1cbb8" + "selectedBackground": "#F6F0DE" } }, "Popup": { @@ -496,8 +523,8 @@ "indeterminateEndColor": "#d33682", "indeterminateStartColor": "#d33682", "progressColor": "#d33682", - "selectionBackground": "#d1cbb8", - "trackColor": "#d1cbb8" + "selectionBackground": "#F6F0DE", + "trackColor": "#F6F0DE" }, "PsiViewer": { "referenceHighlightColor": "#d33682" @@ -514,9 +541,10 @@ "disabledBackground": "#fdf6e3", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionForeground": "#002b36" }, + "ScreenView.borderColor": "#edead9", "ScrollBar": { "background": "#fdf6e3", "hoverThumbBorderColor": "#d33682", @@ -538,7 +566,7 @@ "trackColor": "#fdf6e330" } }, - "thumb": "#d1cbb8", + "thumb": "#F6F0DE", "thumbBorderColor": "#d3368270", "thumbColor": "#d3368270", "trackColor": "#fdf6e330", @@ -571,14 +599,23 @@ "Tab": { "active.foreground": "#002b36", "selectedForeground": "#002b36", - "selectedBackground": "#d1cbb8" + "selectedBackground": "#F6F0DE" } }, "SearchMatch": { "endBackground": "#d33682", - "startBackground": "#d33682" + "startBackground": "#d33682", + "endColor": "#d33682", + "startColor": "#d33682" }, "SearchField.errorBackground": "#EDE8D4", + "SearchOption": { + "selectedBackground": "#F6F0DE" + }, + "SearchResults": { + "Ordinal.File.Foreground": "#93a1a1", + "Repeated.File.Foreground": "#586e75" + }, "Separator": { "background": "#F6F0DE", "foreground": "#F6F0DE", @@ -594,12 +631,12 @@ "foreground": "#586e75", "majorTickLength": 6, "tickColor": "#F6F0DE", - "trackColor": "#d1cbb8", + "trackColor": "#F6F0DE", "trackWidth": 7, "thumb": "#d33682" }, "SpeedSearch": { - "background": "#d1cbb8", + "background": "#F6F0DE", "borderColor": "#edead9", "foreground": "#586e75", "errorForeground": "#586e75" @@ -616,21 +653,23 @@ }, "SplitPaneDivider.draggingColor": "#F6F0DE", "StatusBar": { - "borderColor": "#fdf6e3" + "borderColor": "#fdf6e3", + "hoverBackground": "#F6F0DE", + "LightEditBackground": "#F6F0DE" }, "TabbedPane": { "background": "#fdf6e3", - "contentAreaColor": "#d1cbb8", + "contentAreaColor": "#F6F0DE", "contentBorderInsets": "3,1,1,1", "darkShadow": "#edead9", "disabledForeground": "#C9CCC3", "disabledUnderlineColor": "#C9CCC3", - "focus": "#d1cbb8", - "focusColor": "#d1cbb8", + "focus": "#F6F0DE", + "focusColor": "#F6F0DE", "fontSizeOffset": 0, "foreground": "#586e75", "highlight": "#edead9", - "hoverColor": "#d1cbb8", + "hoverColor": "#F6F0DE", "labelShift": 0, "selectedForeground": "#002b36", "selectedLabelShift": 0, @@ -643,22 +682,26 @@ }, "TabbedPane.mt.tab.background": "#fdf6e3", "Table": { + "alternativeRowBackground": "#eee8d5", "background": "#fdf6e3", "cellNoFocusBorder": "10,5,10,5", "focusCellHighlightBorder": "10,5,10,5", + "disabledForeground": "#C9CCC3", "dropLineColor": "#d33682", "dropLineShortColor": "#d33682", - "focusCellBackground": "#d1cbb8", + "focusCellBackground": "#F6F0DE", "focusCellForeground": "#002b36", "foreground": "#586e75", "gridColor": "#fdf6e3", - "highlightOuter": "#d1cbb8", + "highlightOuter": "#F6F0DE", + "hoverBackground": "#93a1a170", + "hoverInactiveBackground": "#F6F0DE", "lightSelectionForeground": "#002b36", "lightSelectionInactiveForeground": "#93a1a1", "lightSelectionInactiveBackground": "#F6F0DE", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36", - "selectionInactiveBackground": "#d1cbb8", + "selectionInactiveBackground": "#F6F0DE", "selectionInactiveForeground": "#002b36", "sortIconColor": "#586e75", "stripeColor": "#eee8d5" @@ -670,7 +713,7 @@ "cellBorder": "4,0,4,0", "disabledForeground": "#C9CCC3", "foreground": "#586e75", - "focusCellBackground": "#d1cbb8", + "focusCellBackground": "#F6F0DE", "focusCellForeground": "#002b36", "height": 25, "separatorColor": "#F6F0DE" @@ -683,7 +726,7 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "TextField": { @@ -691,7 +734,7 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "TextPane": { @@ -699,19 +742,19 @@ "caretForeground": "#d33682", "foreground": "#586e75", "inactiveForeground": "#C9CCC3", - "selectionBackground": "#d1cbb8", + "selectionBackground": "#F6F0DE", "selectionForeground": "#002b36" }, "TitlePane": { "background": "#eee8d5", - "Button.hoverBackground": "#d1cbb8", + "Button.hoverBackground": "#F6F0DE", "inactiveBackground": "#fdf6e3", "infoForeground": "#93a1a1", "inactiveInfoForeground": "#93a1a1" }, "TitledBorder.titleColor": "#586e75", "ToggleButton": { - "borderColor": "#d8d4c4", + "borderColor": "#FEFBF1", "buttonColor": "#586e75", "disabledText": "#C9CCC3", "foreground": "#586e75", @@ -729,8 +772,8 @@ "ToolTip": { "Actions.background": "#fdf6e3", "Actions.infoForeground": "#93a1a1", - "background": "#fdf6e3", - "borderColor": "#d1cbb8", + "background": "#EDE8D4", + "borderColor": "#edead9", "foreground": "#586e75", "infoForeground": "#93a1a1", "separatorColor": "#edead9", @@ -738,7 +781,7 @@ }, "ToolWindow": { "Button": { - "hoverBackground": "#d1cbb8", + "hoverBackground": "#F6F0DE", "selectedForeground": "#002b36", "selectedBackground": "#eee8d5" }, @@ -751,50 +794,93 @@ "background": "#fdf6e3" }, "HeaderTab": { - "hoverBackground": "#d1cbb8", + "borderColor": "#F6F0DE", + "hoverBackground": "#F6F0DE", "hoverInactiveBackground": "#F6F0DE", "inactiveUnderlineColor": "#d33682", "selectedBackground": "#eee8d5", "selectedInactiveBackground": "#eee8d5", "underlineColor": "#d33682", - "underlinedTabBackground": "#d1cbb8", - "underlinedTabInactiveBackground": "#F6F0DE" + "underlinedTabBackground": "#F6F0DE", + "underlinedTabInactiveBackground": "#F6F0DE", + "underlinedTabForeground": "#002b36", + "underlinedTabInactiveForeground": "#586e75" } }, "Tree": { "background": "#fdf6e3", "foreground": "#93a1a1", "hash": "#edead9", + "hoverBackground": "#93a1a170", + "hoverInactiveBackground": "#F6F0DE", "modifiedItemForeground": "#d33682", "rowHeight": 28, - "selectionBackground": "#e8dcb6b0", + "selectionBackground": "#93a1a170", "selectionForeground": "#002b36", "selectionInactiveForeground": "#002b36", - "selectionInactiveBackground": "#e8dcb6b0", + "selectionInactiveBackground": "#93a1a170", "textBackground": "#fdf6e3" }, "Tree.leftChildIndent": 10, "Tree.rightChildIndent": 5, - "UiDesigner": { + "UIDesigner": { "Activity.borderColor": "#edead9", - "ColorPicker.background": "#fdf6e3", - "ColorPicker.foreground": "#586e75", - "Component.borderColor": "#edead9", - "Component.background": "#fdf6e3", - "Component.foreground": "#586e75", - "Connector.borderColor": "#edead9", - "Connector.hoverBorderColor": "#d1cbb8", + "Canvas.background": "#eee8d5", + "ColorPicker": { + "background": "#fdf6e3", + "foreground": "#586e75" + }, + "Component": { + "borderColor": "#edead9", + "background": "#fdf6e3", + "foreground": "#586e75", + "hoverBorderColor": "#F6F0DE" + }, + "Connector": { + "borderColor": "#edead9", + "hoverBorderColor": "#F6F0DE" + }, "Canvas.background": "#eee8d5", "highStroke.foreground": "#586e75", "Label.foreground": "#93a1a1", - "List.selectionBackground": "#e8dcb6b0", - "Panel.borderColor": "#edead9", - "Panel.background": "#fdf6e3", + "List.selectionBackground": "#93a1a170", + "motion": { + "borderColor": "#edead9", + "Component.foreground": "#586e75", + "ConstraintSetText.foreground": "#93a1a1", + "ConstraintSet.background": "#F6F0DE", + "CSPanel.SelectedFocusBackground": "#93a1a1", + "CSPanel.SelectedBackground": "#93a1a170", + "cs_FocusText.infoForeground": "#93a1a1", + "CursorTextColor.foreground": "#586e75", + "HoverColor.disabledBackground": "#C9CCC3", + "motionGraph.background": "#fdf6e3", + "Notification.background": "#EDE8D4", + "ourAvg.background": "#F6F0DE", + "ourCS.background": "#F6F0DE", + "ourCS_Border.borderColor": "#edead9", + "ourCS_TextColor.foreground": "#93a1a1", + "ourCS_SelectedFocusBackground.selectionForeground": "#002b36", + "ourCS_SelectedBackground.selectionInactiveBackground": "#F6F0DE", + "ourCS_SelectedBorder.pressedBorderColor": "#F6F0DE", + "ourML_BarColor.separatorColor": "#edead9", + "PrimaryPanel.background": "#eee8d5", + "SecondaryPanel.background": "#fdf6e3", + "SecondaryPanel.header.foreground": "#93a1a1", + "SecondaryPanel.header.background": "#eee8d5", + "timeLine.disabledBorderColor": "#edead9" + }, + "Panel": { + "borderColor": "#edead9", + "background": "#fdf6e3" + }, "percent.foreground": "#586e75", - "Placeholder.background": "#fdf6e3", - "Placeholder.borderColor": "#edead9", - "Placeholder.foreground": "#586e75", - "Placeholder.selectedForeground": "#002b36", + "Placeholder": { + "background": "#fdf6e3", + "borderColor": "#edead9", + "foreground": "#586e75", + "selectedForeground": "#002b36" + }, "Preview.background": "#fdf6e3", "stroke.acceleratorForeground": "#93a1a1" }, @@ -809,7 +895,7 @@ "selectedBranchBackground": "#fdf6e3" }, "GitCommits": { - "graphColor": "#d1cbb8" + "graphColor": "#F6F0DE" }, "GitLog": { "localBranchIconColor": "#d33682", @@ -828,11 +914,12 @@ }, "Log": { "Commit.unmatchedForeground": "#93a1a1", - "Commit.currentBranchBackground": "#F6F0DE" + "Commit.currentBranchBackground": "#F6F0DE", + "Commit.hoveredBackground": "#93a1a170" }, "RefLabel": { "foreground": "#002b36", - "backgroundBase": "#d1cbb8" + "backgroundBase": "#F6F0DE" } }, "Viewport": { @@ -840,18 +927,24 @@ "foreground": "#586e75" }, "WelcomeScreen": { + "AssociatedComponent.background": "#fdf6e3", "background": "#fdf6e3", "borderColor": "#fdf6e3", "captionBackground": "#eee8d5", "captionForeground": "#586e75", + "Details.background": "#fdf6e3", "footerBackground": "#eee8d5", "footerForeground": "#586e75", "headerBackground": "#fdf6e3", "headerForeground": "#586e75", + "List.background": "#eee8d5", "separatorColor": "#edead9", + "SidePanel.background": "#F6F0DE", "Projects": { + "actions.background": "#eee8d5", + "actions.selectionBackground": "#F6F0DE", "background": "#F6F0DE", - "selectionBackground": "#e8dcb6", + "selectionBackground": "#93a1a1", "selectionInactiveBackground": "#F6F0DE" } }, From 7d48bf06feb9d068be35ae55b15b76a4a3c50739 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 9 Jan 2021 23:46:56 +0100 Subject: [PATCH 121/178] Button and ToggleButton: Threat Unicode surrogate character pair as single character and make button square (issue #234) --- CHANGELOG.md | 2 ++ .../com/formdev/flatlaf/ui/FlatButtonUI.java | 5 ++- .../flatlaf/testing/FlatComponentsTest.java | 36 +++++++++++++------ .../flatlaf/testing/FlatComponentsTest.jfd | 33 +++++++++++------ 4 files changed, 55 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d12c0bb2..fd56f619 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ FlatLaf Change Log #### Fixed bugs +- Button and ToggleButton: Threat Unicode surrogate character pair as single + character and make button square. (issue #234) - Extras: Added missing export of package `com.formdev.flatlaf.extras.components` to Java 9 module descriptor. - JIDE Common Layer: Invoke `LookAndFeelFactory.installJideExtension()` when diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java index 07554acb..0c33f4f1 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java @@ -251,7 +251,10 @@ public class FlatButtonUI Icon icon = ((AbstractButton)c).getIcon(); String text = ((AbstractButton)c).getText(); return (icon != null && (text == null || text.isEmpty())) || - (icon == null && text != null && ("...".equals( text ) || text.length() == 1)); + (icon == null && text != null && + ("...".equals( text ) || + text.length() == 1 || + (text.length() == 2 && Character.isSurrogatePair( text.charAt( 0 ), text.charAt( 1 ) )))); } static final int TYPE_OTHER = -1; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index f677ffee..fb5aebe3 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -248,6 +248,7 @@ public class FlatComponentsTest JButton button14 = new JButton(); JButton button15 = new JButton(); JButton button16 = new JButton(); + JButton button24 = new JButton(); JButton button20 = new JButton(); JLabel toggleButtonLabel = new JLabel(); JToggleButton toggleButton1 = new JToggleButton(); @@ -262,6 +263,7 @@ public class FlatComponentsTest JToggleButton toggleButton12 = new JToggleButton(); JToggleButton toggleButton13 = new JToggleButton(); JToggleButton toggleButton14 = new JToggleButton(); + JToggleButton toggleButton21 = new JToggleButton(); JToggleButton toggleButton18 = new JToggleButton(); JLabel checkBoxLabel = new JLabel(); JCheckBox checkBox1 = new JCheckBox(); @@ -549,24 +551,28 @@ public class FlatComponentsTest //---- button13 ---- button13.setIcon(UIManager.getIcon("Tree.closedIcon")); - add(button13, "cell 5 1"); + add(button13, "cell 5 1 2 1"); //---- button14 ---- button14.setText("..."); - add(button14, "cell 5 1"); + add(button14, "cell 5 1 2 1"); //---- button15 ---- button15.setText("\u2026"); - add(button15, "cell 5 1"); + add(button15, "cell 5 1 2 1"); //---- button16 ---- button16.setText("#"); - add(button16, "cell 5 1"); + add(button16, "cell 5 1 2 1"); + + //---- button24 ---- + button24.setText("A"); + add(button24, "cell 5 1 2 1"); //---- button20 ---- button20.setText("Empty border"); button20.setBorder(BorderFactory.createEmptyBorder()); - add(button20, "cell 6 1"); + add(button20, "cell 5 1 2 1"); //---- toggleButtonLabel ---- toggleButtonLabel.setText("JToggleButton:"); @@ -618,27 +624,32 @@ public class FlatComponentsTest //---- toggleButton11 ---- toggleButton11.setIcon(UIManager.getIcon("Tree.closedIcon")); toggleButton11.setSelected(true); - add(toggleButton11, "cell 5 2"); + add(toggleButton11, "cell 5 2 2 1"); //---- toggleButton12 ---- toggleButton12.setText("..."); toggleButton12.setSelected(true); - add(toggleButton12, "cell 5 2"); + add(toggleButton12, "cell 5 2 2 1"); //---- toggleButton13 ---- toggleButton13.setText("\u2026"); toggleButton13.setSelected(true); - add(toggleButton13, "cell 5 2"); + add(toggleButton13, "cell 5 2 2 1"); //---- toggleButton14 ---- toggleButton14.setText("#"); toggleButton14.setSelected(true); - add(toggleButton14, "cell 5 2"); + add(toggleButton14, "cell 5 2 2 1"); + + //---- toggleButton21 ---- + toggleButton21.setText("A"); + toggleButton21.setSelected(true); + add(toggleButton21, "cell 5 2 2 1"); //---- toggleButton18 ---- toggleButton18.setText("Empty border"); toggleButton18.setBorder(BorderFactory.createEmptyBorder()); - add(toggleButton18, "cell 6 2"); + add(toggleButton18, "cell 5 2 2 1"); //---- checkBoxLabel ---- checkBoxLabel.setText("JCheckBox"); @@ -1579,6 +1590,11 @@ public class FlatComponentsTest buttonGroup1.add(magentaCyanOutlineRadioButton); // JFormDesigner - End of component initialization //GEN-END:initComponents + // Unicode surrogate character pair "script capital A" + // https://www.compart.com/en/unicode/U+1D49C + button24.setText("\uD835\uDC9C"); + toggleButton21.setText("\uD835\uDC9C"); + // BasicComboBoxRenderer customRenderer = new BasicComboBoxRenderer(); // customRenderer.setBorder( new LineBorder( Color.red ) ); // comboBox1.setRenderer( customRenderer ); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index d709f036..4188313f 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -123,32 +123,38 @@ new FormModel { name: "button13" "icon": &SwingIcon0 new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 1" + "value": "cell 5 1 2 1" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "button14" "text": "..." }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 1" + "value": "cell 5 1 2 1" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "button15" "text": "…" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 1" + "value": "cell 5 1 2 1" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "button16" "text": "#" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 1" + "value": "cell 5 1 2 1" + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "button24" + "text": "A" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 1 2 1" } ) add( new FormComponent( "javax.swing.JButton" ) { name: "button20" "text": "Empty border" "border": &EmptyBorder0 new javax.swing.border.EmptyBorder( 0, 0, 0, 0 ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 6 1" + "value": "cell 5 1 2 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "toggleButtonLabel" @@ -220,35 +226,42 @@ new FormModel { "icon": #SwingIcon0 "selected": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 2" + "value": "cell 5 2 2 1" } ) add( new FormComponent( "javax.swing.JToggleButton" ) { name: "toggleButton12" "text": "..." "selected": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 2" + "value": "cell 5 2 2 1" } ) add( new FormComponent( "javax.swing.JToggleButton" ) { name: "toggleButton13" "text": "…" "selected": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 2" + "value": "cell 5 2 2 1" } ) add( new FormComponent( "javax.swing.JToggleButton" ) { name: "toggleButton14" "text": "#" "selected": true }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 2" + "value": "cell 5 2 2 1" + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "toggleButton21" + "text": "A" + "selected": true + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 2 2 1" } ) add( new FormComponent( "javax.swing.JToggleButton" ) { name: "toggleButton18" "text": "Empty border" "border": #EmptyBorder0 }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 6 2" + "value": "cell 5 2 2 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "checkBoxLabel" From 14222e40ad49fd1b387e117a95534230f27aa177 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 10 Jan 2021 18:28:30 +0100 Subject: [PATCH 122/178] TabbedPane: fixed `IndexOutOfBoundsException` when using tooltip text on close buttons and closing last/rightmost tab (issue #235) --- CHANGELOG.md | 2 ++ .../com/formdev/flatlaf/ui/FlatTabbedPaneUI.java | 7 +++++-- .../formdev/flatlaf/testing/FlatContainerTest.java | 14 ++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd56f619..46f49ab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ FlatLaf Change Log - Button and ToggleButton: Threat Unicode surrogate character pair as single character and make button square. (issue #234) +- TabbedPane: Fixed `IndexOutOfBoundsException` when using tooltip text on close + buttons and closing last/rightmost tab. (issue #235) - Extras: Added missing export of package `com.formdev.flatlaf.extras.components` to Java 9 module descriptor. - JIDE Common Layer: Invoke `LookAndFeelFactory.installJideExtension()` when diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java index cf4bcc69..81502f75 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java @@ -2109,8 +2109,10 @@ public class FlatTabbedPaneUI public void mouseReleased( MouseEvent e ) { if( isPressedTabClose() ) { updateRollover( e ); - if( pressedTabIndex >= 0 && pressedTabIndex == getRolloverTab() ) + if( pressedTabIndex >= 0 && pressedTabIndex == getRolloverTab() ) { + restoreTabToolTip(); closeTab( pressedTabIndex ); + } } else mouseDelegate.mouseReleased( e ); @@ -2188,7 +2190,8 @@ public class FlatTabbedPaneUI if( lastTipTabIndex < 0 ) return; - tabPane.setToolTipTextAt( lastTipTabIndex, lastTip ); + if( lastTipTabIndex < tabPane.getTabCount() ) + tabPane.setToolTipTextAt( lastTipTabIndex, lastTip ); lastTip = null; lastTipTabIndex = -1; } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java index bf32a30b..962659af 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatContainerTest.java @@ -105,11 +105,11 @@ public class FlatContainerTest } private void tabCountChanged() { - for( JTabbedPane tabbedPane : allTabbedPanes ) + for( FlatTabbedPane tabbedPane : allTabbedPanes ) tabCountChanged( tabbedPane ); } - private void tabCountChanged( JTabbedPane tabbedPane ) { + private void tabCountChanged( FlatTabbedPane tabbedPane ) { int oldTabCount = tabbedPane.getTabCount(); int newTabCount = (Integer) tabCountSpinner.getValue(); @@ -126,7 +126,7 @@ public class FlatContainerTest setTabIcons( tabbedPane ); } - private void addTab( JTabbedPane tabbedPane ) { + private void addTab( FlatTabbedPane tabbedPane ) { switch( tabbedPane.getTabCount() ) { case 0: tabbedPane.addTab( "Tab 1", null, new Panel1(), "First tab." ); @@ -136,12 +136,14 @@ public class FlatContainerTest JComponent tab2 = new Panel2(); tab2.setBorder( new LineBorder( Color.magenta ) ); tabbedPane.addTab( "Second Tab", null, tab2, "This is the second tab." ); + tabbedPane.setTabCloseToolTipText( 1, "Close Second Tab" ); break; case 2: tabbedPane.addTab( "Disabled", createTab( "tab content 3" ) ); tabbedPane.setEnabledAt( 2, false ); tabbedPane.setToolTipTextAt( 2, "Disabled tab." ); + tabbedPane.setTabCloseToolTipText( 2, "Close Disabled tab" ); break; case 3: @@ -348,9 +350,13 @@ public class FlatContainerTest if( closable ) { for( FlatTabbedPane tabbedPane : allTabbedPanes ) { tabbedPane.setTabCloseCallback( (tabbedPane2, tabIndex) -> { + String tabTitle = tabbedPane2.getTitleAt( tabIndex ); AWTEvent e = EventQueue.getCurrentEvent(); int modifiers = (e instanceof MouseEvent) ? ((MouseEvent)e).getModifiers() : 0; - JOptionPane.showMessageDialog( this, "Closed tab '" + tabbedPane2.getTitleAt( tabIndex ) + "'." + + tabbedPane2.removeTabAt( tabIndex ); + + JOptionPane.showMessageDialog( this, "Closed tab '" + tabTitle + "'." + "\n\n(modifiers: " + MouseEvent.getMouseModifiersText( modifiers ) + ")", "Tab Closed", JOptionPane.PLAIN_MESSAGE ); } ); From a59f17fdb2e918e95e46e6673455707b573f2005 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 11 Jan 2021 14:00:14 +0100 Subject: [PATCH 123/178] UIDefaultsKeysDump: extend existing keys file (instead of replacing it) to allow manual adding of optional keys, which are not defined in UI defaults --- .../testing/uidefaults/UIDefaultsKeysDump.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsKeysDump.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsKeysDump.java index b0abaa38..93cc7147 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsKeysDump.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsKeysDump.java @@ -16,8 +16,10 @@ package com.formdev.flatlaf.testing.uidefaults; +import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; +import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; @@ -42,13 +44,24 @@ public class UIDefaultsKeysDump File keysFile = new File( "../flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt" ); + // load existing keys file HashSet keys = new HashSet<>(); + try( BufferedReader reader = new BufferedReader( new FileReader( keysFile ) ) ) { + String key; + while( (key = reader.readLine()) != null ) { + keys.add( key ); + } + } catch( IOException ex ) { + ex.printStackTrace(); + } + // collect keys used in Lafs collectKeys( FlatLightLaf.class.getName(), keys ); collectKeys( FlatDarkLaf.class.getName(), keys ); collectKeys( FlatIntelliJLaf.class.getName(), keys ); collectKeys( FlatDarculaLaf.class.getName(), keys ); + // write key file try( Writer fileWriter = new BufferedWriter( new FileWriter( keysFile ) ) ) { String[] sortedKeys = keys.toArray( new String[keys.size()] ); Arrays.sort( sortedKeys ); From 8f6af73541c10a6335aaf00453d69a8f199718a0 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 11 Jan 2021 18:54:07 +0100 Subject: [PATCH 124/178] CheckBox and RadioButton: - use `CheckBox.icon.selectedBackground` as base color for derived "selected" colors - use derived colors for `CheckBox.icon[filled].selectedHoverBackground` and `CheckBox.icon[filled].selectedPressedBackground` - removed unnecessary `CheckBox.icon.selectedFocusedBorderColor`from FlatDarkLaf.properties - added missing keys to FlatLafUIKeys.txt (preparation for #176) --- .../formdev/flatlaf/icons/FlatCheckBoxIcon.java | 14 ++++++++------ .../com/formdev/flatlaf/FlatDarkLaf.properties | 6 +++--- .../com/formdev/flatlaf/FlatLightLaf.properties | 4 ++-- .../dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt | 5 ++--- .../dumps/uidefaults/FlatLightLaf_1.8.0_202.txt | 4 ++-- .../flatlaf/themeeditor/FlatLafUIKeys.txt | 16 ++++++++++++++++ 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java index b728c675..67267b92 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java @@ -49,15 +49,16 @@ import com.formdev.flatlaf.ui.FlatUIUtils; * @uiDefault CheckBox.icon.disabledBorderColor Color * @uiDefault CheckBox.icon.disabledBackground Color * @uiDefault CheckBox.icon.disabledCheckmarkColor Color - * @uiDefault CheckBox.icon.focusedBorderColor Color + * @uiDefault CheckBox.icon.focusedBorderColor Color optional * @uiDefault CheckBox.icon.focusedBackground Color optional - * @uiDefault CheckBox.icon.selectedFocusedBorderColor Color optional - * @uiDefault CheckBox.icon.selectedFocusedBackground Color optional + * @uiDefault CheckBox.icon.selectedFocusedBorderColor Color optional; CheckBox.icon.focusedBorderColor is used if not specified + * @uiDefault CheckBox.icon.selectedFocusedBackground Color optional; CheckBox.icon.focusedBackground is used if not specified + * @uiDefault CheckBox.icon.selectedFocusedCheckmarkColor Color optional; CheckBox.icon.checkmarkColor is used if not specified * @uiDefault CheckBox.icon.hoverBorderColor Color optional * @uiDefault CheckBox.icon.hoverBackground Color optional - * @uiDefault CheckBox.icon.selectedHoverBackground Color optional + * @uiDefault CheckBox.icon.selectedHoverBackground Color optional; CheckBox.icon.hoverBackground is used if not specified * @uiDefault CheckBox.icon.pressedBackground Color optional - * @uiDefault CheckBox.icon.selectedPressedBackground Color optional + * @uiDefault CheckBox.icon.selectedPressedBackground Color optional; CheckBox.icon.pressedBackground is used if not specified * @uiDefault CheckBox.arc int * * @author Karl Tauber @@ -145,7 +146,8 @@ public class FlatCheckBoxIcon paintBorder( c, g ); // paint background - g.setColor( FlatUIUtils.deriveColor( getBackground( c, selected ), background ) ); + g.setColor( FlatUIUtils.deriveColor( getBackground( c, selected ), + selected ? selectedBackground : background ) ); paintBackground( c, g ); // paint checkmark diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index f405154e..5ca24cef 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -103,7 +103,6 @@ CheckBox.icon.disabledCheckmarkColor = #606060 # focused CheckBox.icon.focusedBorderColor = #466D94 -CheckBox.icon.selectedFocusedBorderColor = #466D94 # hover CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor @@ -112,15 +111,16 @@ CheckBox.icon.hoverBackground = lighten($CheckBox.icon.background,3%,derived) # pressed CheckBox.icon.pressedBackground = lighten($CheckBox.icon.background,6%,derived) + # used if CheckBox.icon.style = filled # enabled CheckBox.icon[filled].selectedBorderColor = $CheckBox.icon.checkmarkColor CheckBox.icon[filled].selectedBackground = $CheckBox.icon.checkmarkColor CheckBox.icon[filled].checkmarkColor = $CheckBox.icon.background # hover -CheckBox.icon[filled].selectedHoverBackground = darken($CheckBox.icon[filled].selectedBackground,3%) +CheckBox.icon[filled].selectedHoverBackground = darken($CheckBox.icon[filled].selectedBackground,3%,derived) # pressed -CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,6%) +CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,6%,derived) #---- ComboBox ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 8a23f71d..966dc2c1 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -125,9 +125,9 @@ CheckBox.icon[filled].selectedFocusedBorderColor = #ACCFF7 CheckBox.icon[filled].selectedFocusedBackground = $CheckBox.icon[filled].selectedBackground CheckBox.icon[filled].selectedFocusedCheckmarkColor = $CheckBox.icon.focusedBackground # hover -CheckBox.icon[filled].selectedHoverBackground = darken($CheckBox.icon[filled].selectedBackground,5%) +CheckBox.icon[filled].selectedHoverBackground = darken($CheckBox.icon[filled].selectedBackground,5%,derived) # pressed -CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,10%) +CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,10%,derived) #---- ComboBox ---- diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index c08e7ccb..b34e5ec7 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -132,14 +132,13 @@ CheckBox.icon.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.pressedBackground #52595a com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse) CheckBox.icon.selectedBackground #43494a javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.selectedBorderColor #6b6b6b javax.swing.plaf.ColorUIResource [UI] -CheckBox.icon.selectedFocusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon [lazy] 15,15 com.formdev.flatlaf.icons.FlatCheckBoxIcon [UI] CheckBox.iconTextGap 4 CheckBox.icon[filled].checkmarkColor #43494a javax.swing.plaf.ColorUIResource [UI] CheckBox.icon[filled].selectedBackground #a7a7a7 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon[filled].selectedBorderColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI] -CheckBox.icon[filled].selectedHoverBackground #9f9f9f javax.swing.plaf.ColorUIResource [UI] -CheckBox.icon[filled].selectedPressedBackground #989898 javax.swing.plaf.ColorUIResource [UI] +CheckBox.icon[filled].selectedHoverBackground #9f9f9f com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) +CheckBox.icon[filled].selectedPressedBackground #989898 com.formdev.flatlaf.util.DerivedColor [UI] darken(6% autoInverse) CheckBox.margin 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI] CheckBox.rollover true CheckBox.textIconGap 4 diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index e9f23f51..a9aeba92 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -142,8 +142,8 @@ CheckBox.icon[filled].selectedBorderColor #4b97d9 javax.swing.plaf.ColorUIRes CheckBox.icon[filled].selectedFocusedBackground #4f9ee3 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon[filled].selectedFocusedBorderColor #accff7 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon[filled].selectedFocusedCheckmarkColor #e3f1fa javax.swing.plaf.ColorUIResource [UI] -CheckBox.icon[filled].selectedHoverBackground #3992e0 javax.swing.plaf.ColorUIResource [UI] -CheckBox.icon[filled].selectedPressedBackground #2386dc javax.swing.plaf.ColorUIResource [UI] +CheckBox.icon[filled].selectedHoverBackground #3992e0 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse) +CheckBox.icon[filled].selectedPressedBackground #2386dc com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) CheckBox.margin 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI] CheckBox.rollover true CheckBox.textIconGap 4 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 0649af44..2f1ed206 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 @@ -70,6 +70,8 @@ CheckBox.icon.checkmarkColor CheckBox.icon.disabledBackground CheckBox.icon.disabledBorderColor CheckBox.icon.disabledCheckmarkColor +CheckBox.icon.focusColor +CheckBox.icon.focusWidth CheckBox.icon.focusedBackground CheckBox.icon.focusedBorderColor CheckBox.icon.hoverBackground @@ -77,10 +79,24 @@ CheckBox.icon.hoverBorderColor CheckBox.icon.pressedBackground CheckBox.icon.selectedBackground CheckBox.icon.selectedBorderColor +CheckBox.icon.selectedFocusedBackground CheckBox.icon.selectedFocusedBorderColor +CheckBox.icon.selectedFocusedCheckmarkColor +CheckBox.icon.selectedHoverBackground +CheckBox.icon.selectedPressedBackground CheckBox.icon.style CheckBox.iconTextGap +CheckBox.icon[filled].background +CheckBox.icon[filled].borderColor CheckBox.icon[filled].checkmarkColor +CheckBox.icon[filled].disabledBackground +CheckBox.icon[filled].disabledBorderColor +CheckBox.icon[filled].disabledCheckmarkColor +CheckBox.icon[filled].focusedBackground +CheckBox.icon[filled].focusedBorderColor +CheckBox.icon[filled].hoverBackground +CheckBox.icon[filled].hoverBorderColor +CheckBox.icon[filled].pressedBackground CheckBox.icon[filled].selectedBackground CheckBox.icon[filled].selectedBorderColor CheckBox.icon[filled].selectedFocusedBackground From ccbb26c176e405e5c402e94e25cf76ddb7b09fb1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 12 Jan 2021 14:15:44 +0100 Subject: [PATCH 125/178] IntelliJ Themes: added hover and pressed feedback to Button, CheckBox, RadioButton and ToggleButton (issue #176) --- CHANGELOG.md | 2 + .../com/formdev/flatlaf/IntelliJTheme.java | 54 +++++++++++++------ 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46f49ab0..64681551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ FlatLaf Change Log `FlatUIDefaultsInspector.createInspectorPanel()`. - Copy selected keys and values into clipboard via context menu. - IntelliJ Themes: + - Added hover and pressed feedback to Button, CheckBox, RadioButton and + ToggleButton. (issue #176) - Added "Material Theme UI Lite / Moonlight" theme. - Updated "Dracula", "Gradianto" and "Material Theme UI Lite" themes. 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 d943cad6..8eaf5e79 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -16,6 +16,7 @@ package com.formdev.flatlaf; +import java.awt.Color; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -156,6 +157,11 @@ public class IntelliJTheme defaults.put( "Button.disabledBackground", panelBackground ); defaults.put( "ToggleButton.disabledBackground", panelBackground ); + // fix Button borders + copyIfNotSet( defaults, "Button.focusedBorderColor", "Component.focusedBorderColor", uiKeys ); + defaults.put( "Button.hoverBorderColor", defaults.get( "Button.focusedBorderColor" ) ); + defaults.put( "HelpButton.hoverBorderColor", defaults.get( "Button.focusedBorderColor" ) ); + // IDEA uses a SVG icon for the help button, but paints the background with Button.startBackground and Button.endBackground Object helpButtonBackground = defaults.get( "Button.startBackground" ); Object helpButtonBorderColor = defaults.get( "Button.startBorderColor" ); @@ -381,7 +387,7 @@ public class IntelliJTheme } /** - * Because IDEA uses SVGs for check boxes and radio buttons the colors for + * Because IDEA uses SVGs for check boxes and radio buttons, the colors for * this two components are specified in "icons > ColorPalette". * FlatLaf uses vector icons and expects colors for the two components in UI defaults. */ @@ -453,28 +459,44 @@ public class IntelliJTheme } } - // remove hover and pressed colors + // update hover, pressed and focused colors if( checkboxModified ) { + // for non-filled checkbox/radiobutton used in dark themes defaults.remove( "CheckBox.icon.focusWidth" ); - defaults.remove( "CheckBox.icon.hoverBorderColor" ); - defaults.remove( "CheckBox.icon.focusedBackground" ); - defaults.remove( "CheckBox.icon.hoverBackground" ); - defaults.remove( "CheckBox.icon.pressedBackground" ); - defaults.remove( "CheckBox.icon.selectedFocusedBackground" ); - defaults.remove( "CheckBox.icon.selectedHoverBackground" ); - defaults.remove( "CheckBox.icon.selectedPressedBackground" ); + defaults.put( "CheckBox.icon.hoverBorderColor", defaults.get( "CheckBox.icon.focusedBorderColor" ) ); + // for filled checkbox/radiobutton used in light themes defaults.remove( "CheckBox.icon[filled].focusWidth" ); - defaults.remove( "CheckBox.icon[filled].hoverBorderColor" ); - defaults.remove( "CheckBox.icon[filled].focusedBackground" ); - defaults.remove( "CheckBox.icon[filled].hoverBackground" ); - defaults.remove( "CheckBox.icon[filled].pressedBackground" ); - defaults.remove( "CheckBox.icon[filled].selectedFocusedBackground" ); - defaults.remove( "CheckBox.icon[filled].selectedHoverBackground" ); - defaults.remove( "CheckBox.icon[filled].selectedPressedBackground" ); + defaults.put( "CheckBox.icon[filled].hoverBorderColor", defaults.get( "CheckBox.icon[filled].focusedBorderColor" ) ); + defaults.put( "CheckBox.icon[filled].selectedFocusedBackground", defaults.get( "CheckBox.icon[filled].selectedBackground" ) ); + + if( dark ) { + // IDEA Darcula checkBoxFocused.svg, checkBoxSelectedFocused.svg, + // radioFocused.svg and radioSelectedFocused.svg + // use opacity=".65" for the border + // --> add alpha to focused border colors + String[] focusedBorderColorKeys = new String[] { + "CheckBox.icon.focusedBorderColor", + "CheckBox.icon.selectedFocusedBorderColor", + "CheckBox.icon[filled].focusedBorderColor", + "CheckBox.icon[filled].selectedFocusedBorderColor", + }; + for( String key : focusedBorderColorKeys ) { + Color color = defaults.getColor( key ); + if( color != null ) { + defaults.put( key, new ColorUIResource( new Color( + (color.getRGB() & 0xffffff) | 0xa6000000, true ) ) ); + } + } + } } } + private void copyIfNotSet( UIDefaults defaults, String destKey, String srcKey, Set uiKeys ) { + if( !uiKeys.contains( destKey ) ) + defaults.put( destKey, defaults.get( srcKey ) ); + } + /** Rename UI default keys (key --> value). */ private static Map uiKeyMapping = new HashMap<>(); /** Copy UI default keys (value --> key). */ From a6db352ecdbc59a9bd5a810116aa153f93dcb7d9 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 13 Jan 2021 10:11:29 +0100 Subject: [PATCH 126/178] IntelliJ Themes: - fixed menu item check colors - fixed MenuItem.underlineSelectionColor - fixed List, Tree and Table selectionInactiveForeground in light Arc themes - fixed List and Table background colors in Material UI Lite themes --- CHANGELOG.md | 6 +++ .../com/formdev/flatlaf/IntelliJTheme.java | 23 ++++++++-- .../flatlaf/ui/FlatMenuItemRenderer.java | 5 ++- .../formdev/flatlaf/FlatDarkLaf.properties | 2 +- .../formdev/flatlaf/FlatLightLaf.properties | 2 +- .../flatlaf/IntelliJTheme$ThemeLaf.properties | 42 ++++++++++++++++++ .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 4 +- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 4 +- .../flatlaf/testing/FlatMenusTest.java | 38 ++++++++++++++++ .../formdev/flatlaf/testing/FlatMenusTest.jfd | 44 +++++++++++++++++-- 10 files changed, 157 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64681551..5db359e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,12 @@ FlatLaf Change Log `com.formdev.flatlaf.extras.components` to Java 9 module descriptor. - JIDE Common Layer: Invoke `LookAndFeelFactory.installJideExtension()` when using FlatLaf UI delegates. (issue #230) +- IntelliJ Themes: + - Fixed menu item check colors. + - Fixed `MenuItem.underlineSelectionColor`. + - Fixed List, Tree and Table `selectionInactiveForeground` in light Arc + themes. + - Fixed List and Table background colors in Material UI Lite themes. ## 0.46 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 8eaf5e79..1c3fa053 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -57,6 +57,8 @@ public class IntelliJTheme public final boolean dark; public final String author; + private final boolean isMaterialUILite; + private final Map colors; private final Map ui; private final Map icons; @@ -120,6 +122,8 @@ public class IntelliJTheme dark = Boolean.parseBoolean( (String) json.get( "dark" ) ); author = (String) json.get( "author" ); + isMaterialUILite = author.equals( "Mallowigi" ); + colors = (Map) json.get( "colors" ); ui = (Map) json.get( "ui" ); icons = (Map) json.get( "icons" ); @@ -211,6 +215,12 @@ public class IntelliJTheme if( !uiKeys.contains( "ToggleButton.foreground" ) && uiKeys.contains( "Button.foreground" ) ) defaults.put( "ToggleButton.foreground", defaults.get( "Button.foreground" ) ); + // fix List and Table background colors in Material UI Lite themes + if( isMaterialUILite ) { + defaults.put( "List.background", defaults.get( "Tree.background" ) ); + defaults.put( "Table.background", defaults.get( "Tree.background" ) ); + } + // limit tree row height int rowHeight = defaults.getInt( "Tree.rowHeight" ); if( rowHeight > 22 ) @@ -231,10 +241,17 @@ public class IntelliJTheme // remove theme specific UI defaults and remember only those for current theme Map themeSpecificDefaults = new HashMap<>(); String currentThemePrefix = '[' + name.replace( ' ', '_' ) + ']'; + String currentAuthorPrefix = "[author-" + author.replace( ' ', '_' ) + ']'; + String allThemesPrefix = "[*]"; + String[] prefixes = { currentThemePrefix, currentAuthorPrefix, allThemesPrefix }; for( String key : themeSpecificKeys ) { Object value = defaults.remove( key ); - if( key.startsWith( currentThemePrefix ) ) - themeSpecificDefaults.put( key.substring( currentThemePrefix.length() ), value ); + for( String prefix : prefixes ) { + if( key.startsWith( prefix ) ) { + themeSpecificDefaults.put( key.substring( prefix.length() ), value ); + break; + } + } } return themeSpecificDefaults; @@ -275,7 +292,6 @@ public class IntelliJTheme uiKeys.add( key ); // fix ComboBox size and Spinner border in all Material UI Lite themes - boolean isMaterialUILite = author.equals( "Mallowigi" ); if( isMaterialUILite && (key.equals( "ComboBox.padding" ) || key.equals( "Spinner.border" )) ) return; // ignore @@ -529,6 +545,7 @@ public class IntelliJTheme uiKeyCopying.put( "CheckBoxMenuItem.margin", "MenuItem.margin" ); uiKeyCopying.put( "RadioButtonMenuItem.margin", "MenuItem.margin" ); uiKeyMapping.put( "PopupMenu.border", "PopupMenu.borderInsets" ); + uiKeyCopying.put( "MenuItem.underlineSelectionColor", "TabbedPane.underlineColor" ); // IDEA uses List.selectionBackground also for menu selection uiKeyCopying.put( "Menu.selectionBackground", "List.selectionBackground" ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java index 8fe99aee..3d4deb21 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java @@ -57,6 +57,7 @@ import com.formdev.flatlaf.util.SystemInfo; * @uiDefault MenuItem.underlineSelectionCheckBackground Color * @uiDefault MenuItem.underlineSelectionColor Color * @uiDefault MenuItem.underlineSelectionHeight int + * @uiDefault MenuItem.selectionBackground Color * * @author Karl Tauber */ @@ -82,6 +83,8 @@ public class FlatMenuItemRenderer protected final Color underlineSelectionColor = UIManager.getColor( "MenuItem.underlineSelectionColor" ); protected final int underlineSelectionHeight = UIManager.getInt( "MenuItem.underlineSelectionHeight" ); + protected final Color selectionBackground = UIManager.getColor( "MenuItem.selectionBackground" ); + protected FlatMenuItemRenderer( JMenuItem menuItem, Icon checkIcon, Icon arrowIcon, Font acceleratorFont, String acceleratorDelimiter ) { @@ -303,7 +306,7 @@ debug*/ // then use filled icon background to indicate selection (instead of using checkIcon) if( menuItem.isSelected() && checkIcon != null && icon != checkIcon ) { Rectangle r = FlatUIUtils.addInsets( iconRect, scale( checkMargins ) ); - g.setColor( deriveBackground( checkBackground ) ); + g.setColor( FlatUIUtils.deriveColor( checkBackground, selectionBackground ) ); g.fillRect( r.x, r.y, r.width, r.height ); } diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 5ca24cef..d48ccadf 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -30,7 +30,7 @@ @textComponentBackground = #45494A @menuBackground = darken(@background,5%) @menuHoverBackground = lighten(@menuBackground,10%,derived) -@menuCheckBackground = darken(@selectionBackground,10%) +@menuCheckBackground = darken(@selectionBackground,10%,derived noAutoInverse) @menuAcceleratorForeground = darken(@foreground,15%) @menuAcceleratorSelectionForeground = @selectionForeground @cellFocusColor = #000 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 966dc2c1..f0aec0a4 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -30,7 +30,7 @@ @textComponentBackground = #fff @menuBackground = #fff @menuHoverBackground = darken(@menuBackground,10%,derived) -@menuCheckBackground = lighten(@selectionBackground,40%) +@menuCheckBackground = lighten(@selectionBackground,40%,derived noAutoInverse) @menuAcceleratorForeground = lighten(@foreground,30%) @menuAcceleratorSelectionForeground = @selectionForeground @cellFocusColor = #000 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties index 1226c705..18ac0e94 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties @@ -35,6 +35,13 @@ Button.default.hoverBorderColor = null HelpButton.hoverBorderColor = null +#---- MenuItemCheckBox ---- + +# colors from intellij/checkmark.svg and darcula/checkmark.svg +[light]MenuItemCheckBox.icon.checkmarkColor=#3E3E3C +[dark]MenuItemCheckBox.icon.checkmarkColor=#fff9 + + #---- Slider ---- Slider.focusedColor = fade($Component.focusColor,40%,derived) @@ -50,11 +57,21 @@ ToggleButton.endBackground = $ToggleButton.background #---- theme specific ---- +@ijMenuCheckBackgroundL10 = lighten(@selectionBackground,10%,derived noAutoInverse) +@ijMenuCheckBackgroundL20 = lighten(@selectionBackground,20%,derived noAutoInverse) +@ijMenuCheckBackgroundD10 = darken(@selectionBackground,10%,derived noAutoInverse) + [Arc_Theme]ProgressBar.selectionBackground = #000 [Arc_Theme]ProgressBar.selectionForeground = #fff +[Arc_Theme]List.selectionInactiveForeground = #fff +[Arc_Theme]Table.selectionInactiveForeground = #fff +[Arc_Theme]Tree.selectionInactiveForeground = #fff [Arc_Theme_-_Orange]ProgressBar.selectionBackground = #000 [Arc_Theme_-_Orange]ProgressBar.selectionForeground = #fff +[Arc_Theme_-_Orange]List.selectionInactiveForeground = #fff +[Arc_Theme_-_Orange]Table.selectionInactiveForeground = #fff +[Arc_Theme_-_Orange]Tree.selectionInactiveForeground = #fff [Arc_Theme_Dark]ProgressBar.selectionBackground = #ddd [Arc_Theme_Dark]ProgressBar.selectionForeground = #ddd @@ -64,18 +81,28 @@ ToggleButton.endBackground = $ToggleButton.background [Cobalt_2]CheckBox.icon.background = #002946 [Cobalt_2]CheckBox.icon.checkmarkColor = #002946 +[Cobalt_2]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[Cobalt_2]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 + +[Cyan_light]MenuItem.checkBackground = @ijMenuCheckBackgroundL20 +[Cyan_light]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL20 [Dark_purple]Slider.focusedColor = fade($Component.focusColor,70%,derived) [Dracula]ProgressBar.selectionBackground = #fff [Dracula]ProgressBar.selectionForeground = #fff +[Gradianto_Dark_Fuchsia]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[Gradianto_Dark_Fuchsia]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 + [Gruvbox_Dark_Hard]ToggleButton.selectedBackground = $ToggleButton.selectedBackground [Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground [Gruvbox_Dark_Medium]ToggleButton.selectedBackground = $ToggleButton.selectedBackground [Gruvbox_Dark_Medium]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground +[Gruvbox_Dark_Soft]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[Gruvbox_Dark_Soft]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 [Gruvbox_Dark_Soft]ToggleButton.selectedBackground = $ToggleButton.selectedBackground [Gruvbox_Dark_Soft]ToggleButton.toolbar.selectedBackground = $ToggleButton.toolbar.selectedBackground @@ -88,10 +115,20 @@ ToggleButton.endBackground = $ToggleButton.background [High_contrast]ToggleButton.disabledSelectedBackground = #444 [High_contrast]ToggleButton.toolbar.selectedBackground = #fff +[Monocai]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[Monocai]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 + +[Nord]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[Nord]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 + +[One_Dark]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[One_Dark]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 [One_Dark]Slider.focusedColor = fade(#568af2,40%) [Solarized_Dark]Slider.focusedColor = fade($Component.focusColor,80%,derived) +[vuesion-theme]MenuItem.checkBackground = @ijMenuCheckBackgroundL10 +[vuesion-theme]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10 [vuesion-theme]Slider.trackValueColor = #ececee [vuesion-theme]Slider.trackColor = #303a45 [vuesion-theme]Slider.thumbColor = #ececee @@ -100,6 +137,11 @@ ToggleButton.endBackground = $ToggleButton.background # Material Theme UI Lite +[light][author-Mallowigi]MenuItem.checkBackground = @ijMenuCheckBackgroundD10 +[light][author-Mallowigi]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundD10 +[dark][author-Mallowigi]MenuItem.checkBackground = @ijMenuCheckBackgroundL20 +[dark][author-Mallowigi]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL20 + [Dracula_Contrast]ProgressBar.selectionBackground = #fff [Dracula_Contrast]ProgressBar.selectionForeground = #fff diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index b34e5ec7..78de0a0a 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -542,7 +542,7 @@ MenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenu MenuItem.background #303234 javax.swing.plaf.ColorUIResource [UI] MenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMenuItemBorder [UI] MenuItem.borderPainted true -MenuItem.checkBackground #3c588b javax.swing.plaf.ColorUIResource [UI] +MenuItem.checkBackground #3c588b com.formdev.flatlaf.util.DerivedColor [UI] darken(10%) MenuItem.checkMargins 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI] MenuItem.disabledForeground #888888 javax.swing.plaf.ColorUIResource [UI] MenuItem.font [active] $defaultFont [UI] @@ -557,7 +557,7 @@ MenuItem.selectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI] MenuItem.textAcceleratorGap 24 MenuItem.textNoAcceleratorGap 6 MenuItem.underlineSelectionBackground #484c4f com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse) -MenuItem.underlineSelectionCheckBackground #3c588b javax.swing.plaf.ColorUIResource [UI] +MenuItem.underlineSelectionCheckBackground #3c588b com.formdev.flatlaf.util.DerivedColor [UI] darken(10%) MenuItem.underlineSelectionColor #4a88c7 javax.swing.plaf.ColorUIResource [UI] MenuItem.underlineSelectionHeight 3 diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index a9aeba92..8128c677 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -548,7 +548,7 @@ MenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenu MenuItem.background #ffffff javax.swing.plaf.ColorUIResource [UI] MenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMenuItemBorder [UI] MenuItem.borderPainted true -MenuItem.checkBackground #bfd9f2 javax.swing.plaf.ColorUIResource [UI] +MenuItem.checkBackground #bfd9f2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(40%) MenuItem.checkMargins 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI] MenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI] MenuItem.font [active] $defaultFont [UI] @@ -563,7 +563,7 @@ MenuItem.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI] MenuItem.textAcceleratorGap 24 MenuItem.textNoAcceleratorGap 6 MenuItem.underlineSelectionBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) -MenuItem.underlineSelectionCheckBackground #bfd9f2 javax.swing.plaf.ColorUIResource [UI] +MenuItem.underlineSelectionCheckBackground #bfd9f2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(40%) MenuItem.underlineSelectionColor #4083c9 javax.swing.plaf.ColorUIResource [UI] MenuItem.underlineSelectionHeight 3 diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.java index a61d2322..abfdb288 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.java @@ -211,11 +211,15 @@ public class FlatMenusTest JMenuItem menuItem3 = new JMenuItem(); JCheckBoxMenuItem checkBoxMenuItem3 = new JCheckBoxMenuItem(); JRadioButtonMenuItem radioButtonMenuItem3 = new JRadioButtonMenuItem(); + JCheckBoxMenuItem checkBoxMenuItem9 = new JCheckBoxMenuItem(); + JRadioButtonMenuItem radioButtonMenuItem7 = new JRadioButtonMenuItem(); JPanel panel4 = new JPanel(); JMenu menu4 = new JMenu(); JMenuItem menuItem4 = new JMenuItem(); JCheckBoxMenuItem checkBoxMenuItem4 = new JCheckBoxMenuItem(); JRadioButtonMenuItem radioButtonMenuItem4 = new JRadioButtonMenuItem(); + JCheckBoxMenuItem checkBoxMenuItem10 = new JCheckBoxMenuItem(); + JRadioButtonMenuItem radioButtonMenuItem11 = new JRadioButtonMenuItem(); JLabel popupMenuLabel = new JLabel(); JButton showPopupMenuButton = new JButton(); armedCheckBox = new JCheckBox(); @@ -670,6 +674,8 @@ public class FlatMenusTest "[]" + "[]" + "[]" + + "[]" + + "[]" + "[]")); //======== menu3 ======== @@ -696,6 +702,20 @@ public class FlatMenusTest radioButtonMenuItem3.setSelected(true); radioButtonMenuItem3.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); panel3.add(radioButtonMenuItem3, "cell 0 3"); + + //---- checkBoxMenuItem9 ---- + checkBoxMenuItem9.setText("selected"); + checkBoxMenuItem9.setSelected(true); + checkBoxMenuItem9.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); + checkBoxMenuItem9.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png"))); + panel3.add(checkBoxMenuItem9, "cell 0 4"); + + //---- radioButtonMenuItem7 ---- + radioButtonMenuItem7.setText("selected"); + radioButtonMenuItem7.setSelected(true); + radioButtonMenuItem7.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); + radioButtonMenuItem7.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png"))); + panel3.add(radioButtonMenuItem7, "cell 0 5"); } add(panel3, "cell 3 1"); @@ -710,6 +730,8 @@ public class FlatMenusTest "[]" + "[]" + "[]" + + "[]" + + "[]" + "[]")); //======== menu4 ======== @@ -739,6 +761,22 @@ public class FlatMenusTest radioButtonMenuItem4.setSelected(true); radioButtonMenuItem4.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); panel4.add(radioButtonMenuItem4, "cell 0 3"); + + //---- checkBoxMenuItem10 ---- + checkBoxMenuItem10.setText("selected disabled"); + checkBoxMenuItem10.setEnabled(false); + checkBoxMenuItem10.setSelected(true); + checkBoxMenuItem10.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); + checkBoxMenuItem10.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png"))); + panel4.add(checkBoxMenuItem10, "cell 0 4"); + + //---- radioButtonMenuItem11 ---- + radioButtonMenuItem11.setText("selected disabled"); + radioButtonMenuItem11.setEnabled(false); + radioButtonMenuItem11.setSelected(true); + radioButtonMenuItem11.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); + radioButtonMenuItem11.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png"))); + panel4.add(radioButtonMenuItem11, "cell 0 5"); } add(panel4, "cell 4 1"); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.jfd index da5bdd77..5be13f68 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatMenusTest.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -454,7 +454,7 @@ new FormModel { } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$columnConstraints": "[fill]" - "$rowConstraints": "[][][][]" + "$rowConstraints": "[][][][][][]" "$layoutConstraints": "insets 0" } ) { name: "panel3" @@ -490,12 +490,30 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 3" } ) + add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) { + name: "checkBoxMenuItem9" + "text": "selected" + "selected": true + "accelerator": #KeyStroke1 + "icon": &SwingIcon3 new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png" ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 4" + } ) + add( new FormComponent( "javax.swing.JRadioButtonMenuItem" ) { + name: "radioButtonMenuItem7" + "text": "selected" + "selected": true + "accelerator": #KeyStroke1 + "icon": #SwingIcon3 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 5" + } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 1" } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$columnConstraints": "[fill]" - "$rowConstraints": "[][][][]" + "$rowConstraints": "[][][][][][]" "$layoutConstraints": "insets 0" } ) { name: "panel4" @@ -534,6 +552,26 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 3" } ) + add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) { + name: "checkBoxMenuItem10" + "text": "selected disabled" + "enabled": false + "selected": true + "accelerator": #KeyStroke1 + "icon": &SwingIcon4 new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png" ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 4" + } ) + add( new FormComponent( "javax.swing.JRadioButtonMenuItem" ) { + name: "radioButtonMenuItem11" + "text": "selected disabled" + "enabled": false + "selected": true + "accelerator": #KeyStroke1 + "icon": #SwingIcon4 + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 5" + } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 1" } ) From 8d14d5f87c85d6656609b02ddcc9182e3f030bce Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 13 Jan 2021 10:32:15 +0100 Subject: [PATCH 127/178] Button: disabled `Button.defaultButtonFollowsFocus` on Windows (as on other platforms, IntelliJ IDEA and other Lafs) --- CHANGELOG.md | 4 ++++ .../src/main/resources/com/formdev/flatlaf/FlatLaf.properties | 1 - .../dumps/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt | 3 --- .../dumps/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt | 3 --- flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt | 2 +- .../dumps/uidefaults/FlatLightLaf_1.8.0_202-linux.txt | 3 --- .../dumps/uidefaults/FlatLightLaf_1.8.0_202-mac.txt | 3 --- flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt | 2 +- flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt | 2 +- 9 files changed, 7 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db359e0..036cc0ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ FlatLaf Change Log #### New features and improvements +- Button: Disabled `Button.defaultButtonFollowsFocus` on Windows (as on other + platforms). If you like to keep the old behavior in your application, use: + `if(SystemInfo.isWindows) + UIManager.put("Button.defaultButtonFollowsFocus",true);`. - ComboBox, Spinner and SplitPaneDivider: Added pressed feedback to arrow buttons. - TextComponent: Clip placeholder text if it does not fit into visible area. (PR 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 c8a34016..9d39f7cb 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -149,7 +149,6 @@ Button.margin = 2,14,2,14 Button.iconTextGap = 4 Button.rollover = true Button.defaultButtonFollowsFocus = false -[win]Button.defaultButtonFollowsFocus = true Button.borderWidth = 1 Button.default.borderWidth = 1 diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt index 53feaf64..1b47b2a5 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt @@ -1,9 +1,6 @@ - OS Windows 10 + OS Linux -- Button.defaultButtonFollowsFocus true -+ Button.defaultButtonFollowsFocus false - - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt index 7a4016df..ca6fa9ba 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt @@ -1,9 +1,6 @@ - OS Windows 10 + OS Mac OS X -- Button.defaultButtonFollowsFocus true -+ Button.defaultButtonFollowsFocus false - + ComboBox.showPopupOnNavigation true - Menu.shortcutKeys length=1 [I diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 78de0a0a..2e591abb 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -77,7 +77,7 @@ Button.default.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] Button.default.hoverBackground #3b5f8b com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse) Button.default.hoverBorderColor #537699 javax.swing.plaf.ColorUIResource [UI] Button.default.pressedBackground #3f6796 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse) -Button.defaultButtonFollowsFocus true +Button.defaultButtonFollowsFocus false Button.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] Button.disabledBorderColor #5e6060 javax.swing.plaf.ColorUIResource [UI] Button.disabledSelectedBackground #53585a com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse) diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-linux.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-linux.txt index 53feaf64..1b47b2a5 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-linux.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-linux.txt @@ -1,9 +1,6 @@ - OS Windows 10 + OS Linux -- Button.defaultButtonFollowsFocus true -+ Button.defaultButtonFollowsFocus false - - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-mac.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-mac.txt index 7a4016df..ca6fa9ba 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-mac.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202-mac.txt @@ -1,9 +1,6 @@ - OS Windows 10 + OS Mac OS X -- Button.defaultButtonFollowsFocus true -+ Button.defaultButtonFollowsFocus false - + ComboBox.showPopupOnNavigation true - Menu.shortcutKeys length=1 [I diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 8128c677..cddf7339 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -77,7 +77,7 @@ Button.default.foreground #000000 javax.swing.plaf.ColorUIResource [UI] Button.default.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) Button.default.hoverBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] Button.default.pressedBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) -Button.defaultButtonFollowsFocus true +Button.defaultButtonFollowsFocus false Button.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] Button.disabledBorderColor #cfcfcf javax.swing.plaf.ColorUIResource [UI] Button.disabledSelectedBackground #dedede com.formdev.flatlaf.util.DerivedColor [UI] darken(13% autoInverse) diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index 616bd940..374023a0 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -78,7 +78,7 @@ Button.default.hoverBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI] Button.default.pressedBackground #ffc800 javax.swing.plaf.ColorUIResource [UI] Button.default.startBackground #dddddd javax.swing.plaf.ColorUIResource [UI] Button.default.startBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI] -Button.defaultButtonFollowsFocus true +Button.defaultButtonFollowsFocus false Button.disabledBackground #e0e0e0 javax.swing.plaf.ColorUIResource [UI] Button.disabledBorderColor #000088 javax.swing.plaf.ColorUIResource [UI] Button.disabledText #000088 javax.swing.plaf.ColorUIResource [UI] From b49a498f9cfabdaeab242ab861290e2abeaf422f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 13 Jan 2021 17:22:09 +0100 Subject: [PATCH 128/178] Button and ToggleButton: ToolBar buttons now respect explicitly set background color. If no background color is set, then the button background is not painted anymore (issue #191) --- CHANGELOG.md | 3 ++ .../com/formdev/flatlaf/ui/FlatButtonUI.java | 9 +++- .../flatlaf/testing/FlatComponentsTest.java | 41 +++++++++++++++++-- .../flatlaf/testing/FlatComponentsTest.jfd | 8 ++-- 4 files changed, 51 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 036cc0ee..c9a9c081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,9 @@ FlatLaf Change Log - Button and ToggleButton: Threat Unicode surrogate character pair as single character and make button square. (issue #234) +- Button and ToggleButton: ToolBar buttons now respect explicitly set background + color. If no background color is set, then the button background is not + painted anymore. (issue #191) - TabbedPane: Fixed `IndexOutOfBoundsException` when using tooltip text on close buttons and closing last/rightmost tab. (issue #235) - Extras: Added missing export of package diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java index 0c33f4f1..5aba716c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java @@ -410,8 +410,13 @@ public class FlatButtonUI if( model.isRollover() ) return toolbarHoverBackground; - // use background of toolbar - return c.getParent().getBackground(); + // use component background if explicitly set + Color bg = c.getBackground(); + if( isCustomBackground( bg ) ) + return bg; + + // do not paint background + return null; } boolean def = isDefaultButton( c ); diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index fb5aebe3..371d9a1d 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -356,7 +356,7 @@ public class FlatComponentsTest JScrollPane scrollPane14 = new JScrollPane(); progressBar3 = new FlatProgressBar(); progressBar4 = new FlatProgressBar(); - JToolBar toolBar2 = new JToolBar(); + FlatComponentsTest.TestToolBar toolBar2 = new FlatComponentsTest.TestToolBar(); JButton button9 = new JButton(); JButton button10 = new JButton(); JButton button11 = new JButton(); @@ -411,7 +411,7 @@ public class FlatComponentsTest JToolTip toolTip1 = new JToolTip(); JToolTip toolTip2 = new JToolTip(); JLabel toolBarLabel = new JLabel(); - JToolBar toolBar1 = new JToolBar(); + FlatComponentsTest.TestToolBar toolBar1 = new FlatComponentsTest.TestToolBar(); JButton button4 = new JButton(); JButton button6 = new JButton(); JButton button7 = new JButton(); @@ -421,13 +421,13 @@ public class FlatComponentsTest JToggleButton toggleButton16 = new JToggleButton(); JToggleButton toggleButton17 = new JToggleButton(); JLabel label3 = new JLabel(); - JToolBar toolBar3 = new JToolBar(); + FlatComponentsTest.TestToolBar toolBar3 = new FlatComponentsTest.TestToolBar(); FlatButton button26 = new FlatButton(); FlatButton button27 = new FlatButton(); FlatToggleButton toggleButton23 = new FlatToggleButton(); FlatToggleButton toggleButton24 = new FlatToggleButton(); JLabel label4 = new JLabel(); - JToolBar toolBar4 = new JToolBar(); + FlatComponentsTest.TestToolBar toolBar4 = new FlatComponentsTest.TestToolBar(); FlatButton button28 = new FlatButton(); FlatButton button29 = new FlatButton(); FlatToggleButton toggleButton25 = new FlatToggleButton(); @@ -1684,4 +1684,37 @@ public class FlatComponentsTest } } } + + //---- class TestToolBar -------------------------------------------------- + + private static class TestToolBar + extends JToolBar + { + @Override + protected void paintComponent( Graphics g ) { + super.paintComponent( g ); + + if( isPaintBackgroundPattern() && isOpaque() ) { + int width = getWidth(); + int height = getHeight(); + + g.setColor( Color.blue ); + for( int y = 0; y < height; y += 2 ) + g.drawLine( 0, y, width - 1, y ); + } + } + + /** + * Overridden to see which components paint background with color from parent. + */ + @Override + public Color getBackground() { + return isPaintBackgroundPattern() ? Color.orange : super.getBackground(); + } + + private boolean isPaintBackgroundPattern() { + FlatTestFrame frame = (FlatTestFrame) SwingUtilities.getAncestorOfClass( FlatTestFrame.class, this ); + return frame != null && frame.isPaintBackgroundPattern(); + } + } } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index 4188313f..a8c70741 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -933,7 +933,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 13 1 6,growy" } ) - add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { name: "toolBar2" "orientation": 1 add( new FormComponent( "javax.swing.JButton" ) { @@ -1391,7 +1391,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 23" } ) - add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { name: "toolBar1" add( new FormComponent( "javax.swing.JButton" ) { name: "button4" @@ -1446,7 +1446,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 23 5 1" } ) - add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { name: "toolBar3" add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button26" @@ -1479,7 +1479,7 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 23 5 1" } ) - add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { + add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { name: "toolBar4" add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) { name: "button28" From 15328b4fd7641bcb20308ae2b5addbff0d260c97 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 13 Jan 2021 17:52:05 +0100 Subject: [PATCH 129/178] ToggleButton: tab style buttons now respect explicitly set background color --- CHANGELOG.md | 2 ++ .../com/formdev/flatlaf/ui/FlatToggleButtonUI.java | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9a9c081..f0d0f6fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ FlatLaf Change Log - Button and ToggleButton: ToolBar buttons now respect explicitly set background color. If no background color is set, then the button background is not painted anymore. (issue #191) +- ToggleButton: Tab style buttons (client property `JButton.buttonType` is + `tab`) now respect explicitly set background color. - TabbedPane: Fixed `IndexOutOfBoundsException` when using tooltip text on close buttons and closing last/rightmost tab. (issue #235) - Extras: Added missing export of package diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToggleButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToggleButtonUI.java index 22dedbdc..2d1a5f24 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToggleButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToggleButtonUI.java @@ -146,10 +146,17 @@ public class FlatToggleButtonUI int height = c.getHeight(); int width = c.getWidth(); boolean selected = ((AbstractButton)c).isSelected(); + Color enabledColor = selected ? clientPropertyColor( c, TAB_BUTTON_SELECTED_BACKGROUND, tabSelectedBackground ) : null; + + // use component background if explicitly set + if( enabledColor == null ) { + Color bg = c.getBackground(); + if( isCustomBackground( bg ) ) + enabledColor = bg; + } // paint background - Color background = buttonStateColor( c, - selected ? clientPropertyColor( c, TAB_BUTTON_SELECTED_BACKGROUND, tabSelectedBackground ) : null, + Color background = buttonStateColor( c, enabledColor, null, tabFocusBackground, tabHoverBackground, null ); if( background != null ) { g.setColor( background ); From 647d72514b036c3520b5e83a9e1c755b7cde241e Mon Sep 17 00:00:00 2001 From: Ingo Kegel Date: Thu, 14 Jan 2021 10:18:39 +0100 Subject: [PATCH 130/178] JetBrains Runtime 11 has support for displaying the .AppleSystemUIFont font. This font should be used for UI elements since macOS 10.15. See https://youtrack.jetbrains.com/issue/JBR-1915 for more information. Other JREs, including JetBrains Runtime 8 do not handle kerning for that font correctly. --- .../src/main/java/com/formdev/flatlaf/FlatLaf.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index 2e4b86cd..f941474d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -467,8 +467,13 @@ public abstract class FlatLaf } else if( SystemInfo.isMacOS ) { String fontName; if( SystemInfo.isMacOS_10_15_Catalina_orLater ) { - // use Helvetica Neue font - fontName = "Helvetica Neue"; + if (SystemInfo.isJetBrainsJVM_11_orLater) { + // See https://youtrack.jetbrains.com/issue/JBR-1915 + fontName = ".AppleSystemUIFont"; + } else { + // use Helvetica Neue font + fontName = "Helvetica Neue"; + } } else if( SystemInfo.isMacOS_10_11_ElCapitan_orLater ) { // use San Francisco Text font fontName = ".SF NS Text"; From 0dab1b73cc51910bad074a7674c0bc13ab384a51 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 14 Jan 2021 13:36:01 +0100 Subject: [PATCH 131/178] JIDE: RangeSlider: fixed slider focused colors in IntelliJ themes (see commit 1fb0783808cd6529d7dc44cc131b138fc2bb7923) --- CHANGELOG.md | 6 ++++-- .../com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0d0f6fa..0f0bb275 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,8 +36,10 @@ FlatLaf Change Log buttons and closing last/rightmost tab. (issue #235) - Extras: Added missing export of package `com.formdev.flatlaf.extras.components` to Java 9 module descriptor. -- JIDE Common Layer: Invoke `LookAndFeelFactory.installJideExtension()` when - using FlatLaf UI delegates. (issue #230) +- JIDE Common Layer: + - Invoke `LookAndFeelFactory.installJideExtension()` when using FlatLaf UI + delegates. (issue #230) + - RangeSlider: Fixed slider focused colors in IntelliJ themes. - IntelliJ Themes: - Fixed menu item check colors. - Fixed `MenuItem.underlineSelectionColor`. diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index e92cb859..0591cba8 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -53,6 +53,7 @@ public class FlatRangeSliderUI protected Color trackColor; protected Color thumbColor; protected Color thumbBorderColor; + protected Color focusBaseColor; protected Color focusedColor; protected Color focusedThumbBorderColor; protected Color hoverTrackColor; @@ -118,7 +119,8 @@ public class FlatRangeSliderUI trackColor = UIManager.getColor( "Slider.trackColor" ); thumbColor = UIManager.getColor( "Slider.thumbColor" ); thumbBorderColor = UIManager.getColor( "Slider.thumbBorderColor" ); - focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" ); + focusBaseColor = UIManager.getColor( "Component.focusColor" ); + focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", focusBaseColor ); focusedThumbBorderColor = FlatUIUtils.getUIColor( "Slider.focusedThumbBorderColor", "Component.focusedBorderColor" ); hoverTrackColor = FlatUIUtils.getUIColor( "Slider.hoverTrackColor", "Slider.hoverThumbColor" ); hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" ); @@ -137,6 +139,7 @@ public class FlatRangeSliderUI trackColor = null; thumbColor = null; thumbBorderColor = null; + focusBaseColor = null; focusedColor = null; focusedThumbBorderColor = null; hoverTrackColor = null; @@ -303,6 +306,8 @@ debug*/ ? FlatSliderUI.stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null ) : null; + Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, focusBaseColor ); + FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); } From 23e67a2908c09a08c5bddd53fa1e68dde6dcd4d7 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 14 Jan 2021 13:50:42 +0100 Subject: [PATCH 132/178] Slider: support per component custom thumb and track colors --- CHANGELOG.md | 2 ++ .../com/formdev/flatlaf/ui/FlatSliderUI.java | 35 ++++++++++++++++--- .../flatlaf/jideoss/ui/FlatRangeSliderUI.java | 34 ++++++++++++++++-- .../flatlaf/testing/FlatComponentsTest.java | 16 ++++++++- .../flatlaf/testing/FlatComponentsTest.jfd | 12 ++++++- .../flatlaf/testing/FlatTestFrame.java | 2 +- 6 files changed, 91 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f0bb275..cc563775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ FlatLaf Change Log UIManager.put("Button.defaultButtonFollowsFocus",true);`. - ComboBox, Spinner and SplitPaneDivider: Added pressed feedback to arrow buttons. +- Slider: Support per component custom thumb and track colors via + `JSlider.setForeground(Color)` and `JSlider.setBackground(Color)`. - TextComponent: Clip placeholder text if it does not fit into visible area. (PR #229) - Extras: UI defaults inspector: diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index a88bcf9c..b44f769f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -91,6 +91,9 @@ public class FlatSliderUI protected Color disabledThumbColor; protected Color disabledThumbBorderColor; + private Color defaultBackground; + private Color defaultForeground; + protected boolean thumbHover; protected boolean thumbPressed; @@ -131,6 +134,9 @@ public class FlatSliderUI disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" ); disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" ); disabledThumbBorderColor = FlatUIUtils.getUIColor( "Slider.disabledThumbBorderColor", "Component.disabledBorderColor" ); + + defaultBackground = UIManager.getColor( "Slider.background" ); + defaultForeground = UIManager.getColor( "Slider.foreground" ); } @Override @@ -149,6 +155,9 @@ public class FlatSliderUI disabledTrackColor = null; disabledThumbColor = null; disabledThumbBorderColor = null; + + defaultBackground = null; + defaultForeground = null; } @Override @@ -289,25 +298,28 @@ debug*/ coloredTrack = temp; } - g.setColor( trackValueColor ); + g.setColor( getTrackValueColor() ); ((Graphics2D)g).fill( coloredTrack ); } - g.setColor( enabled ? trackColor : disabledTrackColor ); + g.setColor( enabled ? getTrackColor() : disabledTrackColor ); ((Graphics2D)g).fill( track ); } @Override public void paintThumb( Graphics g ) { + Color thumbColor = getThumbColor(); Color color = stateColor( slider, thumbHover, thumbPressed, thumbColor, disabledThumbColor, null, hoverThumbColor, pressedThumbColor ); color = FlatUIUtils.deriveColor( color, thumbColor ); - Color borderColor = (thumbBorderColor != null) + Color foreground = slider.getForeground(); + Color borderColor = (thumbBorderColor != null && foreground == defaultForeground) ? stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null ) : null; - Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, focusBaseColor ); + Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, + (foreground != defaultForeground) ? foreground : focusBaseColor ); paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); } @@ -436,6 +448,21 @@ debug*/ return path; } + protected Color getTrackValueColor() { + Color foreground = slider.getForeground(); + return (foreground != defaultForeground) ? foreground : trackValueColor; + } + + protected Color getTrackColor() { + Color backround = slider.getBackground(); + return (backround != defaultBackground) ? backround : trackColor; + } + + protected Color getThumbColor() { + Color foreground = slider.getForeground(); + return (foreground != defaultForeground) ? foreground : thumbColor; + } + public static Color stateColor( JSlider slider, boolean hover, boolean pressed, Color enabledColor, Color disabledColor, Color focusedColor, Color hoverColor, Color pressedColor ) { diff --git a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java index 0591cba8..fbd9f482 100644 --- a/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java +++ b/flatlaf-jide-oss/src/main/java/com/formdev/flatlaf/jideoss/ui/FlatRangeSliderUI.java @@ -64,6 +64,9 @@ public class FlatRangeSliderUI protected Color disabledThumbColor; protected Color disabledThumbBorderColor; + private Color defaultBackground; + private Color defaultForeground; + private Object[] oldRenderingHints; public static ComponentUI createUI( JComponent c ) { @@ -129,6 +132,9 @@ public class FlatRangeSliderUI disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" ); disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" ); disabledThumbBorderColor = FlatUIUtils.getUIColor( "Slider.disabledThumbBorderColor", "Component.disabledBorderColor" ); + + defaultBackground = UIManager.getColor( "Slider.background" ); + defaultForeground = UIManager.getColor( "Slider.foreground" ); } @Override @@ -149,6 +155,9 @@ public class FlatRangeSliderUI disabledTrackColor = null; disabledThumbColor = null; disabledThumbBorderColor = null; + + defaultBackground = null; + defaultForeground = null; } @Override @@ -278,13 +287,14 @@ debug*/ track = new RoundRectangle2D.Float( x, trackRect.y, tw, trackRect.height, arc, arc ); } - g.setColor( enabled ? trackColor : disabledTrackColor ); + g.setColor( enabled ? getTrackColor() : disabledTrackColor ); ((Graphics2D)g).fill( track ); if( coloredTrack != null ) { boolean trackHover = hover && rollover1 && rollover2; boolean trackPressed = pressed1 && pressed2; + Color trackValueColor = getTrackValueColor(); Color color = FlatSliderUI.stateColor( slider, trackHover, trackPressed, trackValueColor, null, null, hoverTrackColor, pressedTrackColor ); @@ -298,19 +308,37 @@ debug*/ boolean thumbHover = hover && ((!second && rollover1) || (second && rollover2)); boolean thumbPressed = (!second && pressed1) || (second && pressed2); + Color thumbColor = getThumbColor(); Color color = FlatSliderUI.stateColor( slider, thumbHover, thumbPressed, thumbColor, disabledThumbColor, null, hoverThumbColor, pressedThumbColor ); color = FlatUIUtils.deriveColor( color, thumbColor ); - Color borderColor = (thumbBorderColor != null) + Color foreground = slider.getForeground(); + Color borderColor = (thumbBorderColor != null && foreground == defaultForeground) ? FlatSliderUI.stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null ) : null; - Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, focusBaseColor ); + Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, + (foreground != defaultForeground) ? foreground : focusBaseColor ); FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); } + protected Color getTrackValueColor() { + Color foreground = slider.getForeground(); + return (foreground != defaultForeground) ? foreground : trackValueColor; + } + + protected Color getTrackColor() { + Color backround = slider.getBackground(); + return (backround != defaultBackground) ? backround : trackColor; + } + + protected Color getThumbColor() { + Color foreground = slider.getForeground(); + return (foreground != defaultForeground) ? foreground : thumbColor; + } + protected boolean isRoundThumb() { return !slider.getPaintTicks() && !slider.getPaintLabels(); } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java index 371d9a1d..94df07b0 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java @@ -214,6 +214,13 @@ public class FlatComponentsTest slider.setSnapToTicks( snapToTicks ); } + private void sliderBorderChanged() { + boolean border = sliderBorderCheckBox.isSelected(); + UIManager.put( "Slider.thumbBorderColor", border ? Color.green : null ); + for( JSlider slider : allSliders ) + slider.updateUI(); + } + private void majorThickSpacingChanged() { int majorTickSpacing = (Integer) majorTickSpacingSpinner.getValue(); for( JSlider slider : directionalSliders ) { @@ -395,6 +402,7 @@ public class FlatComponentsTest sliderInvertedCheckBox = new JCheckBox(); sliderSnapToTicksCheckBox = new JCheckBox(); majorTickSpacingSpinner = new JSpinner(); + sliderBorderCheckBox = new JCheckBox(); minorTickSpacingSpinner = new JSpinner(); sliderValueLabel = new JLabel(); JPanel panel7 = new JPanel(); @@ -1381,10 +1389,15 @@ public class FlatComponentsTest majorTickSpacingSpinner.addChangeListener(e -> majorThickSpacingChanged()); panel6.add(majorTickSpacingSpinner, "cell 0 2"); + //---- sliderBorderCheckBox ---- + sliderBorderCheckBox.setText("border"); + sliderBorderCheckBox.addActionListener(e -> sliderBorderChanged()); + panel6.add(sliderBorderCheckBox, "cell 0 2"); + //---- minorTickSpacingSpinner ---- minorTickSpacingSpinner.setModel(new SpinnerNumberModel(10, 0, 100, 5)); minorTickSpacingSpinner.addChangeListener(e -> minorThickSpacingChanged()); - panel6.add(minorTickSpacingSpinner, "cell 0 2"); + panel6.add(minorTickSpacingSpinner, "cell 0 3"); //---- sliderValueLabel ---- sliderValueLabel.setText("slider value"); @@ -1625,6 +1638,7 @@ public class FlatComponentsTest private JCheckBox sliderInvertedCheckBox; private JCheckBox sliderSnapToTicksCheckBox; private JSpinner majorTickSpacingSpinner; + private JCheckBox sliderBorderCheckBox; private JSpinner minorTickSpacingSpinner; private JLabel sliderValueLabel; private JCheckBox indeterminateCheckBox; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd index a8c70741..c6ec4fae 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd @@ -1243,6 +1243,16 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 2" } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "sliderBorderCheckBox" + "text": "border" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sliderBorderChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) add( new FormComponent( "javax.swing.JSpinner" ) { name: "minorTickSpacingSpinner" "model": new javax.swing.SpinnerNumberModel( 10, 0, 100, 5 ) @@ -1251,7 +1261,7 @@ new FormModel { } addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "minorThickSpacingChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" + "value": "cell 0 3" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "sliderValueLabel" diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index fff7b226..c93d54e2 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -446,7 +446,7 @@ public class FlatTestFrame Color green = dark ? Color.green.darker() : Color.green; updateComponentsRecur( content, (c, type) -> { - if( type == "view" || type == "tab" ) { + if( type == "view" || type == "tab" || c instanceof JSlider ) { c.setForeground( explicit ? magenta : restoreColor ); c.setBackground( explicit ? orange : restoreColor ); } else { From 50d36fe91b85a339a2d554a283f6d70e4aeb357c Mon Sep 17 00:00:00 2001 From: Ingo Kegel Date: Thu, 14 Jan 2021 18:59:54 +0100 Subject: [PATCH 133/178] Switched from sub-pixel to greyscale text anti-aliasing on macOS when running with a JetBrains JRE. Sub-pixel anti-aliasing (VALUE_TEXT_ANTIALIAS_LCD_HRGB) causes font rendering with too much weight with a JetBrains JREs (both 8 and 11). This can be seen when comparing the text rendering of UI elements between IntelliJ IDEA and FlatLaf. This commits aligns FlatLaf's behavior with IntelliJ IDEA which disables sub-pixel anti-aliasing on macOS for its IDE anti-aliasing setting and uses greyscale anti-aliasing by default (see com.intellij.ide.ui.AntialiasingType.canUseSubpixelAAForIDE). --- .../src/main/java/com/formdev/flatlaf/FlatLaf.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index f941474d..4b9b01d7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -546,7 +546,12 @@ public abstract class FlatLaf } private void putAATextInfo( UIDefaults defaults ) { - if( SystemInfo.isJava_9_orLater ) { + if ( SystemInfo.isJetBrainsJVM ) { + // The awt.font.desktophints property suggests sub-pixel anti-aliasing + // which renders text with too much weight on macOS in the JetBrains JRE. + // Use greyscale anti-aliasing instead. + defaults.put( RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON ); + } else if( SystemInfo.isJava_9_orLater ) { Object desktopHints = Toolkit.getDefaultToolkit().getDesktopProperty( DESKTOPFONTHINTS ); if( desktopHints instanceof Map ) { @SuppressWarnings( "unchecked" ) From 15017ed49c61db5f68537e3a651e7722cd16606d Mon Sep 17 00:00:00 2001 From: Ingo Kegel Date: Fri, 15 Jan 2021 13:09:10 +0100 Subject: [PATCH 134/178] Made paintColumnBorders protected to help with implementing derived table header UIs To implement FlatLaf UIs for CellStyleTableHeaderUI and SortableTableHeaderUI from the Jide Grids library, access to the paintColumnBorders method is required --- .../src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java index 50722d54..a42d5681 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableHeaderUI.java @@ -141,7 +141,7 @@ public class FlatTableHeaderUI rendererClassName.equals( "sun.swing.FilePane$AlignableTableHeaderRenderer" ); } - private void paintColumnBorders( Graphics g, JComponent c ) { + protected void paintColumnBorders( Graphics g, JComponent c ) { int width = c.getWidth(); int height = c.getHeight(); float lineWidth = UIScale.scale( 1f ); From 364b6631eacc9927605ec62d5e674cef93ef13aa Mon Sep 17 00:00:00 2001 From: Ingo Kegel Date: Fri, 15 Jan 2021 14:31:58 +0100 Subject: [PATCH 135/178] The fix for text anti-aliasing in 50d36fe9 should only apply on macOS --- flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index 4b9b01d7..2fb686e1 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -546,7 +546,7 @@ public abstract class FlatLaf } private void putAATextInfo( UIDefaults defaults ) { - if ( SystemInfo.isJetBrainsJVM ) { + if ( SystemInfo.isMacOS && SystemInfo.isJetBrainsJVM ) { // The awt.font.desktophints property suggests sub-pixel anti-aliasing // which renders text with too much weight on macOS in the JetBrains JRE. // Use greyscale anti-aliasing instead. From e9ec769340d10e5eab67767b99dcb21e4c46ab32 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 15 Jan 2021 16:00:11 +0100 Subject: [PATCH 136/178] CHANGELOG.md: added recently merged PRs #237, #239 and #241 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc563775..04761579 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ FlatLaf Change Log `JSlider.setForeground(Color)` and `JSlider.setBackground(Color)`. - TextComponent: Clip placeholder text if it does not fit into visible area. (PR #229) +- macOS: Improved font rendering on macOS when using JetBrains Runtime. (PRs + #237, #239 and #241) - Extras: UI defaults inspector: - Support embedding UI defaults inspector panel into any window. See `FlatUIDefaultsInspector.createInspectorPanel()`. From ed5180ffd621ab89651cb564b0081d0a33d372a4 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 15 Jan 2021 16:15:05 +0100 Subject: [PATCH 137/178] Theme Editor: - save/restore selection when reloading file (if changed outside) - select all text in find field when pressing Ctrl+F - use lighter color for operators (e.g. '=') --- .../com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java | 2 ++ .../com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java | 5 +++++ .../main/resources/com/formdev/flatlaf/themeeditor/light.xml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java index f1186801..f906c9fe 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatFindReplaceBar.java @@ -93,6 +93,8 @@ class FlatFindReplaceBar String selectedText = textArea.getSelectedText(); if( !StringUtils.isEmpty( selectedText ) && selectedText.indexOf( '\n' ) < 0 ) findField.setText( selectedText ); + else + findField.selectAll(); // if showing bar, highlight matches in editor // (not invoking this from addNotify() because this would break the slide-in animation) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 47a13b33..d09b4c4f 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -185,7 +185,12 @@ class FlatThemeEditorPane } try { + int selectionStart = textArea.getSelectionStart(); + int selectionEnd = textArea.getSelectionEnd(); + textArea.reload(); + + textArea.select( selectionStart, selectionEnd ); } catch( IOException ex ) { JOptionPane.showMessageDialog( this, "Failed to reload '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(), diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml index 22d780ec..1c548fda 100644 --- a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml @@ -62,7 +62,7 @@