mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
wow, the 1x and 2x icons are gone?
This commit is contained in:
@@ -58,9 +58,7 @@ import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.Action;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBoxMenuItem;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JMenu;
|
||||
@@ -622,28 +620,28 @@ public class Toolkit {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a JButton with an icon, and set its disabled and pressed images
|
||||
* to be the same image, so that 2x versions of the icon work properly.
|
||||
*/
|
||||
static public JButton createIconButton(String title, String base) {
|
||||
ImageIcon icon = Toolkit.getLibIconX(base);
|
||||
return createIconButton(title, icon);
|
||||
}
|
||||
|
||||
|
||||
/** Same as above, but with no text title (follows JButton constructor) */
|
||||
static public JButton createIconButton(String base) {
|
||||
return createIconButton(null, base);
|
||||
}
|
||||
|
||||
|
||||
static public JButton createIconButton(String title, Icon icon) {
|
||||
JButton button = new JButton(title, icon);
|
||||
button.setDisabledIcon(icon);
|
||||
button.setPressedIcon(icon);
|
||||
return button;
|
||||
}
|
||||
// /**
|
||||
// * Create a JButton with an icon, and set its disabled and pressed images
|
||||
// * to be the same image, so that 2x versions of the icon work properly.
|
||||
// */
|
||||
// static public JButton createIconButton(String title, String base) {
|
||||
// ImageIcon icon = Toolkit.getLibIconX(base);
|
||||
// return createIconButton(title, icon);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /** Same as above, but with no text title (follows JButton constructor) */
|
||||
// static public JButton createIconButton(String base) {
|
||||
// return createIconButton(null, base);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// static public JButton createIconButton(String title, Icon icon) {
|
||||
// JButton button = new JButton(title, icon);
|
||||
// button.setDisabledIcon(icon);
|
||||
// button.setPressedIcon(icon);
|
||||
// return button;
|
||||
// }
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
Reference in New Issue
Block a user