Java Code Examples for com.intellij.util.ui.UIUtil#isMurrineBasedTheme()

The following examples show how to use com.intellij.util.ui.UIUtil#isMurrineBasedTheme() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GtkMenuItemUI.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public void update(final Graphics g, final JComponent c) {
  myHiddenItem.setSelected(menuItem.isSelected());

  if (UIUtil.isMurrineBasedTheme()) {
    acceleratorFont = menuItem.getFont();
    final Color fg = GtkPaintingUtil.getForeground(myOriginalUI, menuItem);
    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);
}
 
Example 2
Source File: GtkMenuUI.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected void paintText(final Graphics g, final JMenuItem menuItem, final Rectangle textRect, final String text) {
  if (!menuItem.isEnabled() && UIUtil.isMurrineBasedTheme()) {
    GtkPaintingUtil.paintDisabledText(myOriginalUI, g, menuItem, textRect, text);
    return;
  }
  super.paintText(g, menuItem, textRect, text);
}
 
Example 3
Source File: GtkMenuItemUI.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected void paintText(final Graphics g, final JMenuItem menuItem, final Rectangle textRect, final String text) {
  if (!menuItem.isEnabled() && UIUtil.isMurrineBasedTheme()) {
    GtkPaintingUtil.paintDisabledText(myOriginalUI, g, menuItem, textRect, text);
    return;
  }
  super.paintText(g, menuItem, textRect, text);
}