Browse Source

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

paytoedit: Calculate height depending on font's line height
3.0.x
ThomasV 7 years ago
committed by GitHub
parent
commit
20406bc1ea
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      gui/qt/paytoedit.py

3
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)

Loading…
Cancel
Save