diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-03-20 10:01:46 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-03-20 10:01:46 +0000 |
commit | 755675c914a55619ed9268bbbb055d3778cdc669 (patch) | |
tree | d3bac1b43a0c06dcfbc2dc4054127b45db7338d1 /src/net/java | |
parent | 603639adc328115531f60084166c79e48a19980d (diff) | |
download | jitsi-755675c914a55619ed9268bbbb055d3778cdc669.zip jitsi-755675c914a55619ed9268bbbb055d3778cdc669.tar.gz jitsi-755675c914a55619ed9268bbbb055d3778cdc669.tar.bz2 |
Uses SCScrollPane instead of JScrollPane in the conference chats (e.g. IRC chat rooms) and thus complies with the blue theme. And it looks way nicer to me.
Diffstat (limited to 'src/net/java')
3 files changed, 24 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java index 9b6b735..663d7d3 100755 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java @@ -27,6 +27,7 @@ import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.gui.Container; import net.java.sip.communicator.service.gui.event.*; import net.java.sip.communicator.service.keybindings.*; +import net.java.sip.communicator.service.resources.*; import net.java.sip.communicator.util.*; import net.java.sip.communicator.util.swing.*; import net.java.sip.communicator.util.swing.event.*; @@ -136,7 +137,9 @@ public class ChatWindow else mainToolBar = new MainToolBar(this); - northPanel.add(new LogoBar(), BorderLayout.NORTH); + Component logoBar = LogoBar.createInstance(); + if (logoBar != null) + northPanel.add(logoBar, BorderLayout.NORTH); northPanel.add(mainToolBar, BorderLayout.CENTER); northPanel.add(contactPhotoPanel, BorderLayout.EAST); @@ -854,21 +857,28 @@ public class ChatWindow private static class LogoBar extends JPanel { + public static LogoBar createInstance() + { + ResourceManagementService resources = GuiActivator.getResources(); + int width = resources.getSettingsInt("impl.gui.LOGO_BAR_WIDTH"); + int height = resources.getSettingsInt("impl.gui.LOGO_BAR_HEIGHT"); + + return ((width > 0) || (height > 0)) + ? new LogoBar(width, height) + : null; + } + private final TexturePaint texture; /** * Creates the logo bar and specify the size. */ - public LogoBar() + private LogoBar(int width, int height) { - int width = GuiActivator.getResources() - .getSettingsInt("impl.gui.LOGO_BAR_WIDTH"); - - int height = GuiActivator.getResources() - .getSettingsInt("impl.gui.LOGO_BAR_HEIGHT"); + Dimension size = new Dimension(width, height); - this.setMinimumSize(new Dimension(width, height)); - this.setPreferredSize(new Dimension(width, height)); + this.setMinimumSize(size); + this.setPreferredSize(size); BufferedImage bgImage = ImageLoader.getImage(ImageLoader.WINDOW_TITLE_BAR_BG); @@ -1013,7 +1023,7 @@ public class ChatWindow new FramedImage(ChatContact.AVATAR_ICON_WIDTH, ChatContact.AVATAR_ICON_HEIGHT); - private JLabel addContactButton = new JLabel( + private final JLabel addContactButton = new JLabel( new ImageIcon(ImageLoader.getImage( ImageLoader.ADD_CONTACT_CHAT_ICON))); diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java index 08ccfa3..8b47438 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java @@ -11,6 +11,7 @@ import java.awt.event.*; import javax.swing.*; +import net.java.sip.communicator.impl.gui.customcontrols.*; import net.java.sip.communicator.impl.gui.main.chat.*; import net.java.sip.communicator.impl.gui.main.contactlist.*; @@ -48,7 +49,7 @@ public class ChatRoomMemberListPanel this.memberList.setModel(memberListModel); this.memberList.setCellRenderer(new ChatContactCellRenderer()); - JScrollPane contactsScrollPane = new JScrollPane(); + JScrollPane contactsScrollPane = new SCScrollPane(); contactsScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); diff --git a/src/net/java/sip/communicator/impl/gui/utils/Constants.java b/src/net/java/sip/communicator/impl/gui/utils/Constants.java index 2223cc3..333c608 100755 --- a/src/net/java/sip/communicator/impl/gui/utils/Constants.java +++ b/src/net/java/sip/communicator/impl/gui/utils/Constants.java @@ -426,9 +426,9 @@ public class Constants if (defaultFont != null) style.addRule( "body, div, h1, h2, h3, h4, h5, h6, h7, p, td, th { " - + "font-family: \"" + + "font-family: " + defaultFont.getName() - + "\"; font-size: " + + "; font-size: " + defaultFont.getSize() + "pt; }"); |