mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ExpUI: use 16x16 icons in Tool Window Switcher
GitOrigin-RevId: 9c8bef87b2a89a146768297226956d98974e10e5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
889d72b732
commit
d15bf8a552
@@ -12,6 +12,7 @@ import com.intellij.openapi.ui.popup.IPopupChooserBuilder;
|
||||
import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.ScalableIcon;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
@@ -146,7 +147,11 @@ public class ToolwindowSwitcher extends DumbAwareAction {
|
||||
UIUtil.setBackgroundRecursively(myPanel, UIUtil.getListBackground(isSelected, true));
|
||||
myTextLabel.clear();
|
||||
myTextLabel.append(value.getStripeTitle());
|
||||
myTextLabel.setIcon(ObjectUtils.notNull(value.getIcon(), EmptyIcon.ICON_13));
|
||||
Icon icon = value.getIcon();
|
||||
if (icon instanceof ScalableIcon) {
|
||||
icon = ((ScalableIcon)icon).scale(16f / icon.getIconWidth());
|
||||
}
|
||||
myTextLabel.setIcon(ObjectUtils.notNull(icon, EmptyIcon.ICON_16));
|
||||
myTextLabel.setForeground(UIUtil.getListForeground(isSelected, true));
|
||||
myTextLabel.setBackground(UIUtil.getListBackground(isSelected, true));
|
||||
String activateActionId = ActivateToolWindowAction.getActionIdForToolWindow(value.getId());
|
||||
|
||||
Reference in New Issue
Block a user