diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-03-29 11:28:59 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-03-29 11:28:59 +0000 |
commit | 043d85e72ee876d69030f91d55af9d92f6979f19 (patch) | |
tree | fa5b7ac824761a52ddf1c6a0738eb5be9c0a72b5 /src/net/java/sip/communicator/impl | |
parent | 42025f82fb09089933442641ac0e0e0db11630ff (diff) | |
download | jitsi-043d85e72ee876d69030f91d55af9d92f6979f19.zip jitsi-043d85e72ee876d69030f91d55af9d92f6979f19.tar.gz jitsi-043d85e72ee876d69030f91d55af9d92f6979f19.tar.bz2 |
Set the size of the button after the images are loaded.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java b/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java index 7852356..edfc8da 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java @@ -75,16 +75,15 @@ public class CallHistoryButton UINotificationManager.addNotificationListener(this); - this.setPreferredSize(new Dimension(29, 22)); + // All items are now instantiated and could safely load the skin. + loadSkin(); + this.setForeground(Color.WHITE); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.setFont(getFont().deriveFont(Font.BOLD, 10f)); this.setToolTipText(callHistoryToolTip); this.setBackground(new Color(255, 255, 255, 160)); - // All items are now instantiated and could safely load the skin. - loadSkin(); - this.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -219,6 +218,9 @@ public class CallHistoryButton pressedImage = ImageLoader.getImage(ImageLoader.CALL_HISTORY_BUTTON_PRESSED); + this.setPreferredSize(new Dimension(historyImage.getWidth(this), + historyImage.getHeight(this))); + setHistoryView(); } }
\ No newline at end of file |