diff --git a/internal_filesystem/apps/com.lightningpiggy.displaywallet/META-INF/MANIFEST.JSON b/internal_filesystem/apps/com.lightningpiggy.displaywallet/META-INF/MANIFEST.JSON new file mode 100644 index 00000000..552723aa --- /dev/null +++ b/internal_filesystem/apps/com.lightningpiggy.displaywallet/META-INF/MANIFEST.JSON @@ -0,0 +1,12 @@ +{ +"name": "Lightning Piggy", +"publisher": "LightningPiggy Foundation", +"short_description": "Display wallet that shows balance, transactions, receive QR code etc.", +"long_description": "See https://www.LightningPiggy.com", +"icon_url": "http://demo.lnpiggy.com:2121/apps/com.lightningpiggy.displaywallet_0.0.1.mpk_icon_64x64.png", +"download_url": "http://demo.lnpiggy.com:2121/apps/com.lightningpiggy.displaywallet_0.0.1.mpk", +"fullname": "com.lightningpiggy.displaywallet", +"version": "0.0.1", +"entrypoint": "assets/displaywallet.py", +"category": "finance" +} diff --git a/internal_filesystem/apps/com.lightningpiggy.displaywallet/assets/displaywallet.py b/internal_filesystem/apps/com.lightningpiggy.displaywallet/assets/displaywallet.py new file mode 100644 index 00000000..feaeca9e --- /dev/null +++ b/internal_filesystem/apps/com.lightningpiggy.displaywallet/assets/displaywallet.py @@ -0,0 +1,41 @@ +import time + +def build_main_ui(): + appscreen.clean() + balance_label = lv.label(appscreen) + balance_label.align(lv.ALIGN.TOP_LEFT, 0, 0) + balance_label.set_style_text_font(lv.font_montserrat_16, 0) + balance_label.set_text('123456') + point1 = lv.point_precise_t() + point1.x = 10 + point1.y = 10 + point2 = lv.point_precise_t() + point2.x = 200 + point2.y = 200 + line_points = [ + point1, + point2 + ] + style_line = lv.style_t() + style_line.init() + style_line.set_line_width(8) + style_line.set_line_color(lv.palette_main(lv.PALETTE.BLUE)) + style_line.set_line_rounded(True) + balance_line = lv.line() + balance_line.set_points(line_points, 2) + balance_line.add_style(style_line, 0) + balance_line.center() + l = lv.line(appscreen) + l.set_points([{'x':100,'y':100},{'x':150,'y':100},{'x':150,'y':150}],3) + l.add_style(style_line, 0) + +def janitor_cb(timer): + if lv.screen_active() != appscreen: + print("app backgrounded, cleaning up...") + janitor.delete() + # No cleanups to do, but in a real app, you might stop timers, deinitialize hardware devices you used, close network connections, etc. + +appscreen = lv.screen_active() +janitor = lv.timer_create(janitor_cb, 1000, None) + +build_main_ui() diff --git a/internal_filesystem/apps/com.lightningpiggy.displaywallet/res/mipmap-mdpi/icon_64x64.png b/internal_filesystem/apps/com.lightningpiggy.displaywallet/res/mipmap-mdpi/icon_64x64.png new file mode 100644 index 00000000..be7ff467 Binary files /dev/null and b/internal_filesystem/apps/com.lightningpiggy.displaywallet/res/mipmap-mdpi/icon_64x64.png differ diff --git a/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py b/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py index 0f7693dd..944cacce 100644 --- a/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py +++ b/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py @@ -301,7 +301,7 @@ def create_apps_list(): desc_label.add_event_cb(lambda e, a=app: show_app_detail(a), lv.EVENT.CLICKED, None) print("create_apps_list app done") try: - _thread.stack_size(12*1024) + _thread.stack_size(16*1024) _thread.start_new_thread(download_icons,()) except Exception as e: print("Could not start thread to download icons: ", e)