mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Theme Editor:
- fixed missing icon on "open" button (regression in commit 35fa3197c8)
- added icons to "File" menu for add and save actions
This commit is contained in:
@@ -1052,6 +1052,7 @@ class FlatThemeFileEditor
|
||||
newPropertiesFileMenuItem.setText("New Properties File...");
|
||||
newPropertiesFileMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
|
||||
newPropertiesFileMenuItem.setMnemonic('N');
|
||||
newPropertiesFileMenuItem.setIcon(new FlatSVGIcon("com/formdev/flatlaf/themeeditor/icons/add.svg"));
|
||||
newPropertiesFileMenuItem.addActionListener(e -> newPropertiesFile());
|
||||
fileMenu.add(newPropertiesFileMenuItem);
|
||||
|
||||
@@ -1059,6 +1060,7 @@ class FlatThemeFileEditor
|
||||
saveAllMenuItem.setText("Save All");
|
||||
saveAllMenuItem.setMnemonic('S');
|
||||
saveAllMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
|
||||
saveAllMenuItem.setIcon(new FlatSVGIcon("com/formdev/flatlaf/themeeditor/icons/menu-saveall.svg"));
|
||||
saveAllMenuItem.addActionListener(e -> saveAll());
|
||||
fileMenu.add(saveAllMenuItem);
|
||||
fileMenu.addSeparator();
|
||||
@@ -1230,6 +1232,7 @@ class FlatThemeFileEditor
|
||||
|
||||
//---- openDirectoryButton ----
|
||||
openDirectoryButton.setFocusable(false);
|
||||
openDirectoryButton.setIcon(new FlatSVGIcon("com/formdev/flatlaf/themeeditor/icons/menu-open.svg"));
|
||||
openDirectoryButton.addActionListener(e -> openDirectory());
|
||||
controlPanel.add(openDirectoryButton, "cell 2 0");
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "openDirectoryButton"
|
||||
"focusable": false
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/themeeditor/icons/menu-open.svg" )
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "openDirectory", false ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 2 0"
|
||||
@@ -73,6 +74,7 @@ new FormModel {
|
||||
"text": "New Properties File..."
|
||||
"accelerator": static javax.swing.KeyStroke getKeyStroke( 78, 4356, false )
|
||||
"mnemonic": 78
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/themeeditor/icons/add.svg" )
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "newPropertiesFile", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||
@@ -80,6 +82,7 @@ new FormModel {
|
||||
"text": "Save All"
|
||||
"mnemonic": 83
|
||||
"accelerator": static javax.swing.KeyStroke getKeyStroke( 83, 4226, false )
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/themeeditor/icons/menu-saveall.svg" )
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "saveAll", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JPopupMenu$Separator" ) {
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" fill-rule="evenodd" d="M11,14 L11,11 L5,11 L5,14 L2,14 L2,2 L14,2 L14,14 L11,14 Z M4,4 L4,8 L12,8 L12,4 L4,4 Z M6,12 L10,12 L10,14 L6,14 L6,12 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 409 B |
Reference in New Issue
Block a user