Browse Source

kivy: add status dialog

283
ThomasV 9 years ago
parent
commit
f7a3b53c3f
  1. 1
      gui/kivy/main.kv
  2. 1
      gui/kivy/main_window.py
  3. 25
      gui/kivy/uix/ui_screens/status.kv

1
gui/kivy/main.kv

@ -393,6 +393,7 @@ BoxLayout:
.format(app.status) .format(app.status)
font_size: '22dp' font_size: '22dp'
minimum_width: '1dp' minimum_width: '1dp'
on_release: app.popup_dialog('status')
ActionOverflow: ActionOverflow:
id: ao id: ao

1
gui/kivy/main_window.py

@ -322,7 +322,6 @@ class ElectrumWindow(App):
else: else:
wallet.start_threads(self.network) wallet.start_threads(self.network)
self.load_wallet(wallet) self.load_wallet(wallet)
self.on_resume() self.on_resume()
def create_wallet_dialog(self, l): def create_wallet_dialog(self, l):

25
gui/kivy/uix/ui_screens/status.kv

@ -0,0 +1,25 @@
Popup:
title: "Balance"
confirmed: 0
unconfirmed: 0
unmatured: 0
on_parent:
self.confirmed, self.unconfirmed, self.x = app.wallet.get_balance()
BoxLayout:
orientation: 'vertical'
spacing: '1dp'
GridLayout:
cols:2
Label:
text: _("Confirmed:")
Label:
text: app.format_amount_and_units(root.confirmed)
Label:
text: _("Unconfirmed:")
Label:
text: app.format_amount_and_units(root.unconfirmed)
Label:
text: "Unmatured:"
Label:
text: app.format_amount_and_units(root.unmatured)
Widget
Loading…
Cancel
Save