From e56c71d3eaba32c35ae70371741be43433adaad2 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 24 Mar 2025 14:51:07 +0100 Subject: [PATCH] ceil height of 'ExpandingTextEdit' --- client/ayon_core/tools/utils/widgets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/tools/utils/widgets.py b/client/ayon_core/tools/utils/widgets.py index 1074b6d4fb..f08e2fa5f2 100644 --- a/client/ayon_core/tools/utils/widgets.py +++ b/client/ayon_core/tools/utils/widgets.py @@ -1,4 +1,5 @@ import logging +import math from typing import Optional, List, Set, Any from qtpy import QtWidgets, QtCore, QtGui @@ -413,8 +414,8 @@ class ExpandingTextEdit(QtWidgets.QTextEdit): return margins.top() + document.size().height() + margins.bottom() def sizeHint(self): - width = super(ExpandingTextEdit, self).sizeHint().width() - return QtCore.QSize(width, self.heightForWidth(width)) + width = super().sizeHint().width() + return QtCore.QSize(width, math.ceil(self.heightForWidth(width))) class BaseClickableFrame(QtWidgets.QFrame):