mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
support multi-resolution images in disabled icons on Java 9+ (e.g. @2x icons on macOS) (issue #70)
This commit is contained in:
@@ -101,6 +101,7 @@ class MoreComponentsPanel
|
||||
JButton button7 = new JButton();
|
||||
JButton button8 = new JButton();
|
||||
JToggleButton toggleButton6 = new JToggleButton();
|
||||
JButton button1 = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
@@ -380,6 +381,11 @@ class MoreComponentsPanel
|
||||
toggleButton6.setIcon(UIManager.getIcon("Tree.leafIcon"));
|
||||
toggleButton6.setSelected(true);
|
||||
toolBar1.add(toggleButton6);
|
||||
|
||||
//---- button1 ----
|
||||
button1.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/demo/icons/intellij-showWriteAccess.png")));
|
||||
button1.setEnabled(false);
|
||||
toolBar1.add(button1);
|
||||
}
|
||||
add(toolBar1, "cell 1 10 3 1,growx");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -355,6 +355,11 @@ new FormModel {
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.leafIcon" )
|
||||
"selected": true
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/demo/icons/intellij-showWriteAccess.png" )
|
||||
"enabled": false
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 10 3 1,growx"
|
||||
} )
|
||||
|
||||
Reference in New Issue
Block a user