change where the ceil happens

This commit is contained in:
Jakub Trllo 2025-03-24 16:06:14 +01:00
parent e56c71d3ea
commit fd4e5f58d4

View file

@ -411,11 +411,13 @@ class ExpandingTextEdit(QtWidgets.QTextEdit):
document = self.document().clone()
document.setTextWidth(document_width)
return margins.top() + document.size().height() + margins.bottom()
return math.ceil(
margins.top() + document.size().height() + margins.bottom()
)
def sizeHint(self):
width = super().sizeHint().width()
return QtCore.QSize(width, math.ceil(self.heightForWidth(width)))
return QtCore.QSize(width, self.heightForWidth(width))
class BaseClickableFrame(QtWidgets.QFrame):