From 05afca3acb225a0caff08d823c3f65fc00efe7d3 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 2 Nov 2025 22:22:50 +0100 Subject: [PATCH] Launcher app: show better default image --- .../com.micropythonos.appstore/assets/appstore.py | 2 +- .../com.micropythonos.launcher/assets/launcher.py | 11 +++++++---- internal_filesystem/lib/mpos/app/app.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py b/internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py index f07de0a5..d91e38ae 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py @@ -195,7 +195,7 @@ class AppDetail(Activity): }) icon_spacer.set_src(image_dsc) else: - icon_spacer.set_src(lv.SYMBOL.REFRESH) + icon_spacer.set_src(lv.SYMBOL.IMAGE) detail_cont = lv.obj(headercont) detail_cont.set_style_border_width(0, 0) detail_cont.set_style_radius(0, 0) diff --git a/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py b/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py index 9f727da4..02e41ae1 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py @@ -111,10 +111,13 @@ class Launcher(Activity): # ----- icon ---------------------------------------------------- image = lv.image(app_cont) - image.set_src(lv.image_dsc_t({ - 'data_size': len(app.icon_data), - 'data': app.icon_data - })) + if app.icon_data: + image.set_src(lv.image_dsc_t({ + 'data_size': len(app.icon_data), + 'data': app.icon_data + })) + else: + image.set_src(lv.SYMBOL.IMAGE) image.align(lv.ALIGN.TOP_MID, 0, 0) image.set_size(icon_size, icon_size) diff --git a/internal_filesystem/lib/mpos/app/app.py b/internal_filesystem/lib/mpos/app/app.py index 81d51f53..43b96a17 100644 --- a/internal_filesystem/lib/mpos/app/app.py +++ b/internal_filesystem/lib/mpos/app/app.py @@ -62,7 +62,7 @@ class App: def _find_icon_path(self): fullpath = "apps/" + self.fullname + "/res/mipmap-mdpi/icon_64x64.png" - return self._check_icon_path(fullpath) or self._check_icon_path("builtin/" + fullpath) + return self._check_icon_path(fullpath) or self._check_icon_path("builtin/" + fullpath) def _find_main_launcher_activity(self): for act in self.activities: