Search in sources :

Example 1 with EmptyIcon

use of com.intellij.util.ui.EmptyIcon in project intellij-community by JetBrains.

the class GtkMenuItemUI method update.

@Override
public void update(final Graphics g, final JComponent c) {
    myHiddenItem.setSelected(menuItem.isSelected());
    if (UIUtil.isMurrineBasedTheme()) {
        acceleratorFont = menuItem.getFont();
        SynthContext context = myOriginalUI.getContext(menuItem);
        Color fg = context.getStyle().getColor(context, ColorType.TEXT_FOREGROUND);
        acceleratorForeground = UIUtil.mix(fg, menuItem.getBackground(), menuItem.isSelected() ? 0.4 : 0.2);
        disabledForeground = fg;
    }
    if (checkIcon != null && !(checkIcon instanceof IconWrapper) && !(checkIcon instanceof EmptyIcon)) {
        checkIcon = new IconWrapper(checkIcon, myOriginalUI);
    }
    super.update(g, c);
}
Also used : SynthContext(javax.swing.plaf.synth.SynthContext) EmptyIcon(com.intellij.util.ui.EmptyIcon)

Aggregations

EmptyIcon (com.intellij.util.ui.EmptyIcon)1 SynthContext (javax.swing.plaf.synth.SynthContext)1