topen channel dialog improvements - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9ed9fe700277c2c5f519b167e430f232ff6d1603 DIR parent f67011d47753a94759c5040ac211161011689140 HTML Author: ThomasV <thomasv@electrum.org> Date: Tue, 3 Mar 2020 13:06:37 +0100 open channel dialog improvements Diffstat: M electrum/gui/qt/channels_list.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) --- DIR diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py t@@ -238,20 +238,21 @@ class ChannelsList(MyTreeView): suggest_button = QPushButton(d, text=_('Suggest')) suggest_button.clicked.connect(lambda: remote_nodeid.setText(bh2u(lnworker.suggest_peer() or b''))) clear_button = QPushButton(d, text=_('Clear')) - clear_button.clicked.connect(lambda: remote_nodeid.setText('')) + def on_clear(): + amount_e.setText('') + remote_nodeid.setText('') + max_button.setChecked(False) + clear_button.clicked.connect(on_clear) h = QGridLayout() h.addWidget(QLabel(_('Your Node ID')), 0, 0) - h.addWidget(local_nodeid, 0, 1) + h.addWidget(local_nodeid, 0, 1, 1, 3) h.addWidget(QLabel(_('Remote Node ID')), 1, 0) - h.addWidget(remote_nodeid, 1, 1) - h.addWidget(suggest_button, 1, 2) - h.addWidget(clear_button, 1, 3) - h.addWidget(QLabel('Amount'), 2, 0) - hbox = QHBoxLayout() - hbox.addWidget(amount_e) - hbox.addWidget(max_button) - hbox.addStretch(1) - h.addLayout(hbox, 2, 1) + h.addWidget(remote_nodeid, 1, 1, 1, 3) + h.addWidget(suggest_button, 2, 1) + h.addWidget(clear_button, 2, 2) + h.addWidget(QLabel('Amount'), 3, 0) + h.addWidget(amount_e, 3, 1) + h.addWidget(max_button, 3, 2) vbox.addLayout(h) ok_button = OkButton(d) ok_button.setDefault(True)