1
0

qt paytoedit: better height adjustment

was sometimes weird...
e.g. pasting several lines of outputs would leave the textedit single line
This commit is contained in:
SomberNight
2019-05-04 04:39:59 +02:00
parent 7278953c63
commit aac9826e1b

View File

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