Browse Source

kivy wizard: dedicated button for seed options

previously user had to touch the text field itself
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 6 years ago
parent
commit
bcbd52d752
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 36
      electrum/gui/kivy/uix/dialogs/installwizard.py

36
electrum/gui/kivy/uix/dialogs/installwizard.py

@ -314,13 +314,33 @@ Builder.load_string('''
valign: 'middle' valign: 'middle'
border: 4, 4, 4, 4 border: 4, 4, 4, 4
<SeedDialogHeader@GridLayout>
text: ''
options_dialog: None
rows: 1
orientation: 'horizontal'
size_hint: 1, None
height: self.minimum_height
BigLabel:
size_hint: 9, None
text: root.text
IconButton:
id: options_button
height: '30dp'
width: '30dp'
size_hint: 1, None
icon: 'atlas://electrum/gui/kivy/theming/light/gear'
on_release:
root.options_dialog() if root.options_dialog else None
<RestoreSeedDialog> <RestoreSeedDialog>
message: '' message: ''
word: '' word: ''
BigLabel: SeedDialogHeader:
text: "ENTER YOUR SEED PHRASE" id: seed_dialog_header
GridLayout text: 'ENTER YOUR SEED PHRASE'
options_dialog: root.options_dialog
GridLayout:
cols: 1 cols: 1
padding: 0, '12dp' padding: 0, '12dp'
orientation: 'vertical' orientation: 'vertical'
@ -331,7 +351,6 @@ Builder.load_string('''
id: text_input_seed id: text_input_seed
text: '' text: ''
on_text: Clock.schedule_once(root.on_text) on_text: Clock.schedule_once(root.on_text)
on_release: root.options_dialog()
SeedLabel: SeedLabel:
text: root.message text: root.message
BoxLayout: BoxLayout:
@ -491,8 +510,9 @@ Builder.load_string('''
<ShowSeedDialog> <ShowSeedDialog>
spacing: '12dp' spacing: '12dp'
value: 'next' value: 'next'
BigLabel: SeedDialogHeader:
text: "PLEASE WRITE DOWN YOUR SEED PHRASE" text: "PLEASE WRITE DOWN YOUR SEED PHRASE"
options_dialog: root.options_dialog
GridLayout: GridLayout:
id: grid id: grid
cols: 1 cols: 1
@ -503,7 +523,6 @@ Builder.load_string('''
spacing: '12dp' spacing: '12dp'
SeedButton: SeedButton:
text: root.seed_text text: root.seed_text
on_release: root.options_dialog()
SeedLabel: SeedLabel:
text: root.message text: root.message
@ -954,6 +973,11 @@ class RestoreSeedDialog(WizardDialog):
class ConfirmSeedDialog(RestoreSeedDialog): class ConfirmSeedDialog(RestoreSeedDialog):
def __init__(self, *args, **kwargs):
RestoreSeedDialog.__init__(self, *args, **kwargs)
self.ids.seed_dialog_header.ids.options_button.disabled = True
def get_params(self, b): def get_params(self, b):
return (self.get_text(),) return (self.get_text(),)
def options_dialog(self): def options_dialog(self):

Loading…
Cancel
Save