Giter Club home page Giter Club logo

darcula's Introduction

Darcula Theme

The official Darcula Look and Feel for programming environments by Konstantin Bulenkov.

Darcula is a Look-n-Feel for Java desktop application and a theme for code editors. This repository focused mainly on Java look-n-feel and contains ready to use library here https://github.com/bulenkov/Darcula/blob/master/build/darcula.jar

Darcula Look-n-Feel is licensed under Apache 2.0 license and can be used in commercial products free of charge. However, I strongly ask you to use original theme name "Darcula" in your product. Links to this project from your products or a simple mention are very welcome, but not necessary.

List of projects with Darcula theme:

  1. JetBrains IDEs: IntelliJ IDEA, PyCharm, PhpStorm, WebStorm, AppCode, DataGrip, RubyMine, Gogland, Rider, CLion
  2. Google Android Studio
  3. NetBeans
  4. jAlbum
  5. Mapollage
  6. Jotasync
  7. Apache JMeter

Please send me your project to add here

Resources about how to create your own look and feel can be found at Oracle's official website: http://docs.oracle.com/javase/tutorial/uiswing/index.html

darcula's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

darcula's Issues

Javascript Global Variable

Could be nice to take advantage of it just like the default theme "Netbeans" theme does.
At the moment the global var has the same color of a local var.
I've personalized darcula with #C4BE95 for JS global variables. Could be the default or something like that. Its not too much far from white and not too different from orange.

JTree rendering is off

See image - the tree is cropped and too little indentation
darculajtree

Obtained by this code

package Tools.DarkculaTest;

import com.bulenkov.darcula.DarculaLaf;

import javax.swing.;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import java.awt.
;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class DarkculaTest extends JFrame
implements ActionListener
{
public DarkculaTest() throws HeadlessException
{
JTree jTree = new JTree();
Container contentPane = this.getContentPane();
contentPane.setLayout(new BorderLayout());
contentPane.add(jTree, BorderLayout.CENTER);
this.setSize(200, 300);
CustomTreeNode root = new CustomTreeNode(0);
jTree.setModel(new DefaultTreeModel(root));

    JButton lookAndFeelSwitchButton = new JButton("Switch lookAndFeel");
    lookAndFeelSwitchButton.addActionListener(this);
    contentPane.add(lookAndFeelSwitchButton, BorderLayout.SOUTH);
}

public void actionPerformed(ActionEvent actionEvent)
{
    switchLookAndFeel();
    SwingUtilities.updateComponentTreeUI(this);
}

private class CustomTreeNode extends DefaultMutableTreeNode
{
    boolean areChildrenDefined = false;
    int level;

    private final int [] counts = new int []{5,7,4,7};

    public CustomTreeNode(int level)
    {
        this.level = level;
    }

    public int getChildCount()
    {
        if(level == 4)
            return 0;

        if (!areChildrenDefined)
            defineChildNodes();

        return (super.getChildCount());
    }

    private void defineChildNodes()
    {
        areChildrenDefined = true;

        for(int index = 0; index < counts[level]; index++)
            add(new CustomTreeNode(level+1));
    }

}

static boolean darculaOn = false;
public static void main(String[] args)
{
    switchLookAndFeel();
    new DarkculaTest().setVisible(true);
}

private static void switchLookAndFeel()
{
    try
    {
        if(darculaOn)
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        else
            UIManager.setLookAndFeel(new DarculaLaf());

        darculaOn = !darculaOn;
    }
    catch (Exception e)
    {
        System.out.println("Unable to set look and feel");
    }
}

}

Java 9 : illegal reflective access

Hello,
When using Darcula LAF under java 9, we get those warnings:

`WARNING: Illegal reflective access by com.bulenkov.darcula.DarculaLaf (file:/data/jmeter/workspace/jmeter_trunk/lib/darcula.jar) to field javax.swing.text.html.HTMLEditorKit.DEFAULT_STYLES_KEY

WARNING: Illegal reflective access by com.bulenkov.iconloader.util.UIUtil (file:/data/jmeter/workspace/jmeter_trunk/lib/darcula.jar) to field sun.awt.CGraphicsDevice.scale
`

I didn't find it reported so I thought you might be interested.

Regards

MCC views doesn't work at Dracula Theme

using Dracula theme pluguin (Version: 1.6);

After start mcc (mplab code configurator), the tabs don't show anything, moving the mouse over it, something appear. After this, some menus doesn't work well.

Product Version: MPLAB X IDE v6.05
Java: 1.8.0_345; OpenJDK 64-Bit Server VM 25.345-b01
Runtime: OpenJDK Runtime Environment 1.8.0_345-b01

Support dark title bars on macOS Mojava 10.14

The Darcula theme is cool.
Is there a simple way to support dark title on new macOS dark mode?
I know IntelliJ IDEA use special setting (Appearance -> "Use dark window header" ) to support the feature.
Hope built-in Darcula theme can support the feature. I hope the Darcula theme will be more professional and simple to configure. :)
Maybe useful links:
http://www.java2s.com/Tutorials/Java/Swing_How_to/JFrame/Change_the_color_of_titlebar_in_JFrame.htm
https://bugs.openjdk.java.net/browse/JDK-8181910

ScrollBars L&F on OS X

The current version of IntelliJ IDEA (2016.3) seems to have much nicer scrollbars than Dracula (round, like in the OS and not rectangular, disappearing when not used, ...). Is there some trick to it or does Darcula simply need to be patched somehow?

JButton padding

Hi!

is it possible to configure Darcula to use smaller left/right padding in JButton when using icon-only buttons. I'm getting this in IntelliJ:

buttons-darcula

versus the LaF I'm using outside of IntelliJ:

buttons-submin

Perhaps using client-properties? Mixing LaFs unfortunately is not really possible in Swing.

Linux: NullPointerException in iconloader library

When trying to run the SwingSet2 demo on Ubuntu Linux with Oracle JDK I get the following exception:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.bulenkov.iconloader.IconLoader.<clinit>(IconLoader.java:53)
	at com.bulenkov.darcula.DarculaLaf.getDefaults(DarculaLaf.java:97)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:539)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:583)
	at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349)
	at javax.swing.UIManager.initialize(UIManager.java:1459)
	at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
	at javax.swing.UIManager.getUI(UIManager.java:1006)
	at javax.swing.JPanel.updateUI(JPanel.java:126)
	at javax.swing.JPanel.<init>(JPanel.java:86)
	at javax.swing.JPanel.<init>(JPanel.java:109)
	at javax.swing.JPanel.<init>(JPanel.java:117)
	at SwingSet2.<init>(SwingSet2.java:182)
	at SwingSet2.main(SwingSet2.java:245)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.NullPointerException
	at com.bulenkov.iconloader.util.UIUtil.initSystemFontData(UIUtil.java:254)
	at com.bulenkov.iconloader.util.JBUI.calculateScaleFactor(JBUI.java:47)
	at com.bulenkov.iconloader.util.JBUI.<clinit>(JBUI.java:33)
	... 19 more

JDK:

java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Get NPE in Tree when using webstart

java.lang.NullPointerException
at com.bulenkov.iconloader.IconLoader$CachedImageIcon.getRealIcon(IconLoader.java:472)
at com.bulenkov.iconloader.IconLoader$CachedImageIcon.getIconWidth(IconLoader.java:498)
at javax.swing.plaf.IconUIResource.getIconWidth(Unknown Source)
at com.bulenkov.darcula.DarculaUIUtil.getTreeNodeIcon(DarculaUIUtil.java:147)
at com.bulenkov.darcula.ui.DarculaTreeUI.paintExpandControl(DarculaTreeUI.java:417)
at javax.swing.plaf.basic.BasicTreeUI.paint(Unknown Source)
at com.bulenkov.darcula.ui.DarculaTreeUI.paint(DarculaTreeUI.java:371)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Window.paint(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1200(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Sou

ToggleButton when toggled creates a strange dark square around the text

The black square remains even after toggling to the off state, and persists until restarted. The button's toggled state is also a strange colour.

The text of disabled buttons also look strange (not clean), but I cannot tell if this is how they were planned to look or not.

toggled to ON state:
The toggle button is "M", Disabled button is "next node", and the finally the "delete" button is a button in its normal state.
buttonbehaviourdarcula

Here is the application after toggling to OFF state:
buttonbehaviour2darcula

Not working with Java 9

When trying to use Darcula on Java 9, I get the following exception:

java.lang.IllegalAccessError: class com.bulenkov.darcula.DarculaLaf (in unnamed module @0x62e7f11d) cannot access class sun.awt.AppContext (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @0x62e7f11d
at com.bulenkov.darcula.DarculaLaf.patchStyledEditorKit(DarculaLaf.java:128)
at com.bulenkov.darcula.DarculaLaf.getDefaults(DarculaLaf.java:93)
at javax.swing.UIManager.setLookAndFeel(java.desktop@9-ea/UIManager.java:584)
at javax.swing.UIManager.setLookAndFeel(java.desktop@9-ea/UIManager.java:628)
at se.datadosen.jalbum.JAlbum.main(JAlbum.java:332)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:537)
at se.datadosen.jalbum.Main.main(Main.java:44)

Versioning of Darcula

Hello,
I've discovered today your great LAF and we'd like to use it for Apache JMeter.
There is one little problem we have, it's that you don't have a Maven artifact, I see there is an open issue for it:

Still, it is not a big problem, but one concern I have is versioning.
Would it be possible to manage some versioning of the library as the link below seems to point to master version and not a released version:

Is there a way to have a versioned link and to manage milestones at the project ?

Thanks

Questions: Generalizing? Gradle? Still active/latest?

According to the {HOME}/.IntelliJIdea14/config/options.xml files, using: IntelliJ IDEA 14 RC1 build 139.144, the L&F is:

  <component name="LafManager">
    <laf class-name="com.intellij.ide.ui.laf.darcula.DarculaLaf" />
  </component>

But the class in this repository is: com.bulenkov.darcula.DarculaLaf - so therefore: Is this repository the HEAD? Or have JetBrains made further developments in closed source? If so, could you please open source this pretty please? ;)

Also, in the build/darcula.jar, there's a package: com.intellij.uiDesigner.core, but it is not available in the source - what is this for? Is there any dependency on this package, or is it just metadata (find-in-all-files makes me inclined to guess that the answer is yes...)

Could you possibly make this project use Gradle for building? That would make understanding it all much easier, and would simplify dependency management.

I'd like to create an Intellij plugin that allows developers to create their custom appearance via JSON/CSS only and leave out any Java and compilation... I think this would spark many people to create their custom themes instead of there being 3-4 themes available.

Then I'd like to use this plugin to create my own port of Sublime Text 3 theme: Cyanide which is darker than Darcula.

Thoughts?

java.lang.ArrayIndexOutOfBoundsException

Hello,

When I am using the Netbeans IDE with Darcula L&F when I try to open a Form editor containing a JDateChooser, I get this java.lang.ArrayIndexOutOfBoundsException. Probably the components array at this point is still empty. Maybe you should modify the code of DarculaSpinnerUI.java

@OverRide
protected void replaceEditor(JComponent oldEditor, JComponent newEditor) {
super.replaceEditor(oldEditor, newEditor);
if (oldEditor != null) {
oldEditor.getComponents()[0].removeFocusListener(myFocusListener);
}
if (newEditor != null && (newEditor.getComponents().length > 0)) {
newEditor.getComponents()[0].addFocusListener(myFocusListener);
}
}

Here is the stacktrace:

INFO [org.netbeans.modules.form.BeanSupport]: Cannot create default instance of: ch.skyguide.inch.position.zrh.pagesystem.PageSystem
INFO: 0
java.lang.ArrayIndexOutOfBoundsException: 0
at com.bulenkov.darcula.ui.DarculaSpinnerUI.replaceEditor(DarculaSpinnerUI.java:60)
at javax.swing.plaf.basic.BasicSpinnerUI$Handler.propertyChange(BasicSpinnerUI.java:974)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
at java.awt.Component.firePropertyChange(Component.java:8430)
at javax.swing.JSpinner.setEditor(JSpinner.java:518)
at com.toedter.components.JSpinField.(JSpinField.java:92)
at com.toedter.components.JSpinField.(JSpinField.java:65)
at com.toedter.calendar.JYearChooser.(JYearChooser.java:43)
at com.toedter.calendar.JCalendar.(JCalendar.java:185)
at com.toedter.calendar.JCalendar.(JCalendar.java:95)
at com.toedter.calendar.JDateChooser.(JDateChooser.java:152)
at com.toedter.calendar.JDateChooser.(JDateChooser.java:100)
at ch.skyguide.inch.ui.DateTimePicker.initComponents(DateTimePicker.java:172)
at ch.skyguide.inch.ui.DateTimePicker.(DateTimePicker.java:36)
at ch.skyguide.inch.position.common.mail.MailPage.initComponents(MailPage.java:467)
at ch.skyguide.inch.position.common.mail.MailPage.(MailPage.java:75)
at ch.skyguide.inch.position.zrh.pagesystem.PageSystem.initComponents(PageSystem.java:80)
at ch.skyguide.inch.position.zrh.pagesystem.PageSystem.(PageSystem.java:15)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:178)
at org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:252)
at org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:191)
at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:780)
at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:968)
at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:824)
at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:968)
at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:503)
at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:283)
at org.netbeans.modules.form.FormEditor$2.run(FormEditor.java:352)
at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEventAccess(NbMutexEventProvider.java:138)
at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:98)
at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:94)
at org.openide.util.Mutex.readAccess(Mutex.java:250)
at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:349)
[catch] at org.netbeans.modules.nbform.FormEditorSupport.loadOpeningForm(FormEditorSupport.java:468)
at org.netbeans.modules.nbform.FormDesignerTC.loadForm(FormDesignerTC.java:279)
at org.netbeans.modules.nbform.FormDesignerTC.access$300(FormDesignerTC.java:87)
at org.netbeans.modules.nbform.FormDesignerTC$PreLoadTask$1.run(FormDesignerTC.java:268)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Sub-PopupMenuItem arrow is barely visible

The arrow, that is supposed to appear on the right edge of a popup menu item that has a sub-menu, is only barely visible, when the item is not selected (gray on gray).

Please see the attached screenshots of selected and unselected popup menu items.

grab1

grab2

Crash on Ubuntu 16.04 LTS with openJDK 8

Here is a crash log
http://pastebin.com/ZHJaRvXE

Code example:

public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(new DarculaLaf());
        } catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        }
        LAFgui form = new LAFgui();
        form.setTitle("demo");
        form.pack();
        form.setVisible(true);
}

Null Pointer Exception on Start

SwingSet2 demo with -Dswing.defaultlaf=com.bulenkov.darcula.DarculaLaf on Linux with Java 8 u 222 exits with exception

/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/bin/java -Dswing.defaultlaf=com.bulenkov.darcula.DarculaLaf -javaagent:/home/dimitry/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/191.7479.19/lib/idea_rt.jar=40943:/home/dimitry/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/191.7479.19/bin -Dfile.encoding=UTF-8 -classpath /home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/charsets.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/cldrdata.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/dnsns.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/jaccess.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/localedata.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/nashorn.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/openjsse.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/sunec.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/sunjce_provider.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/sunpkcs11.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/ext/zipfs.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/jce.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/jfr.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/jsse.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/management-agent.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/resources.jar:/home/dimitry/.sdkman/candidates/java/8.0.222-zulu/jre/lib/rt.jar:/home/dimitry/temp/Darcula/out/production/demo:/home/dimitry/temp/Darcula/lib/iconloader.jar:/home/dimitry/temp/Darcula/lib/demo/AnimatedTransitions.jar:/home/dimitry/temp/Darcula/lib/demo/AppFramework.jar:/home/dimitry/temp/Darcula/lib/demo/swing-worker.jar:/home/dimitry/temp/Darcula/lib/demo/swingx.jar:/home/dimitry/temp/Darcula/lib/demo/TimingFramework.jar:/home/dimitry/temp/Darcula/out/production/Darcula:/home/dimitry/temp/Darcula/lib/annotations.jar SwingSet2
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.bulenkov.iconloader.IconLoader.<clinit>(IconLoader.java:53)
	at com.bulenkov.darcula.DarculaLaf.getDefaults(DarculaLaf.java:97)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:539)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:583)
	at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349)
	at javax.swing.UIManager.initialize(UIManager.java:1459)
	at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
	at javax.swing.UIManager.getUI(UIManager.java:1006)
	at javax.swing.JPanel.updateUI(JPanel.java:126)
	at javax.swing.JPanel.<init>(JPanel.java:86)
	at javax.swing.JPanel.<init>(JPanel.java:109)
	at javax.swing.JPanel.<init>(JPanel.java:117)
	at SwingSet2.<init>(SwingSet2.java:182)
	at SwingSet2.main(SwingSet2.java:245)
Caused by: java.lang.NullPointerException
	at com.bulenkov.iconloader.util.UIUtil.initSystemFontData(UIUtil.java:254)
	at com.bulenkov.iconloader.util.JBUI.calculateScaleFactor(JBUI.java:47)
	at com.bulenkov.iconloader.util.JBUI.<clinit>(JBUI.java:33)
	... 14 more

Process finished with exit code 1

It turns out that com.bulenkov.iconloader.util.UIUtil.getLabelFont() returns null and this is not expected.

Could you please give any advice on how to handle this problem?

macOS 10.14.5 : An illegal reflective access operation has occurred

apache-jmeter-5.1.1 $ java -jar bin/ApacheJMeter.jar

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.bulenkov.darcula.DarculaLaf (file:/.../software/opensource/apache-jmeter-5.1.1/lib/darcula.jar) to field javax.swing.text.html.HTMLEditorKit.DEFAULT_STYLES_KEY
WARNING: Please consider reporting this to the maintainers of com.bulenkov.darcula.DarculaLaf
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
$

AdoptOpenJDK 15.0.1.9 - Illegal reflective access

When using "c:\Program Files\AdoptOpenJDK\jdk-15.0.1.9-hotspot\bin\java.exe"

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.bulenkov.darcula.DarculaLaf (file:/D:/mdeweerd/workspace/ZigbeeCardConfigurator/dist/lib/darcula.jar) to field javax
.swing.text.html.HTMLEditorKit.DEFAULT_STYLES_KEY
WARNING: Please consider reporting this to the maintainers of com.bulenkov.darcula.DarculaLaf
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Seems that toolbar buttons dont show they are pushed

I added JButtons to JToolbar and they render but when I click them they dont push in they dont give any visual feedback at all. When I disable darcula the default look and feel shows a button push by greying out the button when its pushed. Is there a trick?

Publish color theme with MIT license

Dear Konstantin,

I created a base16 colour scheme of this theme (see here) and would like to add it to the official list. Unfortunately I can only submit it if the license is at least as permissive as MIT.

My question: Is it okay if I publish just the color scheme and its name with MIT license.

Regards

Matthias

Maven artifact

Do you have plans on having a maven artifact? All my projects run on Maven, and having a manual JAR is a bit of a pain :). If you don't have the time, will you accept a PR with such changes, and deploy it to Maven afterwards?

Thanks!

CPU eating paint loop

I've noticed that when using the Darcula Look&Feel in combination with a JComboBox that's editable (simply call setEditable(true)), then the whole UI gets thrown in a never ending repaint loop, thereby eating precious CPU cycles.

Tested on Mac and Windows. Changing Look and Feel makes it behave again.

To see the bug in action, open jAlbum software (http://jalbum.net), then open Settings->Tiger and watch the CPU meter. Switch to any other tab and the problem is gone.

Black double curly braces in HTML files

AngularJs requires double curly braces. Those are colored black making them very hard to spot.

curlybraces

To get a sensible color I changed Options->Fonts&Colors->Syntax->Languabe HTML->Expression Delimiters foreground from "black" to "Inherited". Guess this should be the default.

Nice work BTW. :)

darcula.css is there any use of it in the PLAF.???

I had tried to customize you plaf and done many changes can you please help me how to reduce the button or the component spacing , is it controlled by ht darcula.css file , if so then how the elements are related.
Please help

Terminal Theme

Would it be possible to get a terminal theme to match operating system terminals to the IDE terminal?

Please clarify license: add copyright notice and include it to the release jar file

Hi, Darcula is nice, and Apache 2.0 is a great license choice, however would you please apply the license consistently to the project?

  1. Apache 2.0 license requires re-distributions to keep copyright notice (which is fine), however your distribution of darcula.jar has NO copyright notice :(

    Would you please add NOTICE file as META-INF/NOTICE to the published jar file?

    Note: NOTICE is a small file that describes the origin (copyright owner, etc). Here's an example: http://www.apache.org/legal/src-headers.html#notice

  2. Current LICENSE.txt contains an appendix which has nothing to do with a license, thus it should probably be removed:

    Darcula/LICENSE.txt

    Lines 178 to 201 in 4977442

    APPENDIX: How to apply the Apache License to your work.
    To apply the Apache License to your work, attach the following
    boilerplate notice, with the fields enclosed by brackets "{}"
    replaced with your own identifying information. (Don't include
    the brackets!) The text should be enclosed in the appropriate
    comment syntax for the file format. We also recommend that a
    file or class name and description of purpose be included on the
    same "printed page" as the copyright notice for easier
    identification within third-party archives.
    Copyright {yyyy} {name of copyright owner}
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    An interesting bit is Copyright {yyyy} {name of copyright owner} (technically speaking the appendix could be just removed from license.txt file)

Directly painting a JProgressBar which has no parent component will throw NPE

If a JProgressBar has no parent component, trying to paint it on a Graphics will throw NullPointerException.

The following code

try
{
    UIManager.setLookAndFeel(DarculaLaf.class.getName());
}catch (Exception e){}

JProgressBar bar=new JProgressBar();
bar.setSize(1,1);
Graphics gra
	=new BufferedImage(bar.getWidth(),bar.getHeight(),BufferedImage.TYPE_INT_RGB)
	.getGraphics();
bar.print(gra);

will throw a NPE at this line: bar.print(gra);

Exception in thread "main" java.lang.NullPointerException
    at com.bulenkov.darcula.ui.DarculaProgressBarUI.paintDeterminate(DarculaProgressBarUI.java:124)
    at javax.swing.plaf.basic.BasicProgressBarUI.paint(BasicProgressBarUI.java:412)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
    at javax.swing.JComponent.paintComponent(JComponent.java:780)
    at javax.swing.JComponent.printComponent(JComponent.java:1220)
    at javax.swing.JComponent.paint(JComponent.java:1060)
    at javax.swing.JComponent.print(JComponent.java:1202)
    at firok.test.Test.main(Test.java:27)

and here is the source code where program crashed ( DarculaProgressBarUI::paintDeterminate:124 )

g.setColor(c.getParent().getBackground());

for now the resolution is

AWTAccessor.getComponentAccessor().setParent(bar,jPanel);

Project Status?

First, I want to thank the project author for contributing this to the open source community with an Apache License. The popularity and success of this project speaks for itself.

That being said, what is the status of this project as of Sep. 2019? It has been almost two years since a commit and there appear to be real bugs in the issues. I suspect that real improvements are being made to the internal version used by IntelliJ IDEA and the open source version has become stagnant; I base this on a few blog entries I have come across where people are trying to reverse engineer the darcula jar that comes with IntelliJ to solve Darcula issues.

My goal is not to cast dispersions on the project nor its author; I understand the time commitment of projects like this (though I might questions why IntelliJ is not contributing back to the open source version). However, I am interested in making this API/LookAndFeel project active again by means of a fork and hopefully enlist a team of other interested volunteers. While I do have a current fork in my personal account, I use that mainly to gain familiarity with the code, etc. I am wanting to create a more central account to be used by a team.

So thanks again Konstantin; could you clarify where this project stands when you get the time?

\n -> ¥n

\n is working but every time \ is pressed Yen(¥)n symbol is displayed

Any chance of migration?

As we can see in IntelliJ IDEA 2018.1 there're lots of UI changes, while this repo is not up-to-date.
I spent a day trying to extract com.intellij.ide.ui.laf from the source code of IntelliJ IDEA but it's highly coupled to the whole code base.

I wonder if there's any possibility of migrating the (at least some) changes from the newest version (like the flat button UI) to this repo.

Windows rendering issues

I just love Darcula's look on Mac. We're planning to use it in our jAlbum software now. The problem is that it doesn't look as good on Windows:

  • The selection color is too dark
  • Toolbar buttons have an ugly squary look
  • The JSlider button isn't having the appealing circular shape as it has on Darcula on Mac

Isn't it an aim to have the same pleasant dark look on all platforms? See screenshots for comparison examples between Darcula Mac (full window sample) and Darcula Windows (closeups)

Mac screenshot (everything looks good)
explore

Ugly toolbar on Windows:
screen shot 2016-11-05 at 10 54 01

Ugly slider knob on Windows:
screen shot 2016-11-05 at 10 54 12

Ctrl + PgUp/PgDown not working

Hi,
I'm using Darcula version 1.5 on Netbeans 8.2 (Linux). I noticed that when using this theme, Ctrl + PgUp/PgDown keyboard shortcuts do not work. By default, Netbeans assign them to tabs switching. Is there anyone experiencing this issue too?

htaccess coloring

Hi, I think the readability of htacces files may be improved! Thanks!

NPE in IconLoader.CachedImageIcon

java.lang.NullPointerException
 at com.bulenkov.iconloader.IconLoader$CachedImageIcon.getRealIcon(IconLoader.java:472)
 at com.bulenkov.iconloader.IconLoader$CachedImageIcon.getIconWidth(IconLoader.java:498)
 at javax.swing.plaf.IconUIResource.getIconWidth(Unknown Source)
 at javax.swing.SwingUtilities.layoutCompoundLabelImpl(Unknown Source)
 at javax.swing.SwingUtilities.layoutCompoundLabel(Unknown Source)
 at javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(Unknown Source)
 at javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(Unknown Source)
 at javax.swing.JComponent.getPreferredSize(Unknown Source)
 at javax.swing.plaf.metal.MetalDesktopIconUI.installComponents(Unknown Source)
 at javax.swing.plaf.basic.BasicDesktopIconUI.installUI(Unknown Source)
 at javax.swing.JComponent.setUI(Unknown Source)
 at javax.swing.JInternalFrame$JDesktopIcon.setUI(Unknown Source)
 at javax.swing.JInternalFrame$JDesktopIcon.updateUIWhenHidden(Unknown Source)
 at javax.swing.JInternalFrame.updateUI(Unknown Source)
 at javax.swing.JInternalFrame.<init>(Unknown Source)
 at javax.swing.JInternalFrame.<init>(Unknown Source)
 at com.mucommander.ui.theme.ThemeData$7.getComponent(ThemeData.java:888)
 at com.mucommander.ui.theme.SystemDefaultFont.getFont(SystemDefaultFont.java:83)
 at com.mucommander.ui.theme.ThemeData.getDefaultFont(ThemeData.java:1252)
 at com.mucommander.ui.theme.ThemeData.getFont(ThemeData.java:1199)
 at com.mucommander.ui.theme.ThemeManager.getCurrentFont(ThemeManager.java:915)
 at com.mucommander.ui.quicklist.item.QuickListHeaderItem.<init>(QuickListHeaderItem.java:45)
 at com.mucommander.ui.quicklist.QuickList.<init>(QuickList.java:58)
 at com.mucommander.ui.quicklist.QuickListWithDataList.<init>(QuickListWithDataList.java:36)
 at com.mucommander.ui.quicklist.QuickListWithIcons.<init>(QuickListWithIcons.java:56)
 at com.mucommander.ui.main.quicklist.ParentFoldersQL.<init>(ParentFoldersQL.java:47)
 at com.mucommander.ui.main.FolderPanel.<init>(FolderPanel.java:160)
 at com.mucommander.ui.main.MainFrame.<init>(MainFrame.java:283)
 at com.mucommander.ui.main.MainFrame.<init>(MainFrame.java:269)
 at com.mucommander.ui.main.frame.DefaultMainFramesBuilder.build(DefaultMainFramesBuilder.java:61)
 at com.mucommander.ui.main.WindowManager.createNewMainFrame(WindowManager.java:166)
 at com.mucommander.Launcher.main(Launcher.java:581)

Usign darcula.jar pfrom commit 6da3450

bluish glow around the button

How to change the color of the shadow that appears when you click button (bluish glow around the button)? When I try to change the fields using UIManager, nothing happens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.