Browse Source

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
master
SomberNight 2 years ago
parent
commit
ff8f8d6104
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/gui/qt/main_window.py
  2. 6
      electrum/gui/qt/util.py

3
electrum/gui/qt/main_window.py

@ -2366,12 +2366,13 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
d.setMinimumSize(600, 300)
vbox = QVBoxLayout(d)
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)
vbox.addLayout(hbox_top)
keys_e = ScanQRTextEdit(allow_multi=True, config=self.config)
keys_e.setTabChangesFocus(True)
vbox.addWidget(keys_e)
vbox.addWidget(QLabel(_("Send to address") + ":"))
addresses = self.wallet.get_unused_addresses()
if not addresses:

6
electrum/gui/qt/util.py

@ -572,7 +572,9 @@ class VLine(QFrame):
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()
address_e = QLineEdit()
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)
if addresses and len(addresses) > 0:
address_e.setText(addresses[0])
button = QPushButton(_('Address'))
button = QPushButton(btn_text)
button.clicked.connect(func)
hbox.addWidget(button)
hbox.addWidget(address_e)

Loading…
Cancel
Save