mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[gtw] Ability to disable icons in list
GitOrigin-RevId: 2fba168dbf71869ce22838afa9330c2a12a38b29
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e1618ce0b5
commit
25f4c50e95
@@ -71,6 +71,7 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
* @see JBPopupFactory#guessBestPopupLocation(Editor)
|
||||
*/
|
||||
public static final Key<Point> ANCHOR_POPUP_POINT = Key.create("popup.anchor.point");
|
||||
public static final Key<Boolean> DISABLE_ICON_IN_LIST = Key.create("popup.disable.icon.in.list");
|
||||
|
||||
private static final Logger LOG = Logger.getInstance(PopupFactoryImpl.class);
|
||||
|
||||
@@ -686,7 +687,9 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
}
|
||||
|
||||
if (icon == null) icon = selectedIcon != null ? selectedIcon : EmptyIcon.create(myMaxIconWidth, myMaxIconHeight);
|
||||
myIcon = icon;
|
||||
boolean disableIcon = Boolean.TRUE.equals(presentation.getClientProperty(DISABLE_ICON_IN_LIST));
|
||||
|
||||
myIcon = disableIcon ? null : icon;
|
||||
mySelectedIcon = selectedIcon;
|
||||
myText = presentation.getText();
|
||||
}
|
||||
@@ -816,7 +819,10 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
}
|
||||
|
||||
if (icon == null) icon = selectedIcon != null ? selectedIcon : EmptyIcon.create(myMaxIconWidth, myMaxIconHeight);
|
||||
myIcon = icon;
|
||||
|
||||
boolean disableIcon = Boolean.TRUE.equals(presentation.getClientProperty(DISABLE_ICON_IN_LIST));
|
||||
|
||||
myIcon = disableIcon ? null : icon;
|
||||
mySelectedIcon = selectedIcon;
|
||||
|
||||
myValue = presentation.getClientProperty(Presentation.PROP_VALUE);
|
||||
|
||||
Reference in New Issue
Block a user