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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user