UI fixes for GTK+ look and feel in changes view

This commit is contained in:
Oleg Shpynov
2010-09-28 16:49:29 +04:00
parent 8fd7886169
commit 2516f1b404
2 changed files with 6 additions and 1 deletions
@@ -91,7 +91,7 @@ public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent imp
setIcon(null);
}
if (UIUtil.isUnderNimbusLookAndFeel() && selected && hasFocus) {
if (UIUtil.isUnderGTKLookAndFeel() || UIUtil.isUnderNimbusLookAndFeel() && selected && hasFocus) {
super.setOpaque(false); // avoid erasing Nimbus focus frame
super.setIconOpaque(false);
}
@@ -577,6 +577,11 @@ public class UIUtil {
return UIManager.getLookAndFeel().getName().contains("Mac OS X");
}
@SuppressWarnings({"HardCodedStringLiteral"})
public static boolean isUnderGTKLookAndFeel() {
return UIManager.getLookAndFeel().getName().contains("GTK");
}
public static boolean isFullRowSelectionLAF() {
return isUnderNimbusLookAndFeel() || isUnderQuaquaLookAndFeel();
}