mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #1358 from ynput/bugfix/blind-flickering-fix
Publisher: Try to fix flickering issue in publisher report
This commit is contained in:
commit
6f2cefb8bd
2 changed files with 10 additions and 4 deletions
|
|
@ -1147,6 +1147,8 @@ class LogItemMessage(QtWidgets.QTextEdit):
|
|||
QtWidgets.QSizePolicy.Preferred,
|
||||
QtWidgets.QSizePolicy.Maximum
|
||||
)
|
||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
document = self.document()
|
||||
document.documentLayout().documentSizeChanged.connect(
|
||||
self._adjust_minimum_size
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ class ExpandingTextEdit(QtWidgets.QTextEdit):
|
|||
"""QTextEdit which does not have sroll area but expands height."""
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(ExpandingTextEdit, self).__init__(parent)
|
||||
super().__init__(parent)
|
||||
|
||||
size_policy = self.sizePolicy()
|
||||
size_policy.setHeightForWidth(True)
|
||||
|
|
@ -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