From dd3fc041f9ee93a2a6e3b2057c5b508bba8b9a49 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 12 Dec 2023 10:56:41 +0000 Subject: [PATCH] qt main window: statusbar: swap Tor and Network buttons I think it's nicer for the network status to be rightmost, which was the case for a long time. (Though plugins are still added after (via multiple different mechanisms, see 2fa, hww, revealer). We could perhaps add a VLine separator, or add them to the left instead.) follow-up 90d1d587e8cfbb3512bf7adce0b55c421c679e28 --- electrum/gui/qt/main_window.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 94c646f45..68c84f1ec 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1648,12 +1648,23 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): self.status_button = None self.tor_button = None if self.network: - self.status_button = StatusBarButton(read_QIcon("status_disconnected.png"), _("Network"), self.gui_object.show_network_dialog, sb_height) - sb.addPermanentWidget(self.status_button) - self.tor_button = StatusBarButton(read_QIcon("tor_logo.png"), _("TOR"), - self.gui_object.show_network_dialog, sb_height) + self.tor_button = StatusBarButton( + read_QIcon("tor_logo.png"), + _("Tor"), + self.gui_object.show_network_dialog, + sb_height, + ) sb.addPermanentWidget(self.tor_button) self.tor_button.setVisible(False) + # add status btn last, to place it at rightmost pos + self.status_button = StatusBarButton( + read_QIcon("status_disconnected.png"), + _("Network"), + self.gui_object.show_network_dialog, + sb_height, + ) + sb.addPermanentWidget(self.status_button) + # add plugins run_hook('create_status_bar', sb) self.setStatusBar(sb)