Browse Source

Fix icons for Linux.

Holt59 3 years ago
parent
commit
25e35b9bc4
3 changed files with 4 additions and 3 deletions
  1. 0
    0
      res/delete-icon.png
  2. BIN
      res/save-icon.png
  3. 4
    3
      src/main/org/insa/graphics/PathsPanel.java

res/cross_mark.png → res/delete-icon.png View File


BIN
res/save-icon.png View File


+ 4
- 3
src/main/org/insa/graphics/PathsPanel.java View File

@@ -28,7 +28,6 @@ import javax.swing.JFileChooser;
28 28
 import javax.swing.JLabel;
29 29
 import javax.swing.JOptionPane;
30 30
 import javax.swing.JPanel;
31
-import javax.swing.UIManager;
32 31
 import javax.swing.border.EmptyBorder;
33 32
 import javax.swing.event.ChangeEvent;
34 33
 import javax.swing.event.ChangeListener;
@@ -213,7 +212,9 @@ public class PathsPanel extends JPanel implements DrawingChangeListener, GraphCh
213 212
                 }
214 213
             });
215 214
 
216
-            JButton saveButton = new JButton(UIManager.getIcon("FileView.floppyDriveIcon"));
215
+            Image saveImg = ImageIO.read(getClass().getResourceAsStream("/save-icon.png"))
216
+                    .getScaledInstance(14, 14, java.awt.Image.SCALE_SMOOTH);
217
+            JButton saveButton = new JButton(new ImageIcon(saveImg));
217 218
             saveButton.setFocusPainted(false);
218 219
             saveButton.setFocusable(false);
219 220
             saveButton.setMinimumSize(size);
@@ -245,7 +246,7 @@ public class PathsPanel extends JPanel implements DrawingChangeListener, GraphCh
245 246
                 }
246 247
             });
247 248
 
248
-            Image newimg = ImageIO.read(getClass().getResourceAsStream("/cross_mark.png"))
249
+            Image newimg = ImageIO.read(getClass().getResourceAsStream("/delete-icon.png"))
249 250
                     .getScaledInstance(14, 14, java.awt.Image.SCALE_SMOOTH);
250 251
             JButton deleteButton = new JButton(new ImageIcon(newimg));
251 252
             deleteButton.setFocusPainted(false);

Loading…
Cancel
Save