From 25e35b9bc49d576f83cc895446327f8b799580b0 Mon Sep 17 00:00:00 2001 From: Holt59 Date: Wed, 14 Mar 2018 21:27:36 +0100 Subject: [PATCH] Fix icons for Linux. --- res/{cross_mark.png => delete-icon.png} | Bin res/save-icon.png | Bin 0 -> 3054 bytes src/main/org/insa/graphics/PathsPanel.java | 7 ++++--- 3 files changed, 4 insertions(+), 3 deletions(-) rename res/{cross_mark.png => delete-icon.png} (100%) create mode 100644 res/save-icon.png diff --git a/res/cross_mark.png b/res/delete-icon.png similarity index 100% rename from res/cross_mark.png rename to res/delete-icon.png diff --git a/res/save-icon.png b/res/save-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..41add8704b80805a4da65726ffb0344001f01cff GIT binary patch literal 3054 zcmcgucTm$?7XBrW2ZUZ91jPUXhGr6iLIjjv0vH5ER7#{tks5l7Qj{X01c_3`P*ffY z*g%lbi*$5}LZnG(QbeVf&HHnAW_M=)*_nIhJKuNiH)rO~xp!_d-rAHO3WEXwz;AA5 zbO8WB>=XoWbFyJ0%4L}ioSynt`T$T(=G`Me*c|R^cEJh&A{7CElmGxbY>6}v03k>K zSabmZEENF$49Ksy(P0bAMtH8@Fu#*zlQ-Q$plvD4|Y>ilv zwrtxsnpIrD$8RZrp`LkbYejNHQkJ7VkxCZa_)B!Z$4Zd(b=-kW4&K3N*YI=m8?M-g z2>`-mR+q(pt6?vz$y8qIf?dL+?~_+Kbj?`^_~C_LujC@OkH?X{Q`1ptxqm!8R{?(c z!uq&|bLC@&Ra86g;A49Jt$esVogZ=}Snz|ET2_INb!}P{RLie2`$lVcvcE)ZIFHn= zEMJwa#{x5we=gZ8OQi=l&|&@|8&bu=<1G`s=TSSIkR&Ld3Bzvv*d6hMgwKhIIonH5 ziFFkSS=Hhmg3oAmEfPX2vmd+9x^gWJx`hp0|7{>Z35RyAIWN*wWW=1yMhtTX&?<2^ zq(ErjjH(EH<)++;E!HsPnjL4nmKsImQI8q|^G#A7rY596(s!MnWduBdTs^)%n)KemP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TEzd{d*xzdp?tF0vvc3ZP= z`~zQE8+=SgJvgJWl0YWPZ6}+WZ@%EFm`s}VR3-Txh!;H{Ouqx@62ENJtR%NOQ>KLf z+x@PBR8Us%(}CBfL^>zNf(xgFB@E@~Bw01uqZ)LiC|#wMDbPgr0d@_-i?p6sMS=Xt zG@&bjPL89aK)~(l9}WV-8p`2C-fyhxi$G5uWNfs5RgeE(+ogggRYUSqXz+T;Zd6qm zvw|$GKU#~rgzKBue|T@@&arF$BA<4{t?QkVXSC1D&)y_ghEQ;$swhfr|Cm;Uk5=om zk2rgE;g3I`cG|2nh)L@IK*^qe5qJ`k>G8J#&ctl&66#rNb&_PP1F zX076FxLr8Y{^I(d93ZAzjQ(b!Z$>Gh3rG0$zt|GZ=3Kak3E=rM`F6tJ zl0YuL(`G@H57kkw)uGQ$WCem$AsE~ofqQ5?SSg^ED3c_V7sbgi%_Ax%0XM(LivWue zV_(JbCZ|sa7H{?yb2OYNAPb{T1_67z_lv`$BS%<07i{|afZ8hcKjZ#pNQ^rh)xtDn+ zJO*C=abz)sS3AmR^G4r$SJ#!M^#xTAVO!d7%|H6|AAatA|D8(=-8VYaWn^M&$p2|y z&r5P@u$>1xUtAEz=%|jqb13-1shZ_gs4C6=+A0u@FB9DeM0c!fkUJXyG!mtyhSX3) zVeHT-EPH93Rzae$NF+{sA?9BUH~rnbJR<(H0qbVd%r;2<-NDx1gBV5#atFe~!qmO| ee1csG0q*MlL7sUlIxzMoz}(o{sLH_Q_CEn<0#pD1 literal 0 HcmV?d00001 diff --git a/src/main/org/insa/graphics/PathsPanel.java b/src/main/org/insa/graphics/PathsPanel.java index 43c5018..3e687a4 100644 --- a/src/main/org/insa/graphics/PathsPanel.java +++ b/src/main/org/insa/graphics/PathsPanel.java @@ -28,7 +28,6 @@ import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; -import javax.swing.UIManager; import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -213,7 +212,9 @@ public class PathsPanel extends JPanel implements DrawingChangeListener, GraphCh } }); - JButton saveButton = new JButton(UIManager.getIcon("FileView.floppyDriveIcon")); + Image saveImg = ImageIO.read(getClass().getResourceAsStream("/save-icon.png")) + .getScaledInstance(14, 14, java.awt.Image.SCALE_SMOOTH); + JButton saveButton = new JButton(new ImageIcon(saveImg)); saveButton.setFocusPainted(false); saveButton.setFocusable(false); saveButton.setMinimumSize(size); @@ -245,7 +246,7 @@ public class PathsPanel extends JPanel implements DrawingChangeListener, GraphCh } }); - Image newimg = ImageIO.read(getClass().getResourceAsStream("/cross_mark.png")) + Image newimg = ImageIO.read(getClass().getResourceAsStream("/delete-icon.png")) .getScaledInstance(14, 14, java.awt.Image.SCALE_SMOOTH); JButton deleteButton = new JButton(new ImageIcon(newimg)); deleteButton.setFocusPainted(false);