mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
try to fix flickering issue in publisher
This commit is contained in:
parent
e86bf9c787
commit
63c8197031
1 changed files with 7 additions and 3 deletions
|
|
@ -441,14 +441,18 @@ class ExpandingTextEdit(QtWidgets.QTextEdit):
|
|||
margins = self.contentsMargins()
|
||||
|
||||
document_width = 0
|
||||
if width >= margins.left() + margins.right():
|
||||
document_width = width - margins.left() - margins.right()
|
||||
margins_size = margins.left() + margins.right()
|
||||
if width >= margins_size:
|
||||
document_width = width - margins_size
|
||||
|
||||
document = self.document().clone()
|
||||
document.setTextWidth(document_width)
|
||||
|
||||
return math.ceil(
|
||||
margins.top() + document.size().height() + margins.bottom()
|
||||
margins.top()
|
||||
+ document.size().height()
|
||||
+ margins.bottom()
|
||||
+ 2
|
||||
)
|
||||
|
||||
def sizeHint(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue