aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/images/impl/gui/common/closedGroup.pngbin1250 -> 441 bytes
-rw-r--r--resources/images/impl/gui/common/openedGroup.pngbin1232 -> 430 bytes
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java50
3 files changed, 36 insertions, 14 deletions
diff --git a/resources/images/impl/gui/common/closedGroup.png b/resources/images/impl/gui/common/closedGroup.png
index 999b85f..09599dd 100644
--- a/resources/images/impl/gui/common/closedGroup.png
+++ b/resources/images/impl/gui/common/closedGroup.png
Binary files differ
diff --git a/resources/images/impl/gui/common/openedGroup.png b/resources/images/impl/gui/common/openedGroup.png
index 37bec6a..3ffa8e0 100644
--- a/resources/images/impl/gui/common/openedGroup.png
+++ b/resources/images/impl/gui/common/openedGroup.png
Binary files differ
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
index ad6b3da..62c419b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
@@ -16,8 +16,6 @@ import javax.swing.*;
import javax.swing.JPopupMenu.Separator;
import javax.swing.tree.*;
-import org.jitsi.util.*;
-
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.main.contactlist.contactsource.*;
@@ -239,18 +237,6 @@ public class ContactListTreeCellRenderer
{
super(new GridBagLayout());
- /*
- * !!! When changing border values we should make sure that we
- * recalculate the X and Y coordinates of the buttons added in
- * initButtonsPanel and initContactActionButtons functions. If not
- * correctly calculated problems may occur when clicking buttons!
- */
- this.setBorder(BorderFactory
- .createEmptyBorder( TOP_BORDER,
- LEFT_BORDER,
- BOTTOM_BORDER,
- RIGHT_BORDER));
-
loadSkin();
this.setOpaque(true);
@@ -377,6 +363,8 @@ public class ContactListTreeCellRenderer
DefaultTreeContactList contactList = (DefaultTreeContactList) tree;
+ setBorder();
+
// Set background color.
if (contactList instanceof TreeContactList)
{
@@ -1660,6 +1648,9 @@ public class ContactListTreeCellRenderer
}
}
+ /**
+ * Adds a separator between buttons.
+ */
private void addButtonSeparator(int buttonGridX)
{
JLabel separatorLabel = new JLabel(new ImageIcon(BUTTON_SEPARATOR_IMG));
@@ -1674,4 +1665,35 @@ public class ContactListTreeCellRenderer
constraints.weighty = 0f;
this.add(separatorLabel, constraints);
}
+
+ /**
+ * Sets the correct border depending on the contained object.
+ */
+ private void setBorder()
+ {
+ /*
+ * !!! When changing border values we should make sure that we
+ * recalculate the X and Y coordinates of the buttons added in
+ * initButtonsPanel and initContactActionButtons functions. If not
+ * correctly calculated problems may occur when clicking buttons!
+ */
+ if (treeNode instanceof ContactNode
+ && !(((ContactNode) treeNode).getContactDescriptor() instanceof
+ ShowMoreContact))
+ {
+ this.setBorder(BorderFactory
+ .createEmptyBorder( TOP_BORDER,
+ LEFT_BORDER,
+ BOTTOM_BORDER,
+ RIGHT_BORDER));
+ }
+ else // GroupNode || ShowMoreContact
+ {
+ this.setBorder(BorderFactory
+ .createEmptyBorder( 4,
+ LEFT_BORDER,
+ 0,
+ RIGHT_BORDER));
+ }
+ }
}