Skip to content

Commit 95771d3

Browse files
Start work on LightningPiggy's DisplayWallet
1 parent e9620b8 commit 95771d3

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Lightning Piggy",
3+
"publisher": "LightningPiggy Foundation",
4+
"short_description": "Display wallet that shows balance, transactions, receive QR code etc.",
5+
"long_description": "See https://www.LightningPiggy.com",
6+
"icon_url": "http://demo.lnpiggy.com:2121/apps/com.lightningpiggy.displaywallet_0.0.1.mpk_icon_64x64.png",
7+
"download_url": "http://demo.lnpiggy.com:2121/apps/com.lightningpiggy.displaywallet_0.0.1.mpk",
8+
"fullname": "com.lightningpiggy.displaywallet",
9+
"version": "0.0.1",
10+
"entrypoint": "assets/displaywallet.py",
11+
"category": "finance"
12+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import time
2+
3+
def build_main_ui():
4+
appscreen.clean()
5+
balance_label = lv.label(appscreen)
6+
balance_label.align(lv.ALIGN.TOP_LEFT, 0, 0)
7+
balance_label.set_style_text_font(lv.font_montserrat_16, 0)
8+
balance_label.set_text('123456')
9+
point1 = lv.point_precise_t()
10+
point1.x = 10
11+
point1.y = 10
12+
point2 = lv.point_precise_t()
13+
point2.x = 200
14+
point2.y = 200
15+
line_points = [
16+
point1,
17+
point2
18+
]
19+
style_line = lv.style_t()
20+
style_line.init()
21+
style_line.set_line_width(8)
22+
style_line.set_line_color(lv.palette_main(lv.PALETTE.BLUE))
23+
style_line.set_line_rounded(True)
24+
balance_line = lv.line()
25+
balance_line.set_points(line_points, 2)
26+
balance_line.add_style(style_line, 0)
27+
balance_line.center()
28+
l = lv.line(appscreen)
29+
l.set_points([{'x':100,'y':100},{'x':150,'y':100},{'x':150,'y':150}],3)
30+
l.add_style(style_line, 0)
31+
32+
def janitor_cb(timer):
33+
if lv.screen_active() != appscreen:
34+
print("app backgrounded, cleaning up...")
35+
janitor.delete()
36+
# No cleanups to do, but in a real app, you might stop timers, deinitialize hardware devices you used, close network connections, etc.
37+
38+
appscreen = lv.screen_active()
39+
janitor = lv.timer_create(janitor_cb, 1000, None)
40+
41+
build_main_ui()
4.53 KB
Loading

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def create_apps_list():
301301
desc_label.add_event_cb(lambda e, a=app: show_app_detail(a), lv.EVENT.CLICKED, None)
302302
print("create_apps_list app done")
303303
try:
304-
_thread.stack_size(12*1024)
304+
_thread.stack_size(16*1024)
305305
_thread.start_new_thread(download_icons,())
306306
except Exception as e:
307307
print("Could not start thread to download icons: ", e)

0 commit comments

Comments
 (0)