Open DalgEllal opened 7 years ago
The problem seems to be related to the code below in DarculaTreeUI - returning false instead in isSkinny fixes the problem.
@Override public int getRightChildIndent() { return isSkinny() ? 8 : super.getRightChildIndent(); }
private static boolean isSkinny() { return true; }
See image - the tree is cropped and too little indentation
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));
}