Skip to content

Commit 05afca3

Browse files
Launcher app: show better default image
1 parent 4a1d210 commit 05afca3

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def onCreate(self):
195195
})
196196
icon_spacer.set_src(image_dsc)
197197
else:
198-
icon_spacer.set_src(lv.SYMBOL.REFRESH)
198+
icon_spacer.set_src(lv.SYMBOL.IMAGE)
199199
detail_cont = lv.obj(headercont)
200200
detail_cont.set_style_border_width(0, 0)
201201
detail_cont.set_style_radius(0, 0)

internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,13 @@ def onResume(self, screen):
111111

112112
# ----- icon ----------------------------------------------------
113113
image = lv.image(app_cont)
114-
image.set_src(lv.image_dsc_t({
115-
'data_size': len(app.icon_data),
116-
'data': app.icon_data
117-
}))
114+
if app.icon_data:
115+
image.set_src(lv.image_dsc_t({
116+
'data_size': len(app.icon_data),
117+
'data': app.icon_data
118+
}))
119+
else:
120+
image.set_src(lv.SYMBOL.IMAGE)
118121
image.align(lv.ALIGN.TOP_MID, 0, 0)
119122
image.set_size(icon_size, icon_size)
120123

internal_filesystem/lib/mpos/app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _check_icon_path(self, tocheck):
6262

6363
def _find_icon_path(self):
6464
fullpath = "apps/" + self.fullname + "/res/mipmap-mdpi/icon_64x64.png"
65-
return self._check_icon_path(fullpath) or self._check_icon_path("builtin/" + fullpath)
65+
return self._check_icon_path(fullpath) or self._check_icon_path("builtin/" + fullpath)
6666

6767
def _find_main_launcher_activity(self):
6868
for act in self.activities:

0 commit comments

Comments
 (0)