From d954ddf0bd9ccd02dae5649a2ca5b113299d9a39 Mon Sep 17 00:00:00 2001 From: f321x Date: Wed, 22 Oct 2025 14:12:15 +0200 Subject: [PATCH] trustedcoin: qt: set higher minimumHeight for QR component The default minimumHeight for wizard components is a bit small for the 2fa confirmation component as it only shows the QR code but not the input field. This seems to confuse users as its not intuitive to scroll down if there is no large text shown (as for example in the ToS component). This change increases the minimumHeight and restores it to the previous height once the user leaves the component again. --- electrum/plugins/trustedcoin/qt.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electrum/plugins/trustedcoin/qt.py b/electrum/plugins/trustedcoin/qt.py index 93bca30b8..9b76d7482 100644 --- a/electrum/plugins/trustedcoin/qt.py +++ b/electrum/plugins/trustedcoin/qt.py @@ -460,6 +460,18 @@ class WCShowConfirmOTP(WalletWizardComponent): self.wizard.trustedcoin_qhelper.otpError.connect(self.on_otp_error) self.wizard.trustedcoin_qhelper.remoteKeyError.connect(self.on_remote_key_error) + # set higher minHeight so the qr code and the input field are shown without scrolling + prev_height = self.wizard.height() + prev_min_height = self.wizard.minimumHeight() + def restore_prev_height(): + self.wizard.setMinimumHeight(prev_min_height) + self.wizard.resize(self.wizard.width(), prev_height) + self.wizard.next_button.clicked.disconnect(restore_prev_height) + self.wizard.back_button.clicked.disconnect(restore_prev_height) + self.wizard.setMinimumHeight(530) + self.wizard.next_button.clicked.connect(restore_prev_height) + self.wizard.back_button.clicked.connect(restore_prev_height) + self._is_online_continuation = 'seed' not in self.wizard_data if self._is_online_continuation: self.knownsecretlabel.setText(_('Authenticate below to finalize wallet creation'))