qt: sweep_key_dialog: make UI a bit more intuitive
user complained: > when you want to sweep an address. it's very unclear to me as a noob who is getting the money > might want a little picture with an arrow to show which direction the funds are going
This commit is contained in:
@@ -2366,12 +2366,13 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
|
|||||||
d.setMinimumSize(600, 300)
|
d.setMinimumSize(600, 300)
|
||||||
vbox = QVBoxLayout(d)
|
vbox = QVBoxLayout(d)
|
||||||
hbox_top = QHBoxLayout()
|
hbox_top = QHBoxLayout()
|
||||||
hbox_top.addWidget(QLabel(_("Enter private keys:")))
|
hbox_top.addWidget(QLabel(_("Enter private keys to sweep coins from:")))
|
||||||
hbox_top.addWidget(InfoButton(WIF_HELP_TEXT), alignment=Qt.AlignRight)
|
hbox_top.addWidget(InfoButton(WIF_HELP_TEXT), alignment=Qt.AlignRight)
|
||||||
vbox.addLayout(hbox_top)
|
vbox.addLayout(hbox_top)
|
||||||
keys_e = ScanQRTextEdit(allow_multi=True, config=self.config)
|
keys_e = ScanQRTextEdit(allow_multi=True, config=self.config)
|
||||||
keys_e.setTabChangesFocus(True)
|
keys_e.setTabChangesFocus(True)
|
||||||
vbox.addWidget(keys_e)
|
vbox.addWidget(keys_e)
|
||||||
|
vbox.addWidget(QLabel(_("Send to address") + ":"))
|
||||||
|
|
||||||
addresses = self.wallet.get_unused_addresses()
|
addresses = self.wallet.get_unused_addresses()
|
||||||
if not addresses:
|
if not addresses:
|
||||||
|
|||||||
@@ -572,7 +572,9 @@ class VLine(QFrame):
|
|||||||
self.setLineWidth(1)
|
self.setLineWidth(1)
|
||||||
|
|
||||||
|
|
||||||
def address_field(addresses):
|
def address_field(addresses, *, btn_text: str = None):
|
||||||
|
if btn_text is None:
|
||||||
|
btn_text = _('Get wallet address')
|
||||||
hbox = QHBoxLayout()
|
hbox = QHBoxLayout()
|
||||||
address_e = QLineEdit()
|
address_e = QLineEdit()
|
||||||
if addresses and len(addresses) > 0:
|
if addresses and len(addresses) > 0:
|
||||||
@@ -590,7 +592,7 @@ def address_field(addresses):
|
|||||||
# address not in the wallet (or to something that isn't an address)
|
# address not in the wallet (or to something that isn't an address)
|
||||||
if addresses and len(addresses) > 0:
|
if addresses and len(addresses) > 0:
|
||||||
address_e.setText(addresses[0])
|
address_e.setText(addresses[0])
|
||||||
button = QPushButton(_('Address'))
|
button = QPushButton(btn_text)
|
||||||
button.clicked.connect(func)
|
button.clicked.connect(func)
|
||||||
hbox.addWidget(button)
|
hbox.addWidget(button)
|
||||||
hbox.addWidget(address_e)
|
hbox.addWidget(address_e)
|
||||||
|
|||||||
Reference in New Issue
Block a user