Selaa lähdekoodia

Set background transparent to correct colours

Fixes CLIENT-216

Change-Id: If48603a297ffc80862774c247d7e7d841dd559ea
Reviewed-on: http://gerrit.dmdirc.com/1858
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Greg Holmes 13 vuotta sitten
vanhempi
commit
298e0a9b4b

+ 10
- 5
src/com/dmdirc/addons/ui_swing/dialogs/channelsetting/TopicDisplayPane.java Näytä tiedosto

@@ -32,16 +32,18 @@ import com.dmdirc.addons.ui_swing.components.inputfields.SwingInputHandler;
32 32
 import com.dmdirc.addons.ui_swing.components.inputfields.TextAreaInputField;
33 33
 import com.dmdirc.addons.ui_swing.components.text.TextLabel;
34 34
 import com.dmdirc.ui.interfaces.InputWindow;
35
+
35 36
 import java.awt.Color;
36 37
 import java.awt.event.KeyEvent;
37 38
 import java.util.Date;
38
-import javax.swing.JLabel;
39 39
 
40
+import javax.swing.JLabel;
40 41
 import javax.swing.JPanel;
41 42
 import javax.swing.JScrollPane;
42 43
 import javax.swing.KeyStroke;
43 44
 import javax.swing.event.DocumentEvent;
44 45
 import javax.swing.event.DocumentListener;
46
+
45 47
 import net.miginfocom.swing.MigLayout;
46 48
 
47 49
 /**
@@ -57,13 +59,13 @@ public class TopicDisplayPane extends JPanel implements DocumentListener {
57 59
      */
58 60
     private static final long serialVersionUID = 1;
59 61
     /** Parent topic pane. */
60
-    private ChannelSettingsDialog parent;
62
+    private final ChannelSettingsDialog parent;
61 63
     /** Associated channel. */
62
-    private Channel channel;
64
+    private final Channel channel;
63 65
     /** Channel window. */
64
-    private InputWindow channelWindow;
66
+    private final InputWindow channelWindow;
65 67
     /** the maximum length allowed for a topic. */
66
-    private int topicLengthMax;
68
+    private final int topicLengthMax;
67 69
     /** label showing the number of characters left in a topic.*/
68 70
     private JLabel topicLengthLabel;
69 71
     /** Topic text entry text area. */
@@ -82,6 +84,8 @@ public class TopicDisplayPane extends JPanel implements DocumentListener {
82 84
      */
83 85
     public TopicDisplayPane(final Channel channel,
84 86
             final ChannelSettingsDialog parent, final InputWindow channelWindow) {
87
+        super();
88
+
85 89
         this.channel = channel;
86 90
         this.parent = parent;
87 91
         this.topicLengthMax = channel.getServer().getParser().getMaxTopicLength();
@@ -99,6 +103,7 @@ public class TopicDisplayPane extends JPanel implements DocumentListener {
99 103
         topicLengthLabel = new JLabel();
100 104
         topicText = new TextAreaInputField(100, 4);
101 105
         topicWho = new TextLabel();
106
+        topicWho.setOpaque(false);
102 107
 
103 108
         topicText.setLineWrap(true);
104 109
         topicText.setWrapStyleWord(true);

+ 8
- 5
src/com/dmdirc/addons/ui_swing/dialogs/channelsetting/TopicHistoryPane.java Näytä tiedosto

@@ -1,16 +1,16 @@
1 1
 /*
2 2
  * Copyright (c) 2006-2011 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
- * 
3
+ *
4 4
  * Permission is hereby granted, free of charge, to any person obtaining a copy
5 5
  * of this software and associated documentation files (the "Software"), to deal
6 6
  * in the Software without restriction, including without limitation the rights
7 7
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 8
  * copies of the Software, and to permit persons to whom the Software is
9 9
  * furnished to do so, subject to the following conditions:
10
- * 
10
+ *
11 11
  * The above copyright notice and this permission notice shall be included in
12 12
  * all copies or substantial portions of the Software.
13
- * 
13
+ *
14 14
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 15
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 16
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -64,10 +64,12 @@ public class TopicHistoryPane extends JPanel implements ListSelectionListener {
64 64
 
65 65
     /**
66 66
      * Instantiates a new topic history pane.
67
-     * 
67
+     *
68 68
      * @param channel Parent channel
69 69
      */
70 70
     public TopicHistoryPane(final Channel channel) {
71
+        super();
72
+
71 73
         topicHistory.getSelectionModel().addListSelectionListener(this);
72 74
         topicHistory.getSelectionModel().setSelectionMode(
73 75
                 ListSelectionModel.SINGLE_SELECTION);
@@ -76,7 +78,8 @@ public class TopicHistoryPane extends JPanel implements ListSelectionListener {
76 78
         scrollPane.getVerticalScrollBar().setUnitIncrement(15);
77 79
 
78 80
         for (Topic topic : topics) {
79
-            topicHistory.getModel().addRow(new Object[]{new TopicLabel(channel, topic), });
81
+            topicHistory.getModel().addRow(new Object[]{new TopicLabel(channel,
82
+                    topic), });
80 83
         }
81 84
         topicHistory.getSelectionModel().setSelectionInterval(0, 0);
82 85
         topicHistory.setShowGrid(false);

Loading…
Peruuta
Tallenna