qt: SwapServerDialog: resize server list with dialog
What changed, and why it matters
This commit is a minor user-interface layout tweak. It changes how a list of swap servers is sized inside a dialog window so the list grows with the window and uses space more efficiently. There is no security relevance.
No security action needed. Treat as a normal UI improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies electrum/gui/qt/swap_dialog.py in SwapServerDialog. It replaces vbox.addStretch() with vbox.addSpacing(10) and adds stretch=1 to the servers_list widget so the list expands with the dialog. This is purely a Qt layout/UX change.
Changed components
electrum/gui/qt/swap_dialog.pyInspect captured patch +2 / −2
diff --git a/electrum/gui/qt/swap_dialog.py b/electrum/gui/qt/swap_dialog.py
index 3cdc084..0f2d7c0 100644
--- a/electrum/gui/qt/swap_dialog.py
+++ b/electrum/gui/qt/swap_dialog.py
@@ -534,8 +534,8 @@ class SwapServerDialog(WindowModalDialog, QtEventListener):
vbox = QVBoxLayout()
self.setLayout(vbox)
vbox.addWidget(WWLabel(msg))
- vbox.addWidget(self.servers_list)
- vbox.addStretch()
+ vbox.addWidget(self.servers_list, stretch=1)
+ vbox.addSpacing(10)
self.ok_button = OkButton(self)
vbox.addLayout(Buttons(CancelButton(self), self.ok_button))
self.setMinimumWidth(650)
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.