qt: channels_list: add tooltip to New Channel btn
What changed, and why it matters
This commit only adds helpful hover text (tooltips) to the 'New Channel' button in Electrum's user interface. It explains why the button is disabled when Lightning isn't available and what the button does when it is enabled. There is no security change.
No security action needed. This is a benign UI/UX improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies electrum/gui/qt/channels_list.py to set a QToolTip on the ‘New Channel’ button depending on whether self.wallet.can_have_lightning() is true. The button’s enabled state is preserved but now set explicitly. No logic, permission, cryptographic, or network behavior is altered.
Changed components
electrum/gui/qt/channels_list.pyInspect captured patch +5 / −1
diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py
index 70514bd..c62d49c 100644
--- a/electrum/gui/qt/channels_list.py
+++ b/electrum/gui/qt/channels_list.py
@@ -368,7 +368,11 @@ class ChannelsList(MyTreeView):
# and maybe add item "main_window.init_lightning_dialog()" when applicable
menu.setEnabled(self.wallet.has_lightning())
self.new_channel_button = EnterButton(_('New Channel'), self.main_window.new_channel_dialog)
- self.new_channel_button.setEnabled(self.wallet.can_have_lightning())
+ if not self.wallet.can_have_lightning():
+ self.new_channel_button.setEnabled(False)
+ self.new_channel_button.setToolTip(_("Lightning is not available for this wallet."))
+ else:
+ self.new_channel_button.setToolTip(_("Open a channel to send payments over the Lightning network."))
toolbar.insertWidget(2, self.new_channel_button)
return toolbar
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.