diff --git a/Taskfile.yml b/Taskfile.yml index e07203f..4f28d4a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -58,6 +58,14 @@ tasks: cmds: - echo "Setup complete." + generate-icons: + desc: Rasterise icon.svg → icon.png and regenerate all platform launcher icons + deps: [_pub-get] + cmds: + - rsvg-convert -w 1024 -h 1024 icon.svg -o icon.png + - rsvg-convert -w 512 -h 512 icon.svg -o playstore/icon.png + - fvm flutter pub run flutter_launcher_icons + generate-changelog: desc: Generate assets/changelog.txt from git history cmds: diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..81a0ef7 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..367e93a 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..c3a308b 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..d6e3b0f 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..1056fde 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/flake.nix b/flake.nix index 5300df2..d1c0e7b 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,7 @@ ])) # used by stalwart-dev/start and deploy_playstore.py fgj # Codeberg/Forgejo CLI (like gh for GitHub) skopeo # inspect OCI image manifests without pulling layers (used by check-ci-images) + librsvg # rsvg-convert — SVG→PNG for generate-icons task ]); shellHook = '' diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..5134dc8 Binary files /dev/null and b/icon.png differ diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 38c24ab..9d30003 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -102,3 +102,7 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/sharedinbox.png" + DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) diff --git a/linux/my_application.cc b/linux/my_application.cc index 609bf5f..3a7114d 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -31,6 +31,8 @@ static void my_application_activate(GApplication* application) { fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + gtk_window_set_icon_from_file(window, "sharedinbox.png", nullptr); + // Show AFTER adding FlView so GTK's first layout pass allocates the full // window content area (1280×800) to FlView, not the default 1×1. gtk_widget_show_all(GTK_WIDGET(window)); diff --git a/linux/sharedinbox.png b/linux/sharedinbox.png new file mode 100644 index 0000000..4f57b44 Binary files /dev/null and b/linux/sharedinbox.png differ diff --git a/pubspec.yaml b/pubspec.yaml index 08ba477..0b2a40f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -81,6 +81,15 @@ dev_dependencies: sqlite3: ^3.1.5 # used directly in test/unit/db_test_helper.dart; 3.x required for Database.close() url_launcher_platform_interface: ^2.3.2 plugin_platform_interface: ^2.1.8 + flutter_launcher_icons: ^0.13.1 + +flutter_icons: + android: "ic_launcher" + ios: false + image_path: "icon.png" + linux: + generate: true + image_path: "icon.png" flutter: uses-material-design: true