diff --git a/bin/libquaqua.jnilib b/bin/libquaqua.jnilib
new file mode 100644
index 000000000000..4c552def8d3e
Binary files /dev/null and b/bin/libquaqua.jnilib differ
diff --git a/build/mac/Info.plist b/build/mac/Info.plist
index 828f0a53a38c..32b52bbaffcf 100644
--- a/build/mac/Info.plist
+++ b/build/mac/Info.plist
@@ -40,7 +40,7 @@
Java
ClassPath
- $APP_PACKAGE/lib/extensions.jar:$APP_PACKAGE/lib/openapi.jar:$APP_PACKAGE/lib/idea.jar:$APP_PACKAGE/lib/jdom.jar:$APP_PACKAGE/lib/log4j.jar
+ $APP_PACKAGE/lib/extensions.jar:$APP_PACKAGE/lib/openapi.jar:$APP_PACKAGE/lib/idea.jar:$APP_PACKAGE/lib/jdom.jar:$APP_PACKAGE/lib/log4j.jar:/System/Library/Java
JVMVersion
1.5+
MainClass
diff --git a/lib/quaqua.jar b/lib/quaqua.jar
new file mode 100644
index 000000000000..03b283bfcd9c
Binary files /dev/null and b/lib/quaqua.jar differ
diff --git a/openapi/src/com/intellij/ui/ColoredTreeCellRenderer.java b/openapi/src/com/intellij/ui/ColoredTreeCellRenderer.java
index 183fa9e5130a..1c3640ed4538 100644
--- a/openapi/src/com/intellij/ui/ColoredTreeCellRenderer.java
+++ b/openapi/src/com/intellij/ui/ColoredTreeCellRenderer.java
@@ -52,15 +52,25 @@ public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent imp
// We paint background if and only if tree path is selected and tree has focus.
// If path is selected and tree is not focused then we just paint focused border.
- if(selected){
- setPaintFocusBorder(true);
- if(myFocused){
+ if (UIUtil.isUnderQuaquaLookAndFeel()) {
+ if (selected) {
setBackground(UIUtil.getTreeSelectionBackground());
+ }
+ else {
+ setBackground(null);
+ }
+ }
+ else {
+ if(selected){
+ setPaintFocusBorder(true);
+ if(myFocused){
+ setBackground(UIUtil.getTreeSelectionBackground());
+ }else{
+ setBackground(null);
+ }
}else{
setBackground(null);
}
- }else{
- setBackground(null);
}
customizeCellRenderer(tree,value,selected,expanded,leaf,row,hasFocus);
diff --git a/openapi/src/com/intellij/ui/SimpleColoredComponent.java b/openapi/src/com/intellij/ui/SimpleColoredComponent.java
index ca134bba87be..43e0c799e163 100644
--- a/openapi/src/com/intellij/ui/SimpleColoredComponent.java
+++ b/openapi/src/com/intellij/ui/SimpleColoredComponent.java
@@ -224,7 +224,7 @@ public class SimpleColoredComponent extends JComponent {
if(myIcon!=null){
final Container parent = getParent();
final Color iconBackgroundColor;
- if(parent!=null && !myFocusBorderAroundIcon){
+ if(parent!=null && !myFocusBorderAroundIcon && !UIUtil.isUnderQuaquaLookAndFeel()){
iconBackgroundColor=parent.getBackground();
}
else{
diff --git a/source/com/intellij/idea/IdeaApplication.java b/source/com/intellij/idea/IdeaApplication.java
index b9889b4ae8c8..adbd575b06d4 100644
--- a/source/com/intellij/idea/IdeaApplication.java
+++ b/source/com/intellij/idea/IdeaApplication.java
@@ -92,6 +92,11 @@ public class IdeaApplication {
UIManager.installLookAndFeel(AlloyBedouin.NAME, AlloyBedouin.class.getName());
UIManager.installLookAndFeel(AlloyAcid.NAME, AlloyAcid.class.getName());
UIManager.installLookAndFeel(AlloyGlass.NAME, AlloyGlass.class.getName());
+
+ if (SystemInfo.isMac) {
+ UIManager.put("Panel.opaque", Boolean.TRUE);
+ UIManager.installLookAndFeel("Quaqua", "ch.randelshofer.quaqua.QuaquaLookAndFeel");
+ }
}
private class IdeStarter implements ApplicationStarter {
diff --git a/ui/impl/com/intellij/ide/ui/LafManager.java b/ui/impl/com/intellij/ide/ui/LafManager.java
index d90182cc137e..c4e1c4e1ef84 100644
--- a/ui/impl/com/intellij/ide/ui/LafManager.java
+++ b/ui/impl/com/intellij/ide/ui/LafManager.java
@@ -2,6 +2,8 @@ package com.intellij.ide.ui;
import com.incors.plaf.alloy.AlloyBedouin;
import com.incors.plaf.alloy.AlloyIdea;
+import com.intellij.CommonBundle;
+import com.intellij.ide.IdeBundle;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.diagnostic.Logger;
@@ -13,8 +15,6 @@ import com.intellij.openapi.util.SystemInfo;
import com.intellij.ui.IdeaBlueMetalTheme;
import com.intellij.ui.SideBorder2;
import com.intellij.ui.plaf.beg.*;
-import com.intellij.ide.IdeBundle;
-import com.intellij.CommonBundle;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
@@ -177,6 +177,11 @@ public final class LafManager implements ApplicationComponent,JDOMExternalizable
return "Mac OS X".equals(getCurrentLookAndFeel().getName());
}
+ public boolean isUnderQuaquaLookAndFeel() {
+ //noinspection HardCodedStringLiteral
+ return "Quaqua".equals(getCurrentLookAndFeel().getName());
+ }
+
/**
* @return default LookAndFeelInfo for the running OS. For Win32 and
* Linux the method returns Alloy LAF or IDEA LAF if first not found, for Mac OS X it returns Aqua
diff --git a/util/src/com/intellij/util/ui/UIUtil.java b/util/src/com/intellij/util/ui/UIUtil.java
index c8857482885e..d1ec828c9457 100644
--- a/util/src/com/intellij/util/ui/UIUtil.java
+++ b/util/src/com/intellij/util/ui/UIUtil.java
@@ -491,6 +491,11 @@ public class UIUtil {
return UIManager.getColor("TextArea.foreground");
}
+ @SuppressWarnings({"HardCodedStringLiteral"})
+ public static boolean isUnderQuaquaLookAndFeel() {
+ return UIManager.getLookAndFeel().getName().indexOf("Quaqua") >= 0;
+ }
+
public static boolean isControlKeyDown(MouseEvent mouseEvent) {
return SystemInfo.isMac ? mouseEvent.isMetaDown() : mouseEvent.isControlDown();
}