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
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
3 additions and
3 deletions
-
electrum/gui/qt/paytoedit.py
|
@ -196,9 +196,9 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger): |
|
|
lineHeight = QFontMetrics(self.document().defaultFont()).height() |
|
|
lineHeight = QFontMetrics(self.document().defaultFont()).height() |
|
|
docHeight = self.document().size().height() |
|
|
docHeight = self.document().size().height() |
|
|
h = docHeight * lineHeight + 11 |
|
|
h = docHeight * lineHeight + 11 |
|
|
if self.heightMin <= h <= self.heightMax: |
|
|
h = min(max(h, self.heightMin), self.heightMax) |
|
|
self.setMinimumHeight(h) |
|
|
self.setMinimumHeight(h) |
|
|
self.setMaximumHeight(h) |
|
|
self.setMaximumHeight(h) |
|
|
self.verticalScrollBar().hide() |
|
|
self.verticalScrollBar().hide() |
|
|
|
|
|
|
|
|
def qr_input(self): |
|
|
def qr_input(self): |
|
|