From 737a0ce9d8e1145834b6cfd6d96cdc3023f0d202 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 30 Apr 2015 11:34:06 +0900 Subject: [PATCH] Avoid ugly flash of small window during startup. Electrum 2.x flashes a small window during startup before the main window appears. This turns out to be the fee edit box being enabled in create_send_tab(). Setting it to visible when the grid containing it is unparented causes QT to actually display a window with just the edit box widget for some reason. So defer the call to set its visibility until the grid is parented. --- gui/qt/main_window.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index c65d19b8..32ca4601 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -922,7 +922,6 @@ class ElectrumWindow(QMainWindow): self.fee_e = BTCAmountEdit(self.get_decimal_point) grid.addWidget(self.fee_e_label, 5, 0) grid.addWidget(self.fee_e, 5, 1, 1, 2) - self.update_fee_edit() self.send_button = EnterButton(_("Send"), self.do_send) self.clear_button = EnterButton(_("Clear"), self.do_clear) @@ -987,6 +986,9 @@ class ElectrumWindow(QMainWindow): vbox.addWidget(self.invoices_label) vbox.addWidget(self.invoices_list) + # Defer this until grid is parented to avoid ugly flash during startup + self.update_fee_edit() + run_hook('create_send_tab', grid) return w