diff --git a/src/studio/ui/StudioWindow.java b/src/studio/ui/StudioWindow.java index b789d9a0..d59679ca 100755 --- a/src/studio/ui/StudioWindow.java +++ b/src/studio/ui/StudioWindow.java @@ -711,7 +711,6 @@ private void initActions() { editor.setLineEnding(lineEnding); refreshActionState(); } ); - action.removeIcon(); lineEndingActions[lineEnding.ordinal()] = action; } @@ -852,6 +851,9 @@ private void addToMenu(JMenu menu, Action... actions) { if (action == null) { menu.addSeparator(); } else { + if (action.getValue(Action.SMALL_ICON) == null) { + action.putValue(Action.SMALL_ICON, Util.BLANK_ICON); + } menu.add(action); } } diff --git a/src/studio/ui/UserAction.java b/src/studio/ui/UserAction.java index 308baeee..96b44309 100755 --- a/src/studio/ui/UserAction.java +++ b/src/studio/ui/UserAction.java @@ -16,10 +16,6 @@ public UserAction(String text, putValue(ACCELERATOR_KEY,key); } - public void removeIcon() { - putValue(SMALL_ICON, null); - } - public String getText() { return (String)getValue(NAME); } @@ -46,16 +42,16 @@ public void setSelected(boolean value) { public static UserAction create(String text, String desc, int mnemonic, KeyStroke key, ActionListener listener) { - return create(text, Util.BLANK_ICON, desc, mnemonic, key, listener); + return create(text, null, desc, mnemonic, key, listener); } public static UserAction create(String text, String desc, int mnemonic, ActionListener listener) { - return create(text, Util.BLANK_ICON, desc, mnemonic, null, listener); + return create(text, null, desc, mnemonic, null, listener); } public static UserAction create(String text, ActionListener listener) { - return create(text, Util.BLANK_ICON, null, 0, null, listener); + return create(text, null, null, 0, null, listener); } }