new ui: hide toolwindow action by default (instead of hide side)

This commit is contained in:
Alexey Pegov
2011-11-29 12:32:28 +04:00
parent eca4788211
commit 363367b247
4 changed files with 13 additions and 8 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -123,27 +123,27 @@ public abstract class ToolWindowHeader extends JPanel implements Disposable {
eastPanel.add(Box.createHorizontalStrut(3));
myHideButton = new ActionButton(new HideSideAction() {
@Override
public void actionPerformed(AnActionEvent e) {
sideHidden();
}
}, new HideAction() {
myHideButton = new ActionButton(new HideAction() {
@Override
public void actionPerformed(AnActionEvent e) {
hideToolWindow();
}
}, new HideSideAction() {
@Override
public void actionPerformed(AnActionEvent e) {
sideHidden();
}
},
ourHideLeftSideIcon, null, null
) {
@Override
protected Icon getActiveIcon() {
return getHideIcon(myToolWindow);
return getHideToolWindowIcon(myToolWindow);
}
@Override
protected Icon getAlternativeIcon() {
return getHideToolWindowIcon(myToolWindow);
return getHideIcon(myToolWindow);
}
};
@@ -455,6 +455,11 @@ public abstract class ToolWindowHeader extends JPanel implements Disposable {
if (shortcutForAction.length() > 0) {
text += " " + shortcutForAction;
}
if (action instanceof HideAction) {
text += String.format(" (Click with %s to Hide Side)", KeymapUtil.getShortcutText(KeyboardShortcut.fromString("pressed ALT")));
}
return text;
}