Fixes the blurry taskbar icon on Win7 (c.f. JITSI-964)

cusax-fix
Ingo Bauersachs 14 years ago
parent afa430d837
commit 12d7c10781

@ -1,5 +1,7 @@
# service gui
service.gui.SIP_COMMUNICATOR_LOGO=resources/images/logo/sc_logo16x16.png
service.gui.SIP_COMMUNICATOR_LOGO_20x20=resources/images/logo/sc_logo_20x20.png
service.gui.SIP_COMMUNICATOR_LOGO_32x32=resources/images/logo/sc_logo_32x32.png
service.gui.SIP_COMMUNICATOR_LOGO_45x45=resources/images/logo/sc_logo_45x45.png
service.gui.SIP_COMMUNICATOR_LOGO_64x64=resources/images/logo/sc_logo_64x64.png
service.gui.SIP_COMMUNICATOR_LOGO_128x128=resources/images/logo/sc_logo_128x128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -9,8 +9,11 @@
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.lang.reflect.*;
import java.net.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import net.java.sip.communicator.service.configuration.*;
@ -36,12 +39,6 @@ public class SIPCommFrame
*/
private static final Logger logger = Logger.getLogger(SIPCommFrame.class);
/**
* The logo icon.
*/
private static final String SIP_COMMUNICATOR_LOGO
= "service.gui.SIP_COMMUNICATOR_LOGO";
/**
* The action map of this dialog.
*/
@ -130,11 +127,37 @@ public void validate()
*/
private void init()
{
Image scLogo = UtilActivator.getImage(SIP_COMMUNICATOR_LOGO);
this.setIconImage(scLogo);
try
{
Method m = Window.class.getMethod("setIconImages", List.class);
List<Image> logos = new ArrayList<Image>(6)
{{
add(UtilActivator
.getImage("service.gui.SIP_COMMUNICATOR_LOGO"));
add(UtilActivator
.getImage("service.gui.SIP_COMMUNICATOR_LOGO_20x20"));
add(UtilActivator
.getImage("service.gui.SIP_COMMUNICATOR_LOGO_32x32"));
add(UtilActivator
.getImage("service.gui.SIP_COMMUNICATOR_LOGO_45x45"));
add(UtilActivator
.getImage("service.gui.SIP_COMMUNICATOR_LOGO_64x64"));
add(UtilActivator
.getImage("service.gui.SIP_COMMUNICATOR_LOGO_128x128"));
}};
m.invoke(this, logos);
// In order to have the same icon when using option panes
m.invoke(JOptionPane.getRootFrame(), logos);
}
catch (Exception e)
{
Image scLogo =
UtilActivator.getImage("service.gui.SIP_COMMUNICATOR_LOGO");
this.setIconImage(scLogo);
// In order to have the same icon when using option panes
JOptionPane.getRootFrame().setIconImage(scLogo);
// In order to have the same icon when using option panes
JOptionPane.getRootFrame().setIconImage(scLogo);
}
}
/**

Loading…
Cancel
Save