electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit aac9826e1b2a155a1c380f37b93fa6b505232818
parent 7278953c636caa91df53f1c686eac5eb25d0e1f8
Author: SomberNight <somber.night@protonmail.com>
Date:   Sat,  4 May 2019 04:39:59 +0200

qt paytoedit: better height adjustment

was sometimes weird...
e.g. pasting several lines of outputs would leave the textedit single line

Diffstat:
Melectrum/gui/qt/paytoedit.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/electrum/gui/qt/paytoedit.py b/electrum/gui/qt/paytoedit.py @@ -196,9 +196,9 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger): lineHeight = QFontMetrics(self.document().defaultFont()).height() docHeight = self.document().size().height() h = docHeight * lineHeight + 11 - if self.heightMin <= h <= self.heightMax: - self.setMinimumHeight(h) - self.setMaximumHeight(h) + h = min(max(h, self.heightMin), self.heightMax) + self.setMinimumHeight(h) + self.setMaximumHeight(h) self.verticalScrollBar().hide() def qr_input(self):