new-style close button
authorDennis Ushakov <dennis.ushakov@gmail.com>
Thu, 26 Jan 2012 18:08:54 +0000 (22:08 +0400)
committerDennis Ushakov <dennis.ushakov@gmail.com>
Thu, 26 Jan 2012 18:10:49 +0000 (22:10 +0400)
platform/lang-impl/src/com/intellij/execution/ui/layout/actions/CloseViewAction.java

index 98bfe91eecfef968d5c85a7b35a74ebc9684eaaf..cb18ab9d58400f59fd0a78b363925dc5d88d3369 100644 (file)
@@ -19,11 +19,19 @@ package com.intellij.execution.ui.layout.actions;
 import com.intellij.execution.ui.actions.BaseViewAction;
 import com.intellij.execution.ui.layout.ViewContext;
 import com.intellij.openapi.actionSystem.AnActionEvent;
+import com.intellij.openapi.util.IconLoader;
 import com.intellij.ui.content.Content;
 
+import javax.swing.*;
+
 public class CloseViewAction extends BaseViewAction {
+  private static final Icon ICON = IconLoader.getIcon("/actions/closeNew.png");
+  private static final Icon HOVERED_ICON = IconLoader.getIcon("/actions/closeNewHovered.png");
+
   protected void update(final AnActionEvent e, final ViewContext context, final Content[] content) {
     setEnabled(e, isEnabled(context, content, e.getPlace()));
+    e.getPresentation().setIcon(ICON);
+    e.getPresentation().setHoveredIcon(HOVERED_ICON);
   }
 
   protected void actionPerformed(final AnActionEvent e, final ViewContext context, final Content[] content) {