Skip to content

Commit

Permalink
fix: app icon was pixelated when switching apps with alt+tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jcharlet committed Jan 7, 2020
1 parent f7f48e1 commit 845b788
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import javax.help.HelpSet;
import javax.help.HelpSetException;
import javax.help.SwingHelpUtilities;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
Expand Down Expand Up @@ -289,7 +290,7 @@ public void propertyChange(PropertyChangeEvent evt) {

private void init() {
log.info("Starting DROID.");
setIconImage(DroidImageUtils.createBaseMultiResolutionImage(ICONS_PATH, "DROID.png", IconType.LARGE).getImage());
setIconImage(new ImageIcon(getClass().getResource(ICONS_PATH+"96x96-DROID.png")).getImage());

setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import static java.nio.charset.StandardCharsets.UTF_8;

import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingConstants;
Expand Down Expand Up @@ -99,7 +100,7 @@ public ReportViewFrame(final Frame parent) {
//super(parent);
//setModal(true);
initComponents();
setIconImage(DroidImageUtils.createBaseMultiResolutionImage("/uk/gov/nationalarchives/droid/icons/", "DROID.png", IconType.LARGE).getImage());
setIconImage(new ImageIcon(getClass().getResource("/uk/gov/nationalarchives/droid/icons/96x96-DROID.png")).getImage());


addWindowListener(new WindowAdapter() {
Expand Down

0 comments on commit 845b788

Please sign in to comment.