Skip to content

Commit 2962911

Browse files
Piggy wallet: simplify
1 parent 7daf36c commit 2962911

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

  • internal_filesystem/apps/com.lightningpiggy.displaywallet/assets

internal_filesystem/apps/com.lightningpiggy.displaywallet/assets/displaywallet.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self):
2828
self.settings = [
2929
{"title": "Wallet Type", "key": "wallet_type", "value_label": None, "cont": None},
3030
{"title": "LNBits URL", "key": "lnbits_url", "value_label": None, "cont": None},
31-
{"title": "LNBits Read/Invoice Key", "key": "lnbits_readkey", "value_label": None, "cont": None},
31+
{"title": "LNBits Read Key", "key": "lnbits_readkey", "value_label": None, "cont": None},
3232
{"title": "Static receive code", "key": "lnbits_static_receive_code", "value_label": None, "cont": None},
3333
{"title": "NWC URL", "key": "nwc_url", "value_label": None, "cont": None},
3434
]
@@ -185,14 +185,15 @@ def open_edit_popup(self, setting):
185185
setting_label.set_style_text_font(lv.font_montserrat_22, 0)
186186

187187
# Camera for text
188-
self.cambutton = lv.button(top_cont)
189-
self.cambutton.align(lv.ALIGN.TOP_RIGHT,0,0)
190-
self.cambuttonlabel = lv.label(self.cambutton)
191-
self.cambuttonlabel.set_text("CAM")
192-
self.cambuttonlabel.center()
193-
self.cambutton.add_event_cb(self.cambutton_cb, lv.EVENT.CLICKED, None)
188+
cambutton = lv.button(top_cont)
189+
cambutton.align(lv.ALIGN.TOP_RIGHT,0,0)
190+
cambuttonlabel = lv.label(cambutton)
191+
cambuttonlabel.set_text("SCAN QR")
192+
cambuttonlabel.center()
193+
cambutton.add_event_cb(self.cambutton_cb, lv.EVENT.CLICKED, None)
194194

195195
if setting["key"] == "wallet_type":
196+
cambutton.add_flag(lv.obj.FLAG.HIDDEN)
196197
# Create container for radio buttons
197198
self.radio_container = lv.obj(settings_screen_detail)
198199
self.radio_container.set_width(lv.pct(100))
@@ -315,14 +316,14 @@ def build_main_ui():
315316
receive_qr.set_style_border_width(3, 0);
316317
receive_qr.add_flag(lv.obj.FLAG.CLICKABLE)
317318
receive_qr.add_event_cb(qr_clicked_cb,lv.EVENT.CLICKED,None)
318-
style_line = lv.style_t()
319-
style_line.init()
320-
style_line.set_line_width(2)
321-
style_line.set_line_color(lv.palette_main(lv.PALETTE.PINK))
322-
style_line.set_line_rounded(True)
319+
#style_line = lv.style_t()
320+
#style_line.init()
321+
#style_line.set_line_width(2)
322+
#style_line.set_line_color(lv.palette_main(lv.PALETTE.PINK))
323+
#style_line.set_line_rounded(True)
323324
balance_line = lv.line(main_screen)
324325
balance_line.set_points([{'x':0,'y':35},{'x':200,'y':35}],2)
325-
balance_line.add_style(style_line, 0)
326+
#balance_line.add_style(style_line, 0)
326327
payments_label = lv.label(main_screen)
327328
payments_label.set_text("")
328329
payments_label.align_to(balance_line,lv.ALIGN.OUT_BOTTOM_LEFT,0,10)

0 commit comments

Comments
 (0)