ソースを参照

Make background colours of licence tree completely transparent, should make colouring consistant across all platforms

Fixes issue 3700

Change-Id: I170162b64ec3d21ac80f4460a05599728c4bc403
Reviewed-on: http://gerrit.dmdirc.com/816
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3
Gregory Holmes 14年前
コミット
d5669cf38b
1個のファイルの変更17行の追加2行の削除
  1. 17
    2
      src/com/dmdirc/addons/ui_swing/dialogs/about/LicenceRenderer.java

+ 17
- 2
src/com/dmdirc/addons/ui_swing/dialogs/about/LicenceRenderer.java ファイルの表示

@@ -24,6 +24,7 @@
24 24
 package com.dmdirc.addons.ui_swing.dialogs.about;
25 25
 
26 26
 import com.dmdirc.plugins.PluginInfo;
27
+import java.awt.Color;
27 28
 
28 29
 import java.awt.Component;
29 30
 
@@ -52,8 +53,6 @@ public class LicenceRenderer extends DefaultTreeCellRenderer {
52 53
         final JLabel label = (JLabel) super.getTreeCellRendererComponent(tree,
53 54
                 value, sel, expanded, leaf, row, hasFocus);
54 55
         label.setIcon(null);
55
-        label.setBackground(tree.getBackground());
56
-        label.setForeground(tree.getForeground());
57 56
         label.setOpaque(false);
58 57
         if (((DefaultMutableTreeNode) value).getUserObject() instanceof PluginInfo) {
59 58
             setText(((PluginInfo) ((DefaultMutableTreeNode) value).getUserObject()).
@@ -61,4 +60,20 @@ public class LicenceRenderer extends DefaultTreeCellRenderer {
61 60
         }
62 61
         return label;
63 62
     }
63
+
64
+    /**
65
+     * {@inheritDoc}
66
+     *
67
+     * @return Background colour for non selected nodes
68
+     */
69
+    @Override
70
+    public Color getBackgroundNonSelectionColor() {
71
+        return null;
72
+    }
73
+
74
+    /** {@inheritDoc} */
75
+    @Override
76
+    public Color getBackground() {
77
+        return null;
78
+    } 
64 79
 }

読み込み中…
キャンセル
保存