Fixed GroupBox layout in installwizard
This commit is contained in:
parent
9455815ad0
commit
77ebea15d0
|
@ -87,25 +87,37 @@ class InstallWizard(QDialog):
|
||||||
|
|
||||||
def restore_or_create(self):
|
def restore_or_create(self):
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
|
|
||||||
main_label = QLabel(_("Electrum could not find an existing wallet."))
|
main_label = QLabel(_("Electrum could not find an existing wallet."))
|
||||||
vbox.addWidget(main_label)
|
vbox.addWidget(main_label)
|
||||||
|
|
||||||
grid = QGridLayout()
|
grid = QGridLayout()
|
||||||
grid.setSpacing(5)
|
grid.setSpacing(5)
|
||||||
|
|
||||||
gb1 = QGroupBox(_("What do you want to do?"))
|
gb1 = QGroupBox(_("What do you want to do?"))
|
||||||
vbox.addWidget(gb1)
|
vbox.addWidget(gb1)
|
||||||
|
vbox1 = QVBoxLayout()
|
||||||
|
gb1.setLayout(vbox1)
|
||||||
|
|
||||||
b1 = QRadioButton(gb1)
|
b1 = QRadioButton(gb1)
|
||||||
b1.setText(_("Create new wallet"))
|
b1.setText(_("Create new wallet"))
|
||||||
b1.setChecked(True)
|
b1.setChecked(True)
|
||||||
|
|
||||||
b2 = QRadioButton(gb1)
|
b2 = QRadioButton(gb1)
|
||||||
b2.setText(_("Restore a wallet or import keys"))
|
b2.setText(_("Restore a wallet or import keys"))
|
||||||
|
|
||||||
group1 = QButtonGroup()
|
group1 = QButtonGroup()
|
||||||
group1.addButton(b1)
|
group1.addButton(b1)
|
||||||
group1.addButton(b2)
|
group1.addButton(b2)
|
||||||
vbox.addWidget(b1)
|
vbox1.addWidget(b1)
|
||||||
vbox.addWidget(b2)
|
vbox1.addWidget(b2)
|
||||||
|
|
||||||
gb2 = QGroupBox(_("Wallet type:"))
|
gb2 = QGroupBox(_("Wallet type:"))
|
||||||
vbox.addWidget(gb2)
|
vbox.addWidget(gb2)
|
||||||
|
|
||||||
|
vbox2 = QVBoxLayout()
|
||||||
|
gb2.setLayout(vbox2)
|
||||||
|
|
||||||
group2 = QButtonGroup()
|
group2 = QButtonGroup()
|
||||||
|
|
||||||
self.wallet_types = [
|
self.wallet_types = [
|
||||||
|
@ -120,9 +132,10 @@ class InstallWizard(QDialog):
|
||||||
continue
|
continue
|
||||||
button = QRadioButton(gb2)
|
button = QRadioButton(gb2)
|
||||||
button.setText(name)
|
button.setText(name)
|
||||||
vbox.addWidget(button)
|
vbox2.addWidget(button)
|
||||||
group2.addButton(button)
|
group2.addButton(button)
|
||||||
group2.setId(button, i)
|
group2.setId(button, i)
|
||||||
|
|
||||||
if i==0:
|
if i==0:
|
||||||
button.setChecked(True)
|
button.setChecked(True)
|
||||||
|
|
||||||
|
@ -326,11 +339,15 @@ class InstallWizard(QDialog):
|
||||||
vbox.addWidget(QLabel(title))
|
vbox.addWidget(QLabel(title))
|
||||||
gb2 = QGroupBox(msg)
|
gb2 = QGroupBox(msg)
|
||||||
vbox.addWidget(gb2)
|
vbox.addWidget(gb2)
|
||||||
|
|
||||||
|
vbox2 = QVBoxLayout()
|
||||||
|
gb2.setLayout(vbox2)
|
||||||
|
|
||||||
group2 = QButtonGroup()
|
group2 = QButtonGroup()
|
||||||
for i,c in enumerate(choices):
|
for i,c in enumerate(choices):
|
||||||
button = QRadioButton(gb2)
|
button = QRadioButton(gb2)
|
||||||
button.setText(c[1])
|
button.setText(c[1])
|
||||||
vbox.addWidget(button)
|
vbox2.addWidget(button)
|
||||||
group2.addButton(button)
|
group2.addButton(button)
|
||||||
group2.setId(button, i)
|
group2.setId(button, i)
|
||||||
if i==0:
|
if i==0:
|
||||||
|
@ -427,6 +444,7 @@ class InstallWizard(QDialog):
|
||||||
elif wallet_type == 'hardware':
|
elif wallet_type == 'hardware':
|
||||||
hardware_wallets = map(lambda x:(x[1],x[2]), filter(lambda x:x[0]=='hardware', electrum.wallet.wallet_types))
|
hardware_wallets = map(lambda x:(x[1],x[2]), filter(lambda x:x[0]=='hardware', electrum.wallet.wallet_types))
|
||||||
wallet_type = self.choice(_("Hardware Wallet"), 'Select your hardware wallet', hardware_wallets)
|
wallet_type = self.choice(_("Hardware Wallet"), 'Select your hardware wallet', hardware_wallets)
|
||||||
|
|
||||||
if not wallet_type:
|
if not wallet_type:
|
||||||
return
|
return
|
||||||
elif wallet_type == 'twofactor':
|
elif wallet_type == 'twofactor':
|
||||||
|
|
Loading…
Reference in New Issue