mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
kivy wizard: dedicated button for seed options
previously user had to touch the text field itself
This commit is contained in:
parent
a7b61fcab9
commit
bcbd52d752
1 changed files with 30 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue