From 3e8e62afe2a7b2f18ff86d1857e4378f3efbaa3c Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Tue, 1 Sep 2015 15:43:14 +0300 Subject: [PATCH] IDEA-140057 Pin/unpin buttons of the "Quick Documentation/Definition" popup are too different and thus very confusing --- platform/icons/src/general/autohideOffPressed.png | Bin 0 -> 383 bytes .../icons/src/general/autohideOffPressed@2x.png | Bin 0 -> 624 bytes .../src/general/autohideOffPressed@2x_dark.png | Bin 0 -> 658 bytes .../icons/src/general/autohideOffPressed_dark.png | Bin 0 -> 404 bytes .../documentation/DockablePopupManager.java | 7 +++++-- .../documentation/DocumentationManager.java | 14 ++++++++++---- .../src/com/intellij/ui/popup/AbstractPopup.java | 3 ++- .../util/src/com/intellij/icons/AllIcons.java | 1 + 8 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 platform/icons/src/general/autohideOffPressed.png create mode 100644 platform/icons/src/general/autohideOffPressed@2x.png create mode 100644 platform/icons/src/general/autohideOffPressed@2x_dark.png create mode 100644 platform/icons/src/general/autohideOffPressed_dark.png diff --git a/platform/icons/src/general/autohideOffPressed.png b/platform/icons/src/general/autohideOffPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..a29d6ad6d6632f5bbb5f70cdd4c272b21ee0f666 GIT binary patch literal 383 zcmV-_0f7FAP)@w?hV6O#j_y{rbJP6TvgQv@)ZQZR0y2s`E8OU2U(U~0z)*LABi?EC(H7=}lvY8}`MGDEHjkK=esZ9&iPI>V}}GJN=urs+k4 zQnfQwdxEyyw6p2e3Qf}(usN#y#QO?)wQYNod%1a@w+rkEl|SOgoioO4MNw9`;1+cp zXA6~2s4eLEA=d_>RRHvv(51FaFxXyi_%Bq*mTu7Pe>*F>!lIAOQG0B*x5r2zDocW| dCZ)Zaz5x%gjF;6fl6L?A002ovPDHLkV1mI@t_}bI literal 0 HcmV?d00001 diff --git a/platform/icons/src/general/autohideOffPressed@2x.png b/platform/icons/src/general/autohideOffPressed@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d300e20602f8905a76bc604a9847ac40ff83e8c7 GIT binary patch literal 624 zcmV-$0+0QPP)5M#LLl@dmYtZmVb!wJ3t_1o;bspq8~4 zmzBGg8boEAR@!@NMh=sc8s<612rpxT%){q*zB$e4bYCw$Vn>{a$XT3{O<%9q8(4uu zs4{|N{nX1JSP=_nu~G#k)4Cr!{*3SGwZ2$4%R(<>c~M)l5ADxJghI3OdBi@iiN8qLb9 zALzUSO;RzLOha63egr`n#Ud)vGnQ(PDt>`QQ546x*sal69B-vcHx?rLbrRqeF1D9S zti$0LQT8+$d0cGZ)v(PLB4+eFQ*bLRg3mYXxphjY@A}9^dp15dnnTnkG*X2W3LZS=NVvJ)mO~`0000< KMNUMnLSTXk9T&&| literal 0 HcmV?d00001 diff --git a/platform/icons/src/general/autohideOffPressed@2x_dark.png b/platform/icons/src/general/autohideOffPressed@2x_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..de4c6f48d2cd80a90ccd3a6797751cbb5754bcbc GIT binary patch literal 658 zcmV;D0&V??P)|Xi0bW5YWpW%fA7Zv<*Jm-9$_Zu2|za$VN5GsgC%0k83B+X{Cjb$i= z@`GWmEj_+40Wl7trYy!;+azmkmjR7f63vxIJLPK1gL4kR18~p47K>%MR;xYve7;y; zfUQ=mtsb+Y&I|Da=GI`Ah2F8m#>7-U6jY)ft^mLN3Yi}*L`V@*q?(kaovTCG+G&|91Ya2<7kZcUG#fpKiv?RF>L zd%fOOCwZL%Xbi~ija)9*P_g-87)FcDM9x^EJf0j5 zhg+l3%u%shBeBI|@tnquJ$h1*q6w^07*#a+Y7yIP$32zzbnNYebvP<`5P9 z9hM8X+r0u4;_e4~-`@jwilyQ|oru`(!6IY32aAmD9xO6;@E~OX{#W3BdZ0bl4@U-S s;>cjM-wtJl*;B99%_y64s*ktPTwuKsoA{!1e6YK>GDr0Ms4EFW) z4O_Hm(LDzT2mg?ekZ7tI48ra0?UPrmSn&;r|JKyhv{1$1S+iyxDK0MV=;`TMy>jKs z{~*Ibz98FRCnu+X^z`)XhK7cj%a$$sQdd_uA7uFQ<;%ZXTU+~*Y;ay)UQu&%b3f2k z;Y*h;{QwMxb!}~JYe9w=6&1CBf@Q&i1vf}G*v!n#8yHy+ySuxWfD8p1_!&e4T|RB* z%$fUPz9B0pfWT+Tk|j@p;rSit+BHCze@seBN~1WrWoBmP0A2cS@#4i#y1Kd+d3bn) zn3$M&QDiX8(B$Og3@a-uA5gFW!@P&03<638Kttby426k-4A08S$|KugY=%-LOM?te yO-;?9TUkM>!89v2saeolAQ$x1u9{>(RTBV$GUd}8xYF1F0000 { final Rectangle rectangle = WindowManager.getInstance().getIdeFrame(myProject).suggestChildFrameBounds(); myToolWindow.setDefaultState(ToolWindowAnchor.RIGHT, ToolWindowType.FLOATING, rectangle); + + ((ToolWindowEx)myToolWindow).setTitleActions(createRestorePopupAction()); final ContentManager contentManager = myToolWindow.getContentManager(); final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); @@ -152,12 +155,12 @@ public abstract class DockablePopupManager { restartAutoUpdate(state); } }; - return new AnAction[]{toggleAutoUpdateAction, createRestorePopupAction()}; + return new AnAction[]{toggleAutoUpdateAction}; } @NotNull protected AnAction createRestorePopupAction() { - return new AnAction("Restore Popup", getRestorePopupDescription(), AllIcons.Actions.Cancel) { + return new AnAction("Restore Popup", getRestorePopupDescription(), AllIcons.General.AutohideOffPressed) { @Override public void actionPerformed(AnActionEvent e) { restorePopupBehavior(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationManager.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationManager.java index f45bad48d7e5..b66fef3777eb 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationManager.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationManager.java @@ -107,6 +107,8 @@ public class DocumentationManager extends DockablePopupManager