electrum

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

commit 20406bc1eaf9cf85c54a981ef8ca8bc982af2ca7
parent d599f11cceb0b74d092befff019097d0f0d3f2ac
Author: ThomasV <thomasv@electrum.org>
Date:   Tue,  7 Nov 2017 17:41:38 +0100

Merge pull request #3236 from jo-so/gui-hires

paytoedit: Calculate height depending on font's line height
Diffstat:
Mgui/qt/paytoedit.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gui/qt/paytoedit.py b/gui/qt/paytoedit.py @@ -186,8 +186,9 @@ class PayToEdit(ScanQRTextEdit): self.update_size() def update_size(self): + lineHeight = QFontMetrics(self.document().defaultFont()).height() docHeight = self.document().size().height() - h = docHeight*17 + 11 + h = docHeight * lineHeight + 11 if self.heightMin <= h <= self.heightMax: self.setMinimumHeight(h) self.setMaximumHeight(h)