Forcing white background is now optional

This commit is contained in:
Jindra Petřík
2021-11-19 13:03:23 +01:00
parent d8512aa6d9
commit 8890a327da
18 changed files with 130 additions and 56 deletions
@@ -117,9 +117,11 @@ public class DumpTree extends JTree {
public class DumpTreeCellRenderer extends DefaultTreeCellRenderer {
public DumpTreeCellRenderer() {
setUI(new BasicLabelUI());
setOpaque(false);
setBackgroundNonSelectionColor(Color.white);
if (Configuration.setControlsBackgroundToWhite.get()) {
setUI(new BasicLabelUI());
setOpaque(false);
setBackgroundNonSelectionColor(Color.white);
}
}
@Override
@@ -234,12 +236,14 @@ public class DumpTree extends JTree {
this.mainPanel = mainPanel;
setCellRenderer(new DumpTreeCellRenderer());
setRootVisible(false);
setBackground(Color.white);
setUI(new BasicTreeUI() {
{
setHashColor(Color.gray);
}
});
if (Configuration.setControlsBackgroundToWhite.get()) {
setBackground(Color.white);
setUI(new BasicTreeUI() {
{
setHashColor(Color.gray);
}
});
}
}
public void createContextMenu() {