Browse Source

qt paytoedit: better height adjustment

was sometimes weird...
e.g. pasting several lines of outputs would leave the textedit single line
regtest_lnd
SomberNight 6 years ago
parent
commit
aac9826e1b
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 6
      electrum/gui/qt/paytoedit.py

6
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):

Loading…
Cancel
Save