mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Quaqua LnF bundled.
This commit is contained in:
Binary file not shown.
@@ -40,7 +40,7 @@
|
||||
<key>Java</key>
|
||||
<dict>
|
||||
<key>ClassPath</key>
|
||||
<string>$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</string>
|
||||
<string>$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</string>
|
||||
<key>JVMVersion</key>
|
||||
<string>1.5+</string>
|
||||
<key>MainClass</key>
|
||||
|
||||
Binary file not shown.
@@ -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);
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user