Permalink
Browse files

Change the app icon

  • Loading branch information...
kohii
kohii committed Apr 15, 2018
1 parent 528bb35 commit 296a1862e536a5e7eeb746b3d282788fcc1cef5a
Showing with 34 additions and 4 deletions.
  1. +3 −1 .gitignore
  2. +28 −0 build_icons.command
  3. +1 −1 smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/component/AboutDialog.java
  4. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon16x16.png
  5. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon16x16@2x.png
  6. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_128x128.png
  7. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_128x128@2.png
  8. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_256x256.png
  9. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_256x256@2x.png
  10. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_32x32.png
  11. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_32x32@2x.png
  12. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_512x512.png
  13. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_512x512@2x.png
  14. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/appicon.png
  15. BIN smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/appicon48.png
  16. +1 −1 smoothcsv-app-modules/smoothcsv-mac/src/main/java/com/smoothcsv/mac/MacEntryPoint.java
  17. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.icns
  18. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/appicon.png
  19. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/appicon48.png
  20. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_128x128.png
  21. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_128x128@2x.png
  22. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_16x16.png
  23. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_16x16@2x.png
  24. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_256x256.png
  25. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_256x256@2x.png
  26. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_32x32.png
  27. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_32x32@2x.png
  28. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_512x512.png
  29. BIN smoothcsv-launcher-mac/src/main/resources/SmoothCSV.iconset/icon_512x512@2x.png
  30. +1 −1 smoothcsv-launcher-win/src/main/java/com/smoothcsv/SmoothCSV.java
  31. BIN smoothcsv-launcher-win/src/main/resources/app.ico
  32. BIN smoothcsv-launcher-win/src/main/resources/appicon48.png
  33. BIN smoothcsv_icon.sketch
View
@@ -15,4 +15,6 @@
log/
target/
*.log
*.log
/icon_work/
View
@@ -0,0 +1,28 @@
set -eu
cd `dirname $0`
export PATH=/Applications/Sketch.app/Contents/Resources/sketchtool/bin:$PATH
WORK_DIR=icon_work
if [ -d "$WORK_DIR" ]; then
rm -rf "$WORK_DIR"
fi
mkdir "$WORK_DIR"
cd "$WORK_DIR"
mkdir icons
sketchtool export slices ../smoothcsv_icon.sketch --output=icons
# common
cp icons/* ../smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/
# macOS
mkdir SmoothCSV.iconset
cp icons/* SmoothCSV.iconset/
iconutil -c icns SmoothCSV.iconset
mv SmoothCSV.icns ../smoothcsv-launcher-mac/src/main/resources/
# Windows
convert icons/icon_512x512.png -define icon:auto-resize app.ico
cp app.ico ../smoothcsv-launcher-win/src/main/resources/
@@ -54,7 +54,7 @@ public AboutDialog() {
getContentPane().setLayout(gridBagLayout);
getRootPane().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
ImageIcon imageIcon = SwingUtils.getImageIcon("/img/appicon.png");
ImageIcon imageIcon = SwingUtils.getImageIcon("/img/app/icon_128x128.png");
Image image = imageIcon.getImage();
Image newimg = image.getScaledInstance(64, 64, java.awt.Image.SCALE_SMOOTH); // scale it the smooth way
imageIcon = new ImageIcon(newimg);
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -62,7 +62,7 @@ public void handleAbout(AboutEvent e) {
}
});
app.setDockIconImage(SwingUtils.getImage("/img/appicon.png"));
app.setDockIconImage(SwingUtils.getImage("/img/app/icon_512x512@2x.png"));
app.setOpenFileHandler(new OpenFilesHandler() {
@Override
public void openFiles(OpenFilesEvent e) {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,7 +29,7 @@ public static void main(String[] args) {
application.listeners().on(SCApplication.AfterCreateGuiEvent.class, new SCListener<SCApplication.AfterCreateGuiEvent>() {
@Override
public void call(SCApplication.AfterCreateGuiEvent event) {
application.components().getFrame().setIconImage(SwingUtils.getImageIcon("/appicon48.png").getImage());
application.components().getFrame().setIconImage(SwingUtils.getImageIcon("/img/app/icon_32x32@2x.png").getImage());
}
});
application.launch(args);
View
Binary file not shown.
Binary file not shown.
View
BIN +103 KB smoothcsv_icon.sketch
Binary file not shown.

0 comments on commit 296a186

Please sign in to comment.