Forcing white background is now optional

This commit is contained in:
Jindra Petřík
2021-04-07 18:40:34 +02:00
parent d8512aa6d9
commit 8890a327da
18 changed files with 130 additions and 56 deletions

View File

@@ -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() {