You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Launcher app: show better default image
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user