Browse Source

qt TxDialog: visibility of widgets should be set after parenting

widget.show() and widget.setVisible(True) results in a blink of an ephemeral window containing the widget;
that is, unless the widget has a parent explicitly set or it can be determined via which layout the widget is placed in.
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
dbd1c8cf71
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 6
      electrum/gui/qt/transaction_dialog.py

6
electrum/gui/qt/transaction_dialog.py

@ -558,8 +558,6 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
self.rbf_cb = QCheckBox(_('Replace by fee'))
self.rbf_cb.setChecked(bool(self.config.get('use_rbf', True)))
vbox_right.addWidget(self.rbf_cb)
self.rbf_label.setVisible(self.finalized)
self.rbf_cb.setVisible(not self.finalized)
self.locktime_label = TxDetailLabel()
vbox_right.addWidget(self.locktime_label)
@ -572,6 +570,10 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
vbox.addLayout(hbox_stats)
# set visibility after parenting can be determined by Qt
self.rbf_label.setVisible(self.finalized)
self.rbf_cb.setVisible(not self.finalized)
def set_title(self):
self.setWindowTitle(_("Create transaction") if not self.finalized else _("Transaction"))

Loading…
Cancel
Save