diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-02-24 13:08:43 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-02-24 13:08:43 +0000 |
commit | 4269c5ff7d9253622fadea90ae5e4bb1f7c154b7 (patch) | |
tree | 7e05922a405dfd4cbdd99ea09f6f2ee044bc3a94 /src/net | |
parent | 39632782c77bb4248c75997ec94831615b152037 (diff) | |
download | jitsi-4269c5ff7d9253622fadea90ae5e4bb1f7c154b7.zip jitsi-4269c5ff7d9253622fadea90ae5e4bb1f7c154b7.tar.gz jitsi-4269c5ff7d9253622fadea90ae5e4bb1f7c154b7.tar.bz2 |
Fixes incorrect behavior when clicking on contact buttons (chat, call, video, etc.).
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java | 17 |
1 files changed, 14 insertions, 3 deletions
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 0694243..7deb9db 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 @@ -74,6 +74,16 @@ public class ContactListTreeCellRenderer private static final int EXTENDED_AVATAR_WIDTH = 45; /** + * Left border value. + */ + private static final int LEFT_BORDER = 5; + + /** + * Status label right border. + */ + private static final int STATUS_RIGHT_BORDER = 2; + + /** * The icon used for opened groups. */ private ImageIcon openedGroupIcon; @@ -190,7 +200,7 @@ public class ContactListTreeCellRenderer { super(new GridBagLayout()); - this.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 2)); + this.setBorder(BorderFactory.createEmptyBorder(2, LEFT_BORDER, 2, 2)); loadSkin(); @@ -202,7 +212,8 @@ public class ContactListTreeCellRenderer this.rightLabel.setHorizontalAlignment(JLabel.RIGHT); - statusLabel.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 2)); + statusLabel.setBorder( + BorderFactory.createEmptyBorder(2, 0, 0, STATUS_RIGHT_BORDER)); constraints.anchor = GridBagConstraints.WEST; constraints.fill = GridBagConstraints.NONE; @@ -691,7 +702,7 @@ public class ContactListTreeCellRenderer imContact = uiContact.getDefaultContactDetail( OperationSetBasicInstantMessaging.class); - int x = statusLabel.getWidth(); + int x = statusLabel.getWidth() + LEFT_BORDER + STATUS_RIGHT_BORDER; if (imContact != null) { |