tMerge pull request #3236 from jo-so/gui-hires - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 20406bc1eaf9cf85c54a981ef8ca8bc982af2ca7 DIR parent d599f11cceb0b74d092befff019097d0f0d3f2ac HTML 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: M gui/qt/paytoedit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/gui/qt/paytoedit.py b/gui/qt/paytoedit.py t@@ -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)